ci: add a WIP-title gate to extension CI

Every push to an open PR ran the full validate job, and pull_request
lacked the edited type, so removing WIP: would not start a run. pr-flow
therefore refused to open PRs early.

Skip validate on PRs titled WIP: or [WIP], add edited so un-WIP starts
the run, add workflow_dispatch for on-demand runs, and cancel superseded
PR runs (never push runs, since main's push uploads the package). The
workflow name and job id are unchanged, so the required check context
stays "Firefox Extension CI / validate (pull_request)".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
golem
2026-10-18 02:08:12 -06:00
co-authored by Claude Opus 5.5
parent 99bb58f7b7
commit cb7da3a538
+16
View File
@@ -2,13 +2,29 @@ name: Firefox Extension CI
on: on:
pull_request: pull_request:
# edited: removing the WIP: prefix starts the real run.
types: [opened, synchronize, reopened, edited]
push: push:
branches: branches:
- develop - develop
- main - main
workflow_dispatch:
concurrency:
group: ${{ gitea.workflow }}-${{ gitea.ref }}
# Cancel superseded PR runs, never a push run: main's push uploads the package.
cancel-in-progress: ${{ gitea.event_name == 'pull_request' }}
jobs: jobs:
validate: validate:
# WIP gate: skip PRs titled WIP: so early PRs cost no run per push. Gate on
# the title and nothing else, since a skipped job reports success on the
# required check (see ~/.claude/docs/gitea-ci-pattern.md).
if: >-
gitea.event_name != 'pull_request' || (
!startsWith(gitea.event.pull_request.title, 'WIP:') &&
!startsWith(gitea.event.pull_request.title, '[WIP]')
)
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Check out repository - name: Check out repository