docs
docs copied to clipboard
Package version WebHook Payload is missing details
Code of Conduct
- [X] I have read and agree to the GitHub Docs project's Code of Conduct
What article on docs.github.com is affected?
https://docs.github.com/en/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#package
What part(s) of the article would you like to see updated?
I would like more expansion on the actual structure of the package_version
object described -- it doesn't seem to match any documented objects from the Packages page, and the actual payload seems to vary from what is documented. https://github.com/google/go-github/issues/2033 is related -- we're seeing an object come through as the body, when a string is expected (and documented!).
My best guess is that this data varies based on whether there's a repository associated with the package.
Additional information
No response
Thanks for opening this issue. A GitHub docs team member should be by to give feedback soon. In the meantime, please check out the contributing guidelines.
Re
@gmemstr Thanks so much for opening an issue! I'll triage this for the team to take a look :eyes:
Thank you for opening this issue! You or anyone else is welcome to add documentation about the fields in the package_version
object.
@skedwards88 I am willing to work on this to help get https://github.com/google/go-github/issues/2033 resolved.
Unfortunately, it isn't clear what the update should be. Testing out w the Github API, package.package_version.body
(from the response body) is a string when the event is for an npm package but an object when the event is for a container package.
Secondly, package.package_version.metadata
always seems to be an empty array for every scenario I have tried. Hence, it is difficult to tell what the actual contents of the array might be (since it is an array it is different from the metadata object returned when calling the get package versions API).
It would be helpful if someone who has knowledge of the internals of the Github API can clarify some things or make the change. If that's what the label needs SME
means, then this issue still needs it. If there's any additional thing that needs to get this issue resolved, I will be glad to help out.
It looks like the docs are incorrect and an object should be expected. Below is the full schema for this object (YAML format):
package_version:
type: object
nullable: true
properties:
author:
title: User
type: object
nullable: true
properties:
avatar_url:
type: string
format: uri
deleted:
type: boolean
email:
type: string
nullable: true
events_url:
type: string
format: uri-template
followers_url:
type: string
format: uri
following_url:
type: string
format: uri-template
gists_url:
type: string
format: uri-template
gravatar_id:
type: string
html_url:
type: string
format: uri
id:
type: integer
login:
type: string
name:
type: string
node_id:
type: string
organizations_url:
type: string
format: uri
received_events_url:
type: string
format: uri
repos_url:
type: string
format: uri
site_admin:
type: boolean
starred_url:
type: string
format: uri-template
subscriptions_url:
type: string
format: uri
type:
type: string
enum:
- Bot
- User
- Organization
url:
type: string
format: uri
required:
- login
- id
body:
type: string
body_html:
type: string
container_metadata:
type: object
nullable: true
properties:
labels:
type: object
nullable: true
manifest:
type: object
nullable: true
tag:
type: object
properties:
digest:
type: string
name:
type: string
created_at:
type: string
description:
type: string
docker_metadata:
type: array
items: {}
draft:
type: boolean
html_url:
type: string
format: uri
id:
type: integer
installation_command:
type: string
manifest:
type: string
metadata:
type: array
items:
type: object
additionalProperties: true
name:
type: string
npm_metadata:
type: object
nullable: true
properties:
name:
type: string
version:
type: string
npm_user:
type: string
author:
type: string
nullable: true
bugs:
type: string
nullable: true
dependencies:
type: object
dev_dependencies:
type: object
peer_dependencies:
type: object
optional_dependencies:
type: object
description:
type: string
dist:
type: string
nullable: true
git_head:
type: string
homepage:
type: string
license:
type: string
main:
type: string
repository:
type: string
nullable: true
scripts:
type: object
id:
type: string
node_version:
type: string
npm_version:
type: string
has_shrinkwrap:
type: boolean
maintainers:
type: array
items:
type: string
contributors:
type: array
items:
type: string
engines:
type: object
keywords:
type: array
items:
type: string
files:
type: array
items:
type: string
bin:
type: object
man:
type: object
directories:
type: string
nullable: true
os:
type: array
items:
type: string
cpu:
type: array
items:
type: string
readme:
type: string
installation_command:
type: string
release_id:
type: integer
commit_oid:
type: string
published_via_actions:
type: boolean
deleted_by_id:
type: integer
nuget_metadata:
type: array
nullable: true
items:
type: object
additionalProperties: true
package_files:
type: array
items:
type: object
properties:
content_type:
type: string
created_at:
type: string
download_url:
type: string
format: uri
id:
type: integer
md5:
type: string
nullable: true
name:
type: string
sha1:
type: string
nullable: true
sha256:
type: string
nullable: true
size:
type: integer
state:
type: string
nullable: true
updated_at:
type: string
required:
- download_url
- id
- name
- sha256
- sha1
- md5
- content_type
- state
- size
- created_at
- updated_at
package_url:
type: string
prerelease:
type: boolean
release:
type: object
properties:
author:
title: User
type: object
nullable: true
properties:
avatar_url:
type: string
format: uri
deleted:
type: boolean
email:
type: string
nullable: true
events_url:
type: string
format: uri-template
followers_url:
type: string
format: uri
following_url:
type: string
format: uri-template
gists_url:
type: string
format: uri-template
gravatar_id:
type: string
html_url:
type: string
format: uri
id:
type: integer
login:
type: string
name:
type: string
node_id:
type: string
organizations_url:
type: string
format: uri
received_events_url:
type: string
format: uri
repos_url:
type: string
format: uri
site_admin:
type: boolean
starred_url:
type: string
format: uri-template
subscriptions_url:
type: string
format: uri
type:
type: string
enum:
- Bot
- User
- Organization
url:
type: string
format: uri
required:
- login
- id
created_at:
type: string
draft:
type: boolean
html_url:
type: string
format: uri
id:
type: integer
name:
type: string
nullable: true
prerelease:
type: boolean
published_at:
type: string
tag_name:
type: string
target_commitish:
type: string
url:
type: string
format: uri
required:
- url
- html_url
- id
- tag_name
- target_commitish
- name
- draft
- author
- prerelease
- created_at
- published_at
rubygems_metadata:
type: array
items: {}
source_url:
type: string
summary:
type: string
tag_name:
type: string
target_commitish:
type: string
target_oid:
type: string
updated_at:
type: string
version:
type: string
required:
- id
- version
- summary
- name
- description
- html_url
- metadata
- package_files
- installation_command
```
Cảm ơn bạn đã mở vấn đề này. Một thành viên trong GitHub tài liệu nhóm sẽ sớm đưa ra phản hồi. Trong thời gian chờ đợi, vui lòng xem đóng góp nguyên tắc .
@gmemstr
The webhook docs now include this info, so I am going to close this issue.

On Nov 18, 2022 11:10 AM, Sarah Edwards @.***> wrote: Closed #15382 as completed.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are subscribed to this thread.Message ID: @.***>
On Fri, 18 Nov 2022, 11:48 pm billybob3659, @.***> wrote:
On Nov 18, 2022 11:10 AM, Sarah Edwards @.***> wrote: Closed #15382 as completed.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are subscribed to this thread.Message ID: @.***>
— Reply to this email directly, view it on GitHub https://github.com/github/docs/issues/15382#issuecomment-1320336917, or unsubscribe https://github.com/notifications/unsubscribe-auth/AV4E6W7METLULUUYVUTEI23WI66NVANCNFSM5OG34RPQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>