Skip to content

Commit 2da6b86

Browse files
committed
Address review comments: fix bot name, add [MAINT] support, expose GITHUB_TOKEN env
- Fix `githubactions[bot]` → `github-actions[bot]` in both jobs (austenstone) - Add `[MAINT]` to issue type detection and cleanTitle regex (austenstone) - Add `env: GITHUB_TOKEN` to github-script step for Models API auth (deiga)
1 parent 7183bd6 commit 2da6b86

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

.github/workflows/immediate-response.yaml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
github.event_name == 'pull_request_target' &&
2121
github.actor != 'dependabot[bot]' &&
2222
github.actor != 'renovate[bot]' &&
23-
github.actor != 'githubactions[bot]' &&
23+
github.actor != 'github-actions[bot]' &&
2424
github.actor != 'octokitbot' &&
2525
github.repository == 'integrations/terraform-provider-github'
2626
runs-on: ubuntu-latest
@@ -53,7 +53,7 @@ jobs:
5353
github.event_name == 'issues' &&
5454
github.actor != 'dependabot[bot]' &&
5555
github.actor != 'renovate[bot]' &&
56-
github.actor != 'githubactions[bot]' &&
56+
github.actor != 'github-actions[bot]' &&
5757
github.actor != 'octokitbot' &&
5858
github.repository == 'integrations/terraform-provider-github'
5959
runs-on: ubuntu-latest
@@ -63,6 +63,8 @@ jobs:
6363
steps:
6464
- name: Triage issue with Copilot
6565
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
66+
env:
67+
GITHUB_TOKEN: ${{ github.token }}
6668
with:
6769
script: |
6870
const issue = context.payload.issue;
@@ -74,6 +76,7 @@ jobs:
7476
if (title.startsWith('[BUG]')) issueType = 'bug';
7577
else if (title.startsWith('[FEAT]')) issueType = 'feature';
7678
else if (title.startsWith('[DOCS]')) issueType = 'documentation';
79+
else if (title.startsWith('[MAINT]')) issueType = 'maintenance';
7780
7881
// ── 2. Check template completeness ──
7982
const missingRequired = [];
@@ -168,7 +171,7 @@ jobs:
168171
const affectedResources = resourceMatches ? [...new Set(resourceMatches)] : [];
169172
170173
// ── 4. Search for potential duplicates ──
171-
const cleanTitle = title.replace(/^\[(BUG|FEAT|DOCS)\]\s*:?\s*/, '').trim();
174+
const cleanTitle = title.replace(/^\[(BUG|FEAT|DOCS|MAINT)\]\s*:?\s*/, '').trim();
172175
const searchTerms = [];
173176
174177
// Build search queries from title keywords and resource names

0 commit comments

Comments
 (0)