3. add verified updates and rollback for compiled installs #5351
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Linear ticket | |
| on: | |
| pull_request: | |
| types: [opened, edited, reopened, synchronize] | |
| branches: [main] | |
| permissions: | |
| pull-requests: read | |
| jobs: | |
| linear-ticket: | |
| name: Check Linear ticket link | |
| runs-on: ubuntu-latest | |
| if: github.event.pull_request.user.type != 'Bot' | |
| steps: | |
| - name: Require a Linear ticket reference or an explicit opt-out | |
| uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1 | |
| with: | |
| script: | | |
| const pr = context.payload.pull_request; | |
| const text = `${pr.title}\n${pr.body ?? ""}\n${pr.head.ref}`; | |
| const ticket = /\b(?:eng|res)-\d+\b/i; | |
| const optOut = /^\s*No-Ticket:\s*\S.*$/im; | |
| if (ticket.test(text)) { | |
| core.info("Linear ticket reference found."); | |
| return; | |
| } | |
| const match = (pr.body ?? "").match(optOut); | |
| if (match) { | |
| core.info(`No-ticket opt-out present: ${match[0].trim()}`); | |
| return; | |
| } | |
| core.setFailed( | |
| [ | |
| "No Linear ticket is linked in this pull request.", | |
| "Engineering issues should use the Engineering (ENG) team and the Prime Agent V1 board.", | |
| "Capabilities and research issues should use the Research (RES) team and the Prime Agent: Long-Horizon board.", | |
| "Add the ticket ID (e.g. ENG-1234 or RES-1234) or a linear.app issue link to the PR title or description,", | |
| "or use a branch named after the ticket (e.g. eng-1234 or res-1234).", | |
| 'If this change genuinely has no ticket, add a line to the PR description: "No-Ticket: <short reason>".', | |
| ].join(" "), | |
| ); |