-
Notifications
You must be signed in to change notification settings - Fork 5
Add buildifier composite action and a test workflow #50
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
base: main
Are you sure you want to change the base?
Conversation
Update the buildifier action to check for .bzl files as well.
| defaults: | ||
| run: | ||
| shell: bash | ||
| jobs: |
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.
Huh, i though zizmor should have flagged this but missing a permisions:{} block
| if: | | ||
| github.event.sender.type == 'User' || | ||
| contains(github.event.pull_request.body, 'RUN_BUILDIFIER') |
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.
Like the other one i think we should just run it, the only bot we have is one we would want to have PRs run against anyway. For example if dependabot updates the sha of checkouts below, or of the aciton.yaml.
I am more strongly suspecting XLA did this to prevent running on copybara created PRs.
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
| with: | ||
| fetch-depth: 0 # Fetch full history for accurate diffing |
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.
Same convo as the other one but we can have that conversation over there
| # Compare PR head against the base branch to find changed files. | ||
| GIT_DIFF_CMD="git diff -z --name-only --diff-filter=d origin/$TARGET_BRANCH HEAD -- $FILE_PATTERNS" | ||
|
|
||
| $GIT_DIFF_CMD | xargs -0 buildifier --mode=check -v |
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.
Same as other, we need to decide what we do if its a push event.
Do you know how long buildifier takes to run on the entire JAX repo?
No description provided.