name: RFC # Keeps the rfc-moratorium status and the pinned Open RFCs issue current. See # RFC.md. The hourly run is what turns the status green once a window closes. on: pull_request_target: types: [opened, reopened, synchronize, labeled, unlabeled, closed] schedule: - cron: '17 * * * *' workflow_dispatch: permissions: contents: read issues: write pull-requests: write statuses: write # A group keeps one pending run and cancels the one it replaces. A labeled run # posts the announcement, so it gets a group of its own and is never lost. # Other pull request runs only write their own head commit's status, so they # group per pull request and never wait behind or cancel another one. The # hourly and manual runs write every status and stay serialized in 'rfc'. concurrency: group: >- ${{ github.event.action == 'labeled' && format('rfc-labeled-{0}', github.run_id) || github.event_name == 'pull_request_target' && format('rfc-pr-{0}', github.event.pull_request.number) || 'rfc' }} cancel-in-progress: false jobs: moratorium: runs-on: ubuntu-latest steps: # This checks out the base branch. The job holds a write token, so it # must never check out or run anything from the pull request. - uses: actions/checkout@v4 with: sparse-checkout: .github - uses: actions/github-script@v7 with: script: | await require('./.github/scripts/rfc.js').run({ github, context, core });