Open joscha opened 6 years ago
I recently used the webhook service to write a small webhook that uses the pipeline slug and the organization. I noticed that the organization is not part of the pipeline section as a field, hence I parse it out of the API URL:
pipeline
https://github.com/joscha/buildkite-failed-builds-notifier/blob/112b16d9fee73fb9992693e7a065468a1a7a7837/failed-builds-notification.js#L6-L14
Ideally, however, the org would be next to the slug field, e.g.:
org
slug
"pipeline": { "id": "f1ad1196-926b-43c9-a9e0-c80420302e60", "url": "https://api.buildkite.com/v2/organizations/my-org/pipelines/my-build", "web_url": "https://buildkite.com/my-org/my-build", "slug": "canva-web-build",
would become:
"pipeline": { "id": "f1ad1196-926b-43c9-a9e0-c80420302e60", "url": "https://api.buildkite.com/v2/organizations/my-org/pipelines/my-build", "web_url": "https://buildkite.com/my-org/my-build", "slug": "canva-web-build", "organization": "my-org" ~~~~~~~~~~~ ^---- new field
I recently used the webhook service to write a small webhook that uses the pipeline slug and the organization. I noticed that the organization is not part of the
pipeline
section as a field, hence I parse it out of the API URL:https://github.com/joscha/buildkite-failed-builds-notifier/blob/112b16d9fee73fb9992693e7a065468a1a7a7837/failed-builds-notification.js#L6-L14
Ideally, however, the
org
would be next to theslug
field, e.g.:would become: