From eb9024674800446e3a369485bc206d0d68a4e579 Mon Sep 17 00:00:00 2001 From: Adam Cassis Date: Wed, 27 May 2026 10:52:39 +0200 Subject: [PATCH] ci: freeze legacy repo - auto-close PRs and drop release workflow Development has moved to the Automattic/newspack-workspace monorepo. Auto-close any newly opened/reopened PR with a pointer to the monorepo, and remove the release workflow so this repo no longer cuts releases. NPPM-2752 Co-Authored-By: Claude Opus 4.7 (1M context) --- .github/workflows/auto-close-prs.yml | 35 ++++++++++++++++++++++++++++ .github/workflows/release.yml | 33 -------------------------- 2 files changed, 35 insertions(+), 33 deletions(-) create mode 100644 .github/workflows/auto-close-prs.yml delete mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/auto-close-prs.yml b/.github/workflows/auto-close-prs.yml new file mode 100644 index 000000000..6e866f8f8 --- /dev/null +++ b/.github/workflows/auto-close-prs.yml @@ -0,0 +1,35 @@ +name: Auto-close pull requests + +# Development has moved to the Automattic/newspack-workspace monorepo. +# This repository is a read-only mirror, so any new pull request opened here is +# automatically commented on and closed, directing contributors to the monorepo. + +on: + pull_request_target: + types: [opened, reopened] + +# Using pull_request_target (not pull_request) so the token has write scope for +# fork PRs too. No PR code is checked out or run, so the elevated token is safe. +permissions: + pull-requests: write + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number }} + cancel-in-progress: true + +jobs: + auto-close: + name: Comment and close + runs-on: ubuntu-latest + steps: + - name: Comment and close the pull request + env: + GH_TOKEN: ${{ github.token }} + GH_REPO: ${{ github.repository }} + PR_URL: ${{ github.event.pull_request.html_url }} + run: | + gh pr close "$PR_URL" --comment "👋 Thanks for your interest in contributing to Newspack! + + Newspack development has moved to a single monorepo: **[Automattic/newspack-workspace](https://github.com/Automattic/newspack-workspace)**. This repository is now a read-only mirror, so we're automatically closing new pull requests here. + + Please reopen your change against the monorepo – \`newspack-theme\` now lives at \`themes/newspack-theme/\` there. Thank you! 💙" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index 0af22b034..000000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,33 +0,0 @@ -name: Release - -on: - push: - branches: - - release - - alpha - - 'hotfix/**' - - 'epic/**' - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - -jobs: - build: - uses: Automattic/newspack-scripts/.github/workflows/reusable-build.yml@trunk - - release: - needs: build - uses: Automattic/newspack-scripts/.github/workflows/reusable-release.yml@trunk - secrets: - GIT_COMMITTER_TOKEN: ${{ secrets.GIT_COMMITTER_TOKEN }} - NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - - post-release: - if: github.ref == 'refs/heads/release' - needs: release - uses: Automattic/newspack-scripts/.github/workflows/reusable-post-release.yml@trunk - secrets: - GIT_COMMITTER_TOKEN: ${{ secrets.GIT_COMMITTER_TOKEN }} - SLACK_CHANNEL_ID: ${{ secrets.SLACK_CHANNEL_ID }} - SLACK_AUTH_TOKEN: ${{ secrets.SLACK_AUTH_TOKEN }}