On branch edburns/dd-2855288-add-smoke-test-to-build-and-test Make it so the branch protection rules are respected regarding pushing the badge update to main#32
Merged
edburns merged 2 commits intogithub:mainfrom Mar 25, 2026
Conversation
… so the branch protection rules are respected regarding pushing the badge update to `main` modified: .github/workflows/build-test.yml Fixes github#31 Signed-off-by: Ed Burns <edburns@microsoft.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the CI workflow to avoid direct pushes to main when updating the JaCoCo coverage badge, aligning the badge update mechanism with branch protection rules.
Changes:
- Add
pull-requests: writepermission to allow automation to open PRs. - Split the badge update into “generate badge” + “create PR for badge changes” using
peter-evans/create-pull-request.
…blast radius by tightening permissions. modified: .github/workflows/build-test.yml @Copilot wrote: > The workflow-level token permissions are set to contents: write, checks: write, and now pull-requests: write for every run, including pull_request events. To reduce blast radius, consider setting the workflow default to read-only and granting write permissions only at the job/step that needs them (the badge PR step needs contents: write + pull-requests: write). This keeps PR runs from having unnecessary write scopes. This is a good suggestion. Signed-off-by: Ed Burns <edburns@microsoft.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
modified: .github/workflows/build-test.yml
Fixes #31