Repository navigation
Conversation
caugner
force-pushed
the
needs-triage-event-history
branch
from
October 12, 2026 17:30
6f814f1 to
222dc37
Compare
caugner
marked this pull request as ready for review
October 12, 2026 19:12
LeoMcA
requested changes
Oct 14, 2026
| run: gh issue edit "$ISSUE_URL" --add-label "$LABEL" | ||
| ACTION: ${{ github.event.action }} | ||
| TRIGGERED_AT: ${{ github.event.action == 'transferred' && github.event.changes.new_issue.updated_at || github.event.action == 'opened' && github.event.changes.old_issue == null && github.event.issue.created_at || github.event.issue.updated_at }} | ||
| run: | |
Member
There was a problem hiding this comment.
I think we've entered bash hell 🔥
What would this look like using github actions javascript?
| add | ||
| | any(.[]; | ||
| .event == "unlabeled" | ||
| and .label.name == $label |
Member
There was a problem hiding this comment.
I believe the labels are case insensitive in the api, but are case sensitive here, so this risks a label being readded if the cases don't match.
caugner
marked this pull request as draft
October 15, 2026 10:09
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Update the
needs-triageworkflow to check paginated issue event history before adding the configured label.unlabeledevent occurred after the triggering event.Motivation
Preserve maintainer label removals made while the
opened,reopened, ortransferredworkflow is starting.Additional details
Use timestamps from the triggering payload:
issue.created_atfor ordinaryopenedevents,issue.updated_atforreopenedand destinationopenedevents after transfer, andchanges.new_issue.updated_atfortransferredevents. Other event types retain the existing add behavior.Manual validation in mdn/needs-triage-test:
needs triage(issue #1).unlabeledevent afteropenedkept the label off (issue #2, run).All three workflow runs completed successfully: run 1, run 2, and run 3.
Related issues and pull requests