From 90e32d8c16cd92a4fa290db30f74d0502db23453 Mon Sep 17 00:00:00 2001 From: "Peter Fichtner (pfichtner)" Date: Thu, 5 Feb 2026 20:53:28 +0100 Subject: [PATCH] initial version --- .github/workflows/close-solution-pr.yml | 42 +++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .github/workflows/close-solution-pr.yml diff --git a/.github/workflows/close-solution-pr.yml b/.github/workflows/close-solution-pr.yml new file mode 100644 index 00000000..cf5ff91f --- /dev/null +++ b/.github/workflows/close-solution-pr.yml @@ -0,0 +1,42 @@ +name: Close solution PRs + +on: + pull_request: + types: [labeled] + +jobs: + close: + if: github.event.label.name == 'solution' + runs-on: ubuntu-slim + steps: + - name: Comment on PR + uses: actions/github-script@v7 + with: + script: | + github.rest.issues.createComment({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: context.issue.number, + body: ` +👋 Thanks for working on the Gilded Rose kata! + +This repository intentionally contains badly written code for learning purposes. + +We don't accept refactored solutions as pull requests. +Please keep your solution in your fork. + +If you intended to contribute documentation, tests, or a new language version, feel free to reopen and explain 🙂 +` + }) + + - name: Close PR + uses: actions/github-script@v7 + with: + script: | + github.rest.pulls.update({ + owner: context.repo.owner, + repo: context.repo.repo, + pull_number: context.issue.number, + state: 'closed' + }) +