Skip to content

Issue Refinement Bot#11953

Merged
mekarpeles merged 1 commit intointernetarchive:masterfrom
mekarpeles:gh-triage-bot
Feb 28, 2026
Merged

Issue Refinement Bot#11953
mekarpeles merged 1 commit intointernetarchive:masterfrom
mekarpeles:gh-triage-bot

Conversation

@mekarpeles
Copy link
Copy Markdown
Member

@mekarpeles mekarpeles commented Feb 27, 2026

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.md workflow, 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:

  • Added .github/workflows/issue_refinement.md to 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:

  • Marked .github/workflows/*.lock.yml files as generated and set merge strategy to ours to simplify future merges and linguist analysis. (.gitattributes)
  • Added .github/aw/actions-lock.json to pin versions and SHAs of GitHub Actions used in workflows, improving reproducibility and security.

@mekarpeles mekarpeles force-pushed the gh-triage-bot branch 2 times, most recently from 504fda7 to 6b3a771 Compare February 28, 2026 02:36
@mekarpeles mekarpeles marked this pull request as ready for review February 28, 2026 02:36
Copilot AI review requested due to automatic review settings February 28, 2026 02:36
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.md as the workflow/prompt source and adds the generated .github/workflows/issue_refinement.lock.yml.
  • Adds .github/aw/actions-lock.json to pin GitHub Action versions/SHAs used by the workflow tooling.
  • Updates .gitattributes to mark *.lock.yml as 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.

Comment on lines +1061 to +1084
- 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');
Copy link

Copilot AI Feb 28, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Suggested change
- 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');

Copilot uses AI. Check for mistakes.
@mekarpeles mekarpeles merged commit d449dff into internetarchive:master Feb 28, 2026
5 checks passed
@mekarpeles mekarpeles deleted the gh-triage-bot branch February 28, 2026 03:03
bhardwajparth51 pushed a commit to bhardwajparth51/openlibrary that referenced this pull request Mar 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Create Github Workflow to Auto-Followup on Issue Creation

2 participants