feat(pr-comment): handle 409 github_app_not_installed gracefully#105
Open
reuvenharrison wants to merge 1 commit intomainfrom
Open
feat(pr-comment): handle 409 github_app_not_installed gracefully#105reuvenharrison wants to merge 1 commit intomainfrom
reuvenharrison wants to merge 1 commit intomainfrom
Conversation
When the service returns 409 with a github_app_not_installed code, parse the structured JSON body and surface a clear, actionable error: - A ::error:: workflow annotation with a title and the install URL. - A markdown setup checklist written to \$GITHUB_STEP_SUMMARY (visible on the workflow run page) telling the customer exactly what to do. Falls back to the existing generic-error behavior for any other non-2xx response. Pairs with oasdiff-service PR #175 which switches the App- not-installed response from HTTP 502 plain text to HTTP 409 + JSON. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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
Pairs with oasdiff-service PR #175, which changes the App-not-installed response from HTTP 502 plain text to HTTP 409 with a structured JSON body.
When the service returns:
```
HTTP/1.1 409 Conflict
{ "code": "github_app_not_installed", "owner": ..., "repo": ..., "install_url": ... }
```
…the action now:
Falls back to the existing generic-error behavior for any other non-2xx response.
Why this matters
Today's symptom: a customer signs up, sets up the action, opens a PR, gets a red X with a wall-of-log error. The fix is one click (install the App), but they have to dig through the workflow log to find the URL. After this change, the install URL is in a workflow annotation and the step summary — impossible to miss.
This complements (does not replace) a future pre-flight check in the setup wizard: even if pre-flight passes, the App can be uninstalled later, and this surfaces that gracefully.
Test plan
🤖 Generated with Claude Code