Skip to content

Commit

Permalink
chore(ci): add warning for external contributors force pushing (#4373)
Browse files Browse the repository at this point in the history
# Description

## Problem\*

Resolves <!-- Link to GitHub Issue -->

## Summary\*

This PR adds a sticky comment to any PRs which are opened from another
repository which warns against force pushing once we've started
reviewing the PR.

## Additional Context



## Documentation\*

Check one:
- [x] No documentation needed.
- [ ] Documentation included in this PR.
- [ ] **[Exceptional Case]** Documentation to be submitted in a separate
PR.

# PR Checklist\*

- [x] I have tested the changes locally.
- [x] I have formatted the changes with [Prettier](https://prettier.io/)
and/or `cargo fmt` on default settings.

---------

Co-authored-by: jfecher <[email protected]>
  • Loading branch information
TomAFrench and jfecher authored Feb 14, 2024
1 parent ba2c541 commit 2952bf1
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .github/EXTERNAL_CONTRIBUTOR_PR_COMMENT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Thank you for your contribution to the Noir language.

Please **do not force push to this branch** after the Noir team have reviewed this PR. Doing so will only delay us merging your PR as we will need to start the review process from scratch.

Thanks for your understanding.
15 changes: 15 additions & 0 deletions .github/workflows/pull-request-title.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,18 @@ jobs:
fix
feat
chore
force-push-comment:
name: Warn external contributors about force-pushing
runs-on: ubuntu-latest
if: github.repository != 'noir-lang/noir' && github.event_name == 'pull_request_target'
permissions:
pull-requests: write

steps:
- name: Post comment on force pushes
uses: marocchino/sticky-pull-request-comment@v2
with:
path: ./.github/EXTERNAL_CONTRIBUTOR_PR_COMMENT.md


0 comments on commit 2952bf1

Please sign in to comment.