Add GitHub Actions workflows for issue deduplication and auto-close

Co-authored-by: BukeLy <19304666+BukeLy@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot] 2026-03-02 03:54:18 +00:00
parent f56261cee1
commit b3cb9531a4
7 changed files with 1013 additions and 0 deletions

View file

@ -0,0 +1,48 @@
# Removes the "autoclose" label whenever a human (non-bot) posts a new comment
# on an issue that carries the label. This resets the inactivity clock.
name: Remove Autoclose Label on Human Activity
on:
issue_comment:
types: [created]
permissions:
issues: write
jobs:
remove-autoclose:
# Only run for issue comments (not PR comments)
if: ${{ github.event.issue.pull_request == null }}
runs-on: ubuntu-latest
steps:
- name: Remove autoclose label if human commented
uses: actions/github-script@v7
with:
script: |
const actor = context.actor;
// Ignore bot accounts
if (actor.endsWith('[bot]') || actor === 'github-actions') {
core.info(`Skipping bot comment from ${actor}`);
return;
}
const issue = context.payload.issue;
const labels = (issue.labels || []).map(l => l.name);
if (!labels.includes('autoclose')) {
core.info('Issue does not have "autoclose" label nothing to do.');
return;
}
await github.rest.issues.removeLabel({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: issue.number,
name: 'autoclose',
});
core.info(
`Removed "autoclose" label from #${issue.number} ` +
`after human activity by ${actor}`
);