diff --git a/.github/workflows/preflight-pr-title.yml b/.github/workflows/preflight-pr-title.yml index c94ea5c..216f420 100644 --- a/.github/workflows/preflight-pr-title.yml +++ b/.github/workflows/preflight-pr-title.yml @@ -5,10 +5,9 @@ # before the first ":". Mirrors the prefix-parsing convention already used by # `preflight-todo-comments.yml`, so the same IDs power both checks. # -# Bot-authored PRs are skipped by default (any account where +# Bot-authored PRs are skipped (any account where # `pull_request.user.type == 'Bot'`, which covers `hash-worker[bot]`, -# `dependabot[bot]`, and any other GitHub App). Additional user logins can be -# skipped via the `ignored-actors` input. +# `dependabot[bot]`, and any other GitHub App). name: PR Title on: @@ -20,16 +19,6 @@ on: types: [opened, synchronize, reopened, edited] merge_group: workflow_call: - inputs: - ignored-actors: - description: | - Additional GitHub logins to exempt from the check, as a - newline- or comma-separated list. GitHub App accounts - (`pull_request.user.type == 'Bot'`) are always skipped, so - this is only needed for human accounts that should be exempt. - type: string - required: false - default: "" permissions: contents: read @@ -38,40 +27,9 @@ jobs: check: name: Linear Issue ID runs-on: ubuntu-24.04 - if: github.event_name == 'pull_request' || github.event_name == 'pull_request_target' + if: (github.event_name == 'pull_request' || github.event_name == 'pull_request_target') && github.event.pull_request.user.type != 'Bot' steps: - - name: Determine whether to skip the check - id: skip - env: - PR_USER: ${{ github.event.pull_request.user.login }} - PR_USER_TYPE: ${{ github.event.pull_request.user.type }} - EXTRA_IGNORED: ${{ inputs.ignored-actors }} - run: | - echo "PR author: $PR_USER (type: $PR_USER_TYPE)" - - if [[ "$PR_USER_TYPE" == "Bot" ]]; then - echo "::notice::Skipping check — PR authored by a bot account ($PR_USER)." - echo "skip=true" >> "$GITHUB_OUTPUT" - exit 0 - fi - - if [[ -n "$EXTRA_IGNORED" ]]; then - EXTRA_NORMALIZED=$(printf '%s' "$EXTRA_IGNORED" \ - | tr ',' '\n' \ - | sed 's/^[[:space:]]*//; s/[[:space:]]*$//' \ - | sed '/^$/d') - - if echo "$EXTRA_NORMALIZED" | grep -qFx "$PR_USER"; then - echo "::notice::Skipping check — PR author $PR_USER is in the ignored-actors list." - echo "skip=true" >> "$GITHUB_OUTPUT" - exit 0 - fi - fi - - echo "skip=false" >> "$GITHUB_OUTPUT" - - name: Validate PR title contains Linear issue ID - if: steps.skip.outputs.skip != 'true' env: PR_TITLE: ${{ github.event.pull_request.title }} run: |