Skip to content
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

chore: avoid auto-formatter workflow failing on fork PRs #4600

Merged
merged 3 commits into from
Oct 7, 2024

Conversation

dbjorge
Copy link
Contributor

@dbjorge dbjorge commented Oct 5, 2024

It bothered me that every PR from a fork always had a red check from the autoformatter PR. This sets up the autoformatter to only run on PRs from non-forks, and adds a new fmt:check step to the tests workflow that will work even in forks. This lets our team still use the autoformatter without causing noise for external contributors, and also enforces our formatting requirements for PRs from forks where previously we would typically admin-merge past the check (which causes noise like #4599).

Once this PR merges, we'll want to update the repo's branch protection rules to add the new fmt-check job as a required check.

@dbjorge dbjorge requested a review from a team as a code owner October 5, 2024 00:14
@dbjorge
Copy link
Contributor Author

dbjorge commented Oct 5, 2024

(the broken ru localization gives a good demonstration of this working, where commit aefd015 showed a fmt_check failure and the autoformatter did its job)

@dbjorge dbjorge merged commit c42f0a9 into develop Oct 7, 2024
22 checks passed
@dbjorge dbjorge deleted the avoid-fork-fmt-failures branch October 7, 2024 15:01
straker pushed a commit that referenced this pull request Oct 16, 2024
It bothered me that every PR from a fork always had a red check from the
autoformatter PR. This sets up the autoformatter to only run on PRs from
non-forks, and adds a new `fmt:check` step to the tests workflow that
will work even in forks. This lets our team still use the autoformatter
without causing noise for external contributors, and also enforces our
formatting requirements for PRs from forks where previously we would
typically admin-merge past the check (which causes noise like #4599).

Once this PR merges, we'll want to update the repo's branch protection
rules to add the new fmt-check job as a required check.

---------

Co-authored-by: dbjorge <dbjorge@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants