Repository navigation
feat(github): Publish issue.updated for issue edits, labels, assignees, and milestones - #2621
Open
sentry-junior[bot] wants to merge 1 commit into
Open
sentry-junior[bot] wants to merge 1 commit into
sentry-junior[bot] wants to merge 1 commit into
Conversation
…s, and milestones Issue Watches could get comments and open/close/reopen, but not other changes. Normalize the edited, labeled, unlabeled, assigned, unassigned, milestoned, and demilestoned actions of the issues webhook into one issue.updated event. Issue Watches suggest it; repository Watches support it but do not suggest it. Updates that the App makes publish nothing, so Junior does not wake itself with its own issue edits. Co-Authored-By: David Cramer <23610+dcramer@users.noreply.github.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
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.
Issue Watches already get
issue.comment.created,issue.closed, andissue.reopened. They did not get any other change to the issue. This adds oneissue.updatedevent for the rest of theissueswebhook actions that matter:edited(title or body),labeled/unlabeled,assigned/unassigned,milestoned/demilestonedBehavior:
GitHub issue getsentry/junior#946 was assigned to bob by jane.Label and milestone names are repository-controlled text, so they go inuntrustedTextwith the title and body.updateIssuelabel/assignee changes would wake the conversation that watches the issue.issue.updated. Repository Watches support it but do not suggest it, because updates are frequent across a repository.repo+issue, so existing filters and reach (reporequired) apply unchanged.The
issueswebhook already delivers these actions to the App, so no App permission or webhook subscription change is needed.To keep
webhooks/events.tsunder the 1,000-line limit, the new normalizer lives inwebhooks/issue-update.ts, and four small shared helpers (gitHubDoneBy,nonBlank,titleAndBodyText,providerTime) moved towebhooks/event-targets.tsunchanged.Open question: no change-kind match field (such as "only labeled") yet. One event plus the summary is enough for watches; add a filter when an automation needs it.
via @dcramer.
--
View Session [Sentry]