Skip to content

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
edburns:edburns/dd-2855288-add-smoke-test-to-build-and-test
Mar 25, 2026
Merged

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
edburns merged 2 commits intogithub:mainfrom
edburns:edburns/dd-2855288-add-smoke-test-to-build-and-test

Conversation

@edburns
Copy link
Collaborator

@edburns edburns commented Mar 25, 2026

modified: .github/workflows/build-test.yml

Fixes #31

… 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>
Copilot AI review requested due to automatic review settings March 25, 2026 17:29
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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: write permission 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>
@edburns edburns merged commit 92d945b into github:main Mar 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[MAINT]: Fix latent issue in JaCoCo badge update process

2 participants