[Schema Inaccuracy] `X-GitHub-Hook-Installation-Target-Type` and `X-GitHub-Hook-Installation-Target-Id` are insufficiently documented (and incorrect)
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 68/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- openapi
- Domain
- api
Research direction
Start with the two webhook header schema entries included in this issue and compare them with the linked delivery-headers documentation and previous reports. Verify the valid Target-Type values and the Target-Id mapping for each, then update the schema types and descriptions so the documented values and identifiers are accurate.
Written by the indexing model from the issue text.
Description
Schema Inaccuracy
The schema for these two webhook headers only specifies:
{
"name": "X-Github-Hook-Installation-Target-Id",
"in": "header",
"example": 123123,
"schema": {
"type": "string"
}
},
{
"name": "X-Github-Hook-Installation-Target-Type",
"in": "header",
"example": "repository",
"schema": {
"type": "string"
}
},
the webhooks documentation is not significantly more helpful:
X-GitHub-Hook-Installation-Target-Type: The type of resource where the webhook was created.
X-GitHub-Hook-Installation-Target-ID: The unique identifier of the resource where the webhook was created.
Issue
While some hooks can be distinguished by probing the payload for optional entries like installation or organization entries, not only is this pretty ugly some events don't have such entries because e.g. they're not attached to installations in the case of github apps hooks (ping, github_app_authorization.revoked).
Currently every developer who needs this information has to reverse-engineer the values and hope they didn't miss special cases.
Expected
- enumerate the valid values for
Target-Type(as far as I can tell there'srepositoryfor repository hooks andintegrationfor app hooks, I have never tested org hooks so I've no idea what that uses - specify what
Target-Idmaps to for each type, as far as I can tell forrepositoryit's the repository id and forintegrationit's the app id - also the
Target-Idis currently typed as astring, but all of them are numbers (/ integers)
Previous reports
- Dominant language
- No language data
- Stars
- 1.6k
- Forks
- 342
- Avg merge
- 3h 33m
- Merged PRs (30d)
- 51
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from github/rest-api-description
-
feature
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
github/rest-api-description#7201 ·
-
feature
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
github/rest-api-description#7163 ·
-
feature
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
github/rest-api-description#7162 ·
-
feature
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
github/rest-api-description#7135 ·
-
feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
github/rest-api-description#7111 · 1 comment ·
All issues in github/rest-api-description
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
use-agent-os/agent-os#3312 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
-
needs-acceptance wg/data-plane-networking
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
vllm-project/semantic-router#4024 · 1 comment ·
-
bug good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
amponce/archive-movie-browser#165 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100