Issue Refinement Bot#11953
Conversation
504fda7 to
6b3a771
Compare
There was a problem hiding this comment.
Pull request overview
Adds a new gh-aw / Copilot-driven “Issue Refinement Assistant” workflow intended to analyze newly opened issues, apply labels, and post a structured refinement comment, along with repository config to support generated workflow artifacts and action pinning.
Changes:
- Introduces
.github/workflows/issue_refinement.mdas the workflow/prompt source and adds the generated.github/workflows/issue_refinement.lock.yml. - Adds
.github/aw/actions-lock.jsonto pin GitHub Action versions/SHAs used by the workflow tooling. - Updates
.gitattributesto mark*.lock.ymlas generated and apply a custom merge strategy.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 9 comments.
| File | Description |
|---|---|
| .github/workflows/issue_refinement.md | Source prompt/frontmatter describing triggers, labeling rules, stakeholder mentions, and response format for issue refinement. |
| .github/workflows/issue_refinement.lock.yml | Generated GitHub Actions workflow produced by gh-aw that runs Copilot CLI with safe-outputs handling. |
| .github/aw/actions-lock.json | Action version/SHA lock entries to improve reproducibility/security for workflow action usage. |
| .gitattributes | Marks workflow lock files as generated and configures merge behavior for *.lock.yml. |
| - name: Add eyes reaction for immediate feedback | ||
| id: react | ||
| if: github.event_name == 'issues' || github.event_name == 'issue_comment' || github.event_name == 'pull_request_review_comment' || github.event_name == 'discussion' || github.event_name == 'discussion_comment' || (github.event_name == 'pull_request') && (github.event.pull_request.head.repo.id == github.repository_id) | ||
| uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 | ||
| env: | ||
| GH_AW_REACTION: "eyes" | ||
| with: | ||
| github-token: ${{ secrets.GITHUB_TOKEN }} | ||
| script: | | ||
| const { setupGlobals } = require('/opt/gh-aw/actions/setup_globals.cjs'); | ||
| setupGlobals(core, github, context, exec, io); | ||
| const { main } = require('/opt/gh-aw/actions/add_reaction.cjs'); | ||
| await main(); | ||
| - name: Check team membership for workflow | ||
| id: check_membership | ||
| uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 | ||
| env: | ||
| GH_AW_REQUIRED_ROLES: admin,maintainer,write | ||
| with: | ||
| github-token: ${{ secrets.GITHUB_TOKEN }} | ||
| script: | | ||
| const { setupGlobals } = require('/opt/gh-aw/actions/setup_globals.cjs'); | ||
| setupGlobals(core, github, context, exec, io); | ||
| const { main } = require('/opt/gh-aw/actions/check_membership.cjs'); |
There was a problem hiding this comment.
pre_activation adds an 👀 reaction unconditionally for every issues event (including issues opened by non-staff), even when activated will be false and no refinement comment will follow. This may create noise and imply staff attention on all new issues. Consider removing this reaction step or gating it so it only runs after confirming activation (e.g., check membership first, then react only when activated).
| - name: Add eyes reaction for immediate feedback | |
| id: react | |
| if: github.event_name == 'issues' || github.event_name == 'issue_comment' || github.event_name == 'pull_request_review_comment' || github.event_name == 'discussion' || github.event_name == 'discussion_comment' || (github.event_name == 'pull_request') && (github.event.pull_request.head.repo.id == github.repository_id) | |
| uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 | |
| env: | |
| GH_AW_REACTION: "eyes" | |
| with: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| script: | | |
| const { setupGlobals } = require('/opt/gh-aw/actions/setup_globals.cjs'); | |
| setupGlobals(core, github, context, exec, io); | |
| const { main } = require('/opt/gh-aw/actions/add_reaction.cjs'); | |
| await main(); | |
| - name: Check team membership for workflow | |
| id: check_membership | |
| uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 | |
| env: | |
| GH_AW_REQUIRED_ROLES: admin,maintainer,write | |
| with: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| script: | | |
| const { setupGlobals } = require('/opt/gh-aw/actions/setup_globals.cjs'); | |
| setupGlobals(core, github, context, exec, io); | |
| const { main } = require('/opt/gh-aw/actions/check_membership.cjs'); | |
| - name: Check team membership for workflow | |
| id: check_membership | |
| uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 | |
| env: | |
| GH_AW_REQUIRED_ROLES: admin,maintainer,write | |
| with: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| script: | | |
| const { setupGlobals } = require('/opt/gh-aw/actions/setup_globals.cjs'); | |
| setupGlobals(core, github, context, exec, io); | |
| const { main } = require('/opt/gh-aw/actions/check_membership.cjs'); | |
| await main(); | |
| - name: Add eyes reaction for immediate feedback | |
| id: react | |
| if: (github.event_name == 'issues' || github.event_name == 'issue_comment' || github.event_name == 'pull_request_review_comment' || github.event_name == 'discussion' || github.event_name == 'discussion_comment' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.id == github.repository_id)) && steps.check_membership.outputs.is_team_member == 'true' | |
| uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 | |
| env: | |
| GH_AW_REACTION: "eyes" | |
| with: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| script: | | |
| const { setupGlobals } = require('/opt/gh-aw/actions/setup_globals.cjs'); | |
| setupGlobals(core, github, context, exec, io); | |
| const { main } = require('/opt/gh-aw/actions/add_reaction.cjs'); |
14d9798 to
fb182d3
Compare
fb182d3 to
7aa8ab3
Compare
Closes #11600
This pull request introduces a new workflow for automated issue refinement and updates repository configuration to support it. The main change is the addition of the
issue_refinement.mdworkflow, which defines a process for analyzing new issues, applying smart labels, and providing technical context for staff and contributors. Supporting changes include configuration updates for workflow files and a lock file for workflow actions.Issue Refinement Workflow:
.github/workflows/issue_refinement.mdto automate issue analysis, label application, stakeholder notification, and technical guidance for new issues created by staff or flagged with an 👀 reaction. The workflow includes detailed rules for context gathering, label assignment, file identification, and response comment structure.Repository Configuration:
.github/workflows/*.lock.ymlfiles as generated and set merge strategy tooursto simplify future merges and linguist analysis. (.gitattributes).github/aw/actions-lock.jsonto pin versions and SHAs of GitHub Actions used in workflows, improving reproducibility and security.