Skip to content

Verify code format changes come from the github-actions bot#8253

Merged
damyanp merged 1 commit intomicrosoft:mainfrom
damyanp:no_apply
Mar 11, 2026
Merged

Verify code format changes come from the github-actions bot#8253
damyanp merged 1 commit intomicrosoft:mainfrom
damyanp:no_apply

Conversation

@damyanp
Copy link
Copy Markdown
Member

@damyanp damyanp commented Mar 10, 2026

The change makes it so that code format changes are only applied if the comment was updated by the github-actions identity.

--changed-files "$CHANGED_FILES"
apply_diff:
if: ${{ github.event_name == 'issue_comment' && endsWith(github.event.comment.body, '- [x] Check this box to apply formatting changes to this branch.') }}
if: ${{ github.event_name == 'issue_comment' && github.event.comment.user.login == 'github-actions[bot]' && endsWith(github.event.comment.body, '- [x] Check this box to apply formatting changes to this branch.') }}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Does this github.event.comment.user.login reflect the original commenter, or last to edit the comment?

The mechanism is supposed to work by the fact that writing an empty checkbox markdown point will create the checkbox UI, which if clicked by a user with write access will edit the comment and replace the [ ] with [x].

If this requires the last editor to be the bot, I think the check-box trigger mechanism might not work.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Original commenter. I tested this on my fork and it still works.

@damyanp
Copy link
Copy Markdown
Member Author

damyanp commented Mar 10, 2026

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@damyanp damyanp enabled auto-merge (squash) March 11, 2026 00:18
@damyanp damyanp merged commit 4f398bf into microsoft:main Mar 11, 2026
13 checks passed
@github-project-automation github-project-automation Bot moved this from New to Done in HLSL Roadmap Mar 11, 2026
@damyanp damyanp deleted the no_apply branch March 13, 2026 23:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants