diff --git a/.github/workflows/claude-triage.yml b/.github/workflows/claude-triage.yml index 96489b6..49ce588 100644 --- a/.github/workflows/claude-triage.yml +++ b/.github/workflows/claude-triage.yml @@ -143,7 +143,10 @@ jobs: 5. Add the `triaged` label using `gh label create triaged --color 0e8a16 --force` then `gh issue edit ${{ github.event.issue.number }} --add-label triaged`. - Remove the triggering label using `gh issue edit ${{ github.event.issue.number }} --remove-label "${{ github.event.label.name }}"`. + If the triggering label is `claude-triage`, remove it using + `gh issue edit ${{ github.event.issue.number }} --remove-label "claude-triage"`. + Do not remove `from-website`; it is a persistent provenance label used by + downstream notification and reporting workflows. 6. Write a concise markdown summary of your triage decision to /tmp/triage-summary.md. Include: verdict (feasible/not feasible), reasoning, and action taken. @@ -208,7 +211,7 @@ jobs: fi - name: Remove triggering label - if: always() + if: always() && github.event.label.name == 'claude-triage' env: GH_TOKEN: ${{ github.token }} - run: gh issue edit ${{ github.event.issue.number }} --remove-label "${{ github.event.label.name }}" --repo "${{ github.repository }}" || true + run: gh issue edit ${{ github.event.issue.number }} --remove-label "claude-triage" --repo "${{ github.repository }}" || true diff --git a/functions/feedback/IssueWebhookFunction.cs b/functions/feedback/IssueWebhookFunction.cs index e65afd0..1859f60 100644 --- a/functions/feedback/IssueWebhookFunction.cs +++ b/functions/feedback/IssueWebhookFunction.cs @@ -67,22 +67,14 @@ public async Task Run( if (payload?.Issue is null) return req.CreateResponse(HttpStatusCode.OK); - // ── Filter: only closed issues with the from-website label ──────────── - var label = Environment.GetEnvironmentVariable("GITHUB_ISSUE_LABEL") ?? "from-website"; - if (payload.Action != "closed") { logger.LogInformation("Ignoring action '{Action}' for issue #{Number}", payload.Action, payload.Issue.Number); return req.CreateResponse(HttpStatusCode.OK); } - if (!payload.Issue.Labels.Any(l => l.Name == label)) - { - logger.LogInformation("Issue #{Number} missing label '{Label}' — skipping", payload.Issue.Number, label); - return req.CreateResponse(HttpStatusCode.OK); - } - - // ── Look up submitter email ─────────────────────────────────────────── + // The persisted mapping is authoritative: it is created only for issues + // submitted through the website and is not affected by mutable labels. var mapping = await issueEmailStore.GetAsync(payload.Issue.Number); if (mapping is null) {