Add workflow for running clang-format on PR comment #586
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.
Assuming this works (I can't test until it's in the master branch...) maintainers & PR authors will be able to comment
!run-clang-formaton a PR and have GitHub automatically runclang-formaton the changes & commit the result. This has been a longstanding desire of mine to avoid the need to ask contributors to runclang-formaton their changes to satisfy the CI requirement.I've debated making this automatic as part of the CI, but I'd rather it be explicit, at least for now.
I've also tried to limit permissions to just PR authors and maintainers, however it is my understanding that's not easily done w/ GitHub's API. If I'm understanding
github.event.comment.author_associationcorrectly, what I have here would give permissions to anyone in themicrosoftorg, which is more broad than I'd like, but unlikely to be an issue. The scope of impact of what anyone could do is significantly limited since it'll just runclang-format, something we're already enforcing.Once this PR is complete, I'll do a round of testing since I unfortunately can't test it before completing the PR....