Files
PowerToys/.github/workflows/pr-intake.yml
Niels Laute 3d0c3bdb29 Fix issue triage and PR intake workflow behavior (#49924)
## Summary

- run AI issue triage only when an issue is opened or its original
title/body is edited
- do not run issue triage for comments or reopen events
- store deterministic issue evidence in the agent-visible runner temp
directory
- expose structured safe-output publication through the restricted CLI
proxy while keeping shell, edit, and GitHub API tools disabled
- skip PR intake jobs for draft pull requests and run intake when they
become ready for review
- replace the `Needs-Review` lifecycle label with `Ready for review`,
migrating the legacy label on subsequent intake runs

Closes #49917

## Validation

- `gh aw compile issue-triage`
- `python -m unittest discover .github\scripts\issue-triage\tests -v`
(46 tests)
- `node --test .github\scripts\pr-intake\tests\pr-intake.test.mjs` (32
tests)
- `git diff --check` on committed files

---------

Copilot-Session: 3067a641-aa79-4f96-8d9f-eaa1c6d9b3cf
2026-08-15 08:45:39 -07:00

53 lines
1.6 KiB
YAML

# PR intake
#
# Deterministic pull request intake. Runs on every pull request and posts a
# single canonical comment (only when there is something for the author to act
# on or consider), keeps the Ready for review / Needs-Author-Feedback lifecycle
# labels in sync, and nudges for visual evidence on product UI changes.
#
# This workflow does not run any code from the pull request head. The Node
# script reads all pull request data through the GitHub API, so checking out
# the base ref is only needed to run the script itself. 3rd-party actions are
# pinned to a commit hash per Microsoft's security guidelines.
name: PR intake
on:
pull_request_target:
types:
- opened
- edited
- synchronize
- reopened
- ready_for_review
- converted_to_draft
permissions:
contents: read
issues: write
pull-requests: write
concurrency:
group: pr-intake-${{ github.event.pull_request.number }}
cancel-in-progress: true
jobs:
pr-intake:
if: ${{ github.event.pull_request.draft == false || github.event.action == 'converted_to_draft' }}
runs-on: ubuntu-latest
steps:
- name: Checkout base ref
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
ref: ${{ github.event.pull_request.base.sha }}
persist-credentials: false
- name: Set up Node.js
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: "22"
- name: Run PR intake
env:
GITHUB_TOKEN: ${{ github.token }}
run: node .github/scripts/pr-intake/pr-intake.mjs "$GITHUB_EVENT_PATH"