Repository navigation
BUILD-12473 Pin ci-github-actions consistently to master, grant contents:write - #117
Conversation
|
Close in favor of #116 |
…nts:write This repo dogfoods ci-github-actions@master. Master now requires contents: write for get-build-number and everything that calls it internally (including config-npm), per PREQ-7781. - Adds contents: write to the pre-commit job in pre-commit.yml, which calls config-npm@master. - Pins config-pip to @master (was @v1) in build.yml, pre-commit.yml, and slack_notify.yml, consistent with the sibling actions in those jobs (build-poetry@master, promote@master, config-npm@master). (2) isn't cosmetic: mixing config-pip@v1 with @master actions in the same job breaks BUILD_NUMBER propagation. config-pip@v1's get-build-number@v1 unconditionally exports BUILD_NUMBER via GITHUB_ENV; the v2 (@master) get-build-number then sees that env var already set and skips its own ref-claiming step — so contents: write was never actually being exercised by this job. Worse, downstream @master steps expect the v2 numbering scheme and choke on the v1-style value: see master run 34352891924, where the Promote job fails with "Build number '<value>' is not a valid positive integer". Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
401252f to
47fb831
Compare
|
Code Review ✅ Approved 2 closed / 2 findingsPins ✅ 2 closed✅ Quality: config-pip left on @v1 in slack_notify.yml; job lacks contents: write
Closed: Quality: contents: write likely not exercised in this job (BUILD_NUMBER preset)
VerificationFunctional validation No results Rules No rules evaluated Auto-approval Not enabledOptionsAuto-apply is off → Gitar will not commit updates to this branch. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Gitar |



This repo dogfoods ci-github-actions@master. Master now requires
contents: writeforget-build-numberand everything that calls it internally (includingconfig-npm), per PREQ-7781.Two changes:
contents: writeto thepre-commitjob inpre-commit.yml, which callsconfig-npm@master. Mirrors the fix already merged in sonar-dummy-maven-enterprise#143.config-pipto@master(was@v1) in bothbuild.ymlandpre-commit.yml, consistent with the sibling actions in those same jobs (build-poetry@master,promote@master,config-npm@master).(2) isn't cosmetic: mixing
config-pip@v1with@masteractions in the same job breaksBUILD_NUMBERpropagation.config-pip@v1'sget-build-number@v1unconditionally exportsBUILD_NUMBERviaGITHUB_ENV; the v2 (@master)get-build-numberthen sees that env var already set and skips its own ref-claiming step — socontents: writewas never actually being exercised by this job. Worse, downstream@mastersteps expect the v2 numbering scheme and choke on the v1-style value: see master run 34352891924, where thePromotejob fails withBuild number '<value>' is not a valid positive integer.Tracked in BUILD-12473.
FYI: #116 rewrites the
pre-commitjob's steps and would incidentally remove theconfig-npm@mastercall, but it doesn't touch thepermissions:block, so the two remain compatible in either merge order.Summary by Gitar
config-pipto@masterand grantedcontents: writepermissions inslack_notify.ymlThis will update automatically on new commits.