diff --git a/.github/actions/github-close-pr/action.yaml b/.github/actions/github-close-pr/action.yaml new file mode 100644 index 0000000..1e5a350 --- /dev/null +++ b/.github/actions/github-close-pr/action.yaml @@ -0,0 +1,22 @@ +name: github-close-pr +description: "A tool for automatically closing pull requests" + +inputs: + message: + required: true + description: "The message to comment. This may contain " + +runs: + using: "composite" + steps: + - name: Leave Issue or Pull Request comment + uses: actions/github-script@v7 + with: + retries: 3 + script: | + github.rest.pulls.update({ + pull_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + state: 'closed' + }); diff --git a/.github/workflows/close-spam.yaml b/.github/workflows/close-spam.yaml new file mode 100644 index 0000000..c8110c2 --- /dev/null +++ b/.github/workflows/close-spam.yaml @@ -0,0 +1,38 @@ +name: Close Pull Requests +on: + pull_request_target: + types: [opened, reopened] + +jobs: + run: + runs-on: ubuntu-latest + steps: + - name: Leave comment + uses: ./.github/actions/github-comment + with: + message: | + 👋🏻 Hi, thank you for your interest in this project. + + I sincerely appreciate your enthusiasm and eagerness to contribute, + as public contributions are fundamental to the open-source community. + + However, at this moment, I am **not actively accepting external + contributions**. This project primarily exists to experiment and + learn about game engine design in Rust -- and as such has a much + looser focus and roadmap that is currently aligned with specific + goals. + + It is possible that this may change in the future; so please consider + starring this project to keep an eye on future updates for + opportunities to contribute and collaborate. Your support and + understanding are highly valued. + + This project does have + [💬 Github Discussion](https://github.com/{{github.repo}}/discussions) + enabled if there are suggestions for improvements or reasonable + feature requests. + + Thank you! 🙇‍♂️ + + - name: Close pull request + uses: ./.github/actions/github-close-pr