Verify code format changes come from the github-actions bot#8253
Merged
damyanp merged 1 commit intomicrosoft:mainfrom Mar 11, 2026
Merged
Verify code format changes come from the github-actions bot#8253damyanp merged 1 commit intomicrosoft:mainfrom
damyanp merged 1 commit intomicrosoft:mainfrom
Conversation
V-FEXrt
approved these changes
Mar 10, 2026
tex3d
reviewed
Mar 10, 2026
| --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.') }} |
Contributor
There was a problem hiding this comment.
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.
Member
Author
There was a problem hiding this comment.
Original commenter. I tested this on my fork and it still works.
Member
Author
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
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.
The change makes it so that code format changes are only applied if the comment was updated by the github-actions identity.