chore: switch github workflow to pull request trigger#2144
Conversation
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 0 minutes and 15 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughSwitched CI workflow trigger from Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Signed-off-by: Fabian Burth <fabian.burth@sap.com>
babb3de to
f6349f7
Compare
df1492e to
1df6ca4
Compare
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
.github/workflows/ci.yml (1)
15-18:⚠️ Potential issue | 🟠 MajorAdd
packages: readpermission to therun_integration_testsjob.The
run_integration_testsjob passesGH_TOKENto tests that build GHCR credential configurations (cli/integration/download_plugin_integration_test.go:215-227), but the workflow-levelpermissionsblock (ci.yml:15-18) only grantscontents: readandchecks: read. Whenpermissionsis explicitly declared, unspecified scopes becomenone, so this token lacks thepackages: readpermission required for authenticated GHCR access. Public GHCR packages can still be pulled anonymously, which means the job may pass without actually validating authenticated credential usage. Either addpackages: readto enable proper credential testing or remove the credential injection if anonymous pulls are the intended path.Suggested fix
run_integration_tests: name: "Integration Tests" needs: discover_modules runs-on: ubuntu-latest + permissions: + contents: read + checks: read + packages: read if: ${{ fromJSON(needs.discover_modules.outputs.integration_test_modules_json)[0] != null }} # skip if no modules are found🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.github/workflows/ci.yml around lines 15 - 18, The workflow-level permissions block currently only grants contents: read and checks: read, causing GH_TOKEN to lack packages: read for the run_integration_tests job; update the .github/workflows/ci.yml permissions block (or the run_integration_tests job) to include packages: read so the GH_TOKEN can authenticate GHCR pulls used by the integration test (referencing the run_integration_tests job and the tests in cli/integration/download_plugin_integration_test.go), or alternatively remove the GH_TOKEN/credential injection from that job if anonymous pulls are intended.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Outside diff comments:
In @.github/workflows/ci.yml:
- Around line 15-18: The workflow-level permissions block currently only grants
contents: read and checks: read, causing GH_TOKEN to lack packages: read for the
run_integration_tests job; update the .github/workflows/ci.yml permissions block
(or the run_integration_tests job) to include packages: read so the GH_TOKEN can
authenticate GHCR pulls used by the integration test (referencing the
run_integration_tests job and the tests in
cli/integration/download_plugin_integration_test.go), or alternatively remove
the GH_TOKEN/credential injection from that job if anonymous pulls are intended.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 13b3bc9b-a39a-4ea4-8b80-358f3ea54013
📒 Files selected for processing (1)
.github/workflows/ci.yml
…ue to `pull_request` trigger anyway Signed-off-by: Fabian Burth <fabian.burth@sap.com>
…worktree-fix+workflow-trigger
|
Caution Review failedAn error occurred during the review process. Please try again later. 📝 WalkthroughWalkthroughSwitched CI workflow trigger from Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…-model#2144) <!-- markdownlint-disable MD041 --> #### What this PR does / why we need it Harden our github workflows. #### Which issue(s) this PR fixes <!-- Usage: `Fixes #<issue number>`, or `Fixes (paste link of issue)`. --> #### Testing ##### How to test the changes <!-- Required files to test the changes: .ocmconfig ```yaml type: generic.config.ocm.software/v1 configurations: - type: credentials.config.ocm.software repositories: - repository: type: DockerConfig/v1 dockerConfigFile: "~/.docker/config.json" ``` Commands that test the change: ```bash ocm get cv xxx ocm transfer xxx ``` --> ##### Verification - [ ] I have tested the changes locally by running `ocm` --------- Signed-off-by: Fabian Burth <fabian.burth@sap.com> Signed-off-by: Gerald Morrison (SAP) <gerald.morrison@sap.com>
…-model#2144) <!-- markdownlint-disable MD041 --> #### What this PR does / why we need it Harden our github workflows. #### Which issue(s) this PR fixes <!-- Usage: `Fixes #<issue number>`, or `Fixes (paste link of issue)`. --> #### Testing ##### How to test the changes <!-- Required files to test the changes: .ocmconfig ```yaml type: generic.config.ocm.software/v1 configurations: - type: credentials.config.ocm.software repositories: - repository: type: DockerConfig/v1 dockerConfigFile: "~/.docker/config.json" ``` Commands that test the change: ```bash ocm get cv xxx ocm transfer xxx ``` --> ##### Verification - [ ] I have tested the changes locally by running `ocm` --------- Signed-off-by: Fabian Burth <fabian.burth@sap.com> Signed-off-by: Gerald Morrison (SAP) <gerald.morrison@sap.com>
What this PR does / why we need it
Harden our github workflows.
Which issue(s) this PR fixes
Testing
How to test the changes
Verification
ocm