From 3913f18933da8a66d054e2e218e746b0f5681ec2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wiktor=20Zaj=C4=85c?= Date: Wed, 23 Sep 2026 15:12:49 +0200 Subject: [PATCH] ci: make the contribution reminder generic The reminder posted on members' PRs named the internal repository and described what goes there. Keep the check, drop the specifics. Co-Authored-By: Claude Opus 5.5 (1M context) --- .github/workflows/contribution-reminder.yml | 31 ++++++++++++++++ .../internal-contribution-reminder.yml | 35 ------------------- 2 files changed, 31 insertions(+), 35 deletions(-) create mode 100644 .github/workflows/contribution-reminder.yml delete mode 100644 .github/workflows/internal-contribution-reminder.yml diff --git a/.github/workflows/contribution-reminder.yml b/.github/workflows/contribution-reminder.yml new file mode 100644 index 0000000..b9f5a34 --- /dev/null +++ b/.github/workflows/contribution-reminder.yml @@ -0,0 +1,31 @@ +name: Contribution reminder + +# Asks LeanCode organization members to confirm that their PR is meant to be +# public, since everything merged here is publicly visible. +# +# pull_request_target is safe here: the job never checks out or executes PR +# code. It only reads the event payload and posts a comment. + +on: + pull_request_target: + types: [opened] + +permissions: + pull-requests: write + +jobs: + remind: + if: contains(fromJSON('["MEMBER", "OWNER"]'), github.event.pull_request.author_association) + runs-on: ubuntu-latest + steps: + - name: Comment with a public-visibility reminder + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + PR_URL: ${{ github.event.pull_request.html_url }} + AUTHOR: ${{ github.event.pull_request.user.login }} + run: | + gh pr comment "$PR_URL" --body "Hi @${AUTHOR}! :wave: A quick check before this ships: **is this PR meant to be public?** + + Everything merged here is publicly visible. If any of it should stay inside LeanCode, it doesn't belong in this repository. + + If public is what you intended, just ignore this comment. :slightly_smiling_face:" diff --git a/.github/workflows/internal-contribution-reminder.yml b/.github/workflows/internal-contribution-reminder.yml deleted file mode 100644 index 09ca66a..0000000 --- a/.github/workflows/internal-contribution-reminder.yml +++ /dev/null @@ -1,35 +0,0 @@ -name: Internal contribution reminder - -# Asks LeanCode organization members whether their PR is intentionally public. -# Everything merged here becomes publicly visible and is synced into -# ai-plugins-internal, so internal-only content must not land in this repo. -# -# pull_request_target is safe here: the job never checks out or executes PR -# code — it only reads the event payload and posts a comment. - -on: - pull_request_target: - types: [opened] - -permissions: - pull-requests: write - -jobs: - remind: - if: contains(fromJSON('["MEMBER", "OWNER"]'), github.event.pull_request.author_association) - runs-on: ubuntu-latest - steps: - - name: Comment with public-vs-internal reminder - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - PR_URL: ${{ github.event.pull_request.html_url }} - AUTHOR: ${{ github.event.pull_request.user.login }} - run: | - gh pr comment "$PR_URL" --body "Hi @${AUTHOR}! :wave: You're a LeanCode member, so a quick sanity check before this ships: **is this PR meant for the public marketplace?** - - Everything merged here becomes publicly visible and is automatically synced into \`ai-plugins-internal\`. - - - Internal-only content (client-specific guidance, internal processes, backend/PMO plugins, anything not ready to be public) belongs in [ai-plugins-internal](https://github.com/leancodepl/ai-plugins-internal) instead. - - Generally useful, public-ready content is right at home here — the internal repo will pick it up through the sync. - - If public is what you intended, just ignore this comment. :slightly_smiling_face:"