fix: skip unavailable issue comments endpoint#582
Draft
johncomar wants to merge 1 commit into
Draft
Conversation
29f54e5 to
af029c8
Compare
| if ( | ||
| context | ||
| and context.get("has_issues", True) is False | ||
| and context.get("has_pull_requests", True) is False |
Contributor
There was a problem hiding this comment.
Good catch to recognize this stream is valid if either is True!
stray-nick
approved these changes
Jun 15, 2026
stray-nick
left a comment
Contributor
There was a problem hiding this comment.
Looks like this follows #571 exactly, but for issues.
Only comment I have is given this is a second occurrence of the same issue, should we extend it to other "potentially-disableable" github artifacts now? cc @TrishGillett
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.
Summary
This PR lets the tap handle repositories where GitHub disables the repository-level issue comments endpoint.
GitHub can return
"has_issues": falseand"has_pull_requests": falsein a repository payload. For those repositories,GET /repos/{owner}/{repo}/issues/commentscan return404 Not Foundeven though the repository itself is readable and other endpoints can still be extracted.Instead of failing the sync for that case, the tap now skips issue comment extraction for repositories where GitHub explicitly reports that both Issues and Pull Requests are disabled.
This follows the same conservative pattern added for repositories with pull requests disabled in #571.
Behavior
has_issuesandhas_pull_requestsare both exactlyfalse, the tap skips the/issues/commentsrequest for that repository.true, missing,null,0, or otherwise unknown, behavior is unchanged: the tap still requests/issues/commentsand surfaces GitHub errors normally.Implementation
has_issuesfield in repository records.has_pull_requests./repos/{owner}/{repo}/issues/comments.Related stream audit
This PR does not broadly gate every issue-adjacent stream.
The issue comments endpoint can include pull request conversation comments because GitHub models pull requests as issues. For that reason, the tap skips only when GitHub explicitly reports that both Issues and Pull Requests are disabled.
The following streams were intentionally left unchanged and continue to delegate normally when
has_issuesisfalse:issuesissue_eventsmilestoneslabelsThe focused change is limited to
issue_comments, where the repository-level issue comments endpoint can fail when both Issues and Pull Requests are disabled.What this does not change
404or403tolerance.Validation