Tracing a Shields commit and keeping CI warnings visible
Read on GitHubToday I traced an unexpected commit author in Shields and opened a PR to give automated Simple Icons updates a consistent byline. I also weighed whether to remove pull_request_target from our DangerJS workflow.
Why the merge queue appeared as a commit author
I noticed that github-actions[bot] opened the PR to update simple-icons to 16.39.0, but the commit listed github-merge-queue[bot] as its author. The run log showed how that happened. GitHub Actions triggered the workflow on its weekly schedule, and create-pull-request used the run's github.actor as the author. That actor was the merge queue bot. Shields PR #12354 · Scheduled run · Action defaults
I opened PR #12355 to set the action's author input to github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>. This gives scheduled and manual runs the same author as the existing committer. The number before the plus sign is the bot's fixed GitHub account ID. That address format lets GitHub keep commits associated with an account even if its username changes. Shields PR #12355 · GitHub's noreply email formats
Keeping warnings visible on the PR
I'm still weighing whether to remove pull_request_target from Danger. Allowing it for this workflow would let Danger post warnings directly in the conversation on fork PRs. Our job checks out the default branch, but it also installs dependencies and runs Danger with a token that can write to the repository's PRs and checks. With a read-only pull_request job, we could run npm run danger -- ci --text-only --failOnErrors and keep the results in the log. GitHub has no “passed with warnings” result, though. A reviewer looking at a green Danger check could easily miss the warning. Shields workflow · Danger CLI options · Community discussion
I counted 11 warning rules and two failure rules. Turning every warning into a failure would flag perfectly valid changes. Editing an npm script, for example, can trigger the lockfile warning even when no dependency changed. One option I'm considering is to keep Danger read-only and have a separate workflow_run job verify the PR and commit, then post the findings as a comment. That would keep write access in the publishing job, at the cost of maintaining a second workflow. Shields rules · GitHub's workflow_run documentation