-
Notifications
You must be signed in to change notification settings - Fork 88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
use pre-commit clang-format for format_header #1475
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess this helps until we merge #1466
d3b1419
to
be2b564
Compare
Co-authored-by: Tobias Ribizel <[email protected]>
be2b564
to
d1a6b70
Compare
@@ -22,6 +22,7 @@ jobs: | |||
name: check-format | |||
if: github.event.issue.pull_request != '' && github.event.comment.body == 'check-format!' && (github.event.comment.author_association == 'COLLABORATOR' || github.event.comment.author_association == 'MEMBER' || github.event.comment.author_association == 'OWNER') | |||
uses: ./.github/workflows/check-formatting.yml | |||
secrets: inherit |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought this would need to be in check-formatting.yml
. And where is the token set to the bot token?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It never gets to check-formatting.yml
, because we don't inherit the secrets to it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, ok, secrets: inherit
allows check-formatting.yml
to access the secrets.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The related information:
https://docs.github.com/en/enterprise-cloud@latest/actions/using-workflows/reusing-workflows#passing-inputs-and-secrets-to-a-reusable-workflow
they do not pass the secret to reusable workflow by default.
Use the pre-commit clang-format for format_header for consistent clang-format version and avoid no clang-format issue.
Also, fix the
types_or