tweak: restore arachnids #942
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Close PRs on master | |
| on: | |
| pull_request_target: | |
| types: [ opened, ready_for_review ] | |
| jobs: | |
| run: | |
| runs-on: ubuntu-latest | |
| if: ${{(github.head_ref == 'master' || github.head_ref == 'main' || github.head_ref == 'develop' || github.head_ref == 'stable' || github.head_ref == 'staging') | |
| && github.event.pull_request.head.repo.fork}} | |
| steps: | |
| - uses: superbrothers/close-pull-request@v3 | |
| with: | |
| comment: "Thank you for your contribution! It appears you created a pull request from the master branch or another main development branch. This is [something you should avoid doing](https://jmeridth.com/posts/do-not-issue-pull-requests-from-your-master-branch/), and thus this pull request has been automatically closed. \n \n We suggest you follow [our git usage documentation](https://docs.spacestation14.com/en/general-development/setup/git-for-the-ss14-developer.html). \n \n You can move your current work to another branch by following [these commands](https://ohshitgit.com/#accidental-commit-master). Then, you may recreate your pull request using the new branch." | |
| # If you prefer to just comment on the pr and not close it, uncomment the below and comment the above | |
| # - uses: actions/github-script@v7 | |
| # with: | |
| # script: | | |
| # github.rest.issues.createComment({ | |
| # issue_number: ${{ github.event.number }}, | |
| # owner: context.repo.owner, | |
| # repo: context.repo.repo, | |
| # body: "Thank you for your contribution! It appears you created a pull request from the master branch or another main development branch. This is [something you should avoid doing](https://jmeridth.com/posts/do-not-issue-pull-requests-from-your-master-branch/)\n\nYou can move your current work to another branch by following [these commands](https://ohshitgit.com/#accidental-commit-master). Then, you may recreate your pull request using the new branch. \n\n This pull request won't be automatically closed. However, a maintainer may close it for this reason."}) |