discord-api-docs icon indicating copy to clipboard operation
discord-api-docs copied to clipboard

Github deployment events not supported

Open imilchev opened this issue 1 year ago • 2 comments

Description

I created a webhook on Github to send all deployment events to a Discord channel. These events seem to be rejected with HTTP 400.

Steps to Reproduce

I am providing the rejected payload:

{
  "deployment_status": {
    "url": "https://api.github.com/repos/podkrepi-bg/frontend/deployments/619900440/statuses/1177038693",
    "id": 1177038693,
    "node_id": "DES_kwDOEzALAs5GKC9l",
    "state": "success",
    "creator": {
      "login": "imilchev",
      "id": 16187050,
      "node_id": "MDQ6VXNlcjE2MTg3MDUw",
      "avatar_url": "https://avatars.githubusercontent.com/u/16187050?v=4",
      "gravatar_id": "",
      "url": "https://api.github.com/users/imilchev",
      "html_url": "https://github.com/imilchev",
      "followers_url": "https://api.github.com/users/imilchev/followers",
      "following_url": "https://api.github.com/users/imilchev/following{/other_user}",
      "gists_url": "https://api.github.com/users/imilchev/gists{/gist_id}",
      "starred_url": "https://api.github.com/users/imilchev/starred{/owner}{/repo}",
      "subscriptions_url": "https://api.github.com/users/imilchev/subscriptions",
      "organizations_url": "https://api.github.com/users/imilchev/orgs",
      "repos_url": "https://api.github.com/users/imilchev/repos",
      "events_url": "https://api.github.com/users/imilchev/events{/privacy}",
      "received_events_url": "https://api.github.com/users/imilchev/received_events",
      "type": "User",
      "site_admin": false
    },
    "description": "",
    "environment": "dev",
    "target_url": "https://github.com/podkrepi-bg/frontend/runs/7688401568?check_suite_focus=true",
    "created_at": "2022-08-05T09:07:22Z",
    "updated_at": "2022-08-05T09:07:22Z",
    "deployment_url": "https://api.github.com/repos/podkrepi-bg/frontend/deployments/619900440",
    "repository_url": "https://api.github.com/repos/podkrepi-bg/frontend",
    "environment_url": "https://dev.podkrepi.bg",
    "log_url": "https://github.com/podkrepi-bg/frontend/runs/7688401568?check_suite_focus=true",
    "performed_via_github_app": null
  },
  "deployment": {
    "url": "https://api.github.com/repos/podkrepi-bg/frontend/deployments/619900440",
    "id": 619900440,
    "node_id": "DE_kwDOEzALAs4k8u4Y",
    "task": "deploy",
    "original_environment": "dev",
    "environment": "dev",
    "description": null,
    "created_at": "2022-08-05T09:06:44Z",
    "updated_at": "2022-08-05T09:07:22Z",
    "statuses_url": "https://api.github.com/repos/podkrepi-bg/frontend/deployments/619900440/statuses",
    "repository_url": "https://api.github.com/repos/podkrepi-bg/frontend",
    "creator": {
      "login": "imilchev",
      "id": 16187050,
      "node_id": "MDQ6VXNlcjE2MTg3MDUw",
      "avatar_url": "https://avatars.githubusercontent.com/u/16187050?v=4",
      "gravatar_id": "",
      "url": "https://api.github.com/users/imilchev",
      "html_url": "https://github.com/imilchev",
      "followers_url": "https://api.github.com/users/imilchev/followers",
      "following_url": "https://api.github.com/users/imilchev/following{/other_user}",
      "gists_url": "https://api.github.com/users/imilchev/gists{/gist_id}",
      "starred_url": "https://api.github.com/users/imilchev/starred{/owner}{/repo}",
      "subscriptions_url": "https://api.github.com/users/imilchev/subscriptions",
      "organizations_url": "https://api.github.com/users/imilchev/orgs",
      "repos_url": "https://api.github.com/users/imilchev/repos",
      "events_url": "https://api.github.com/users/imilchev/events{/privacy}",
      "received_events_url": "https://api.github.com/users/imilchev/received_events",
      "type": "User",
      "site_admin": false
    },
    "sha": "e62d505c6940dc9c5135eec87dff0147f2e0536f",
    "ref": "master",
    "payload": {

    },
    "transient_environment": false,
    "production_environment": false,
    "performed_via_github_app": null
  },
  "check_run": {
    "id": 7688401568,
    "name": "Release to dev",
    "node_id": "CR_kwDOEzALAs8AAAABykOyoA",
    "head_sha": "e62d505c6940dc9c5135eec87dff0147f2e0536f",
    "external_id": "829ecf7a-4112-5ab6-16c1-eec6223e7045",
    "url": "https://api.github.com/repos/podkrepi-bg/frontend/check-runs/7688401568",
    "html_url": "https://github.com/podkrepi-bg/frontend/runs/7688401568?check_suite_focus=true",
    "details_url": "https://github.com/podkrepi-bg/frontend/runs/7688401568?check_suite_focus=true",
    "status": "completed",
    "conclusion": "success",
    "started_at": "2022-08-05T09:06:57Z",
    "completed_at": "2022-08-05T09:07:20Z"
  },
  "workflow": {
    "id": 31349557,
    "node_id": "W_kwDOEzALAs4B3ls1",
    "name": "Release",
    "path": ".github/workflows/release.yml",
    "state": "active",
    "created_at": "2022-07-30T22:00:58.000Z",
    "updated_at": "2022-08-03T11:57:16.000Z",
    "url": "https://api.github.com/repos/podkrepi-bg/frontend/actions/workflows/31349557",
    "html_url": "https://github.com/podkrepi-bg/frontend/blob/master/.github/workflows/release.yml",
    "badge_url": "https://github.com/podkrepi-bg/frontend/workflows/Release/badge.svg"
  },
  "workflow_run": {
    "id": 2802482781,
    "name": "Release",
    "node_id": "WFR_kwLOEzALAs6nCn5d",
    "head_branch": "master",
    "head_sha": "e62d505c6940dc9c5135eec87dff0147f2e0536f",
    "path": ".github/workflows/release.yml",
    "run_number": 14,
    "event": "push",
    "status": "in_progress",
    "conclusion": null,
    "workflow_id": 31349557,
    "check_suite_id": 7680325497,
    "check_suite_node_id": "CS_kwDOEzALAs8AAAABych3eQ",
    "url": "https://api.github.com/repos/podkrepi-bg/frontend/actions/runs/2802482781",
    "html_url": "https://github.com/podkrepi-bg/frontend/actions/runs/2802482781",
    "pull_requests": [

    ],
    "created_at": "2022-08-05T08:59:47Z",
    "updated_at": "2022-08-05T09:06:57Z",
    "actor": {
      "login": "imilchev",
      "id": 16187050,
      "node_id": "MDQ6VXNlcjE2MTg3MDUw",
      "avatar_url": "https://avatars.githubusercontent.com/u/16187050?v=4",
      "gravatar_id": "",
      "url": "https://api.github.com/users/imilchev",
      "html_url": "https://github.com/imilchev",
      "followers_url": "https://api.github.com/users/imilchev/followers",
      "following_url": "https://api.github.com/users/imilchev/following{/other_user}",
      "gists_url": "https://api.github.com/users/imilchev/gists{/gist_id}",
      "starred_url": "https://api.github.com/users/imilchev/starred{/owner}{/repo}",
      "subscriptions_url": "https://api.github.com/users/imilchev/subscriptions",
      "organizations_url": "https://api.github.com/users/imilchev/orgs",
      "repos_url": "https://api.github.com/users/imilchev/repos",
      "events_url": "https://api.github.com/users/imilchev/events{/privacy}",
      "received_events_url": "https://api.github.com/users/imilchev/received_events",
      "type": "User",
      "site_admin": false
    },
    "run_attempt": 1,
    "referenced_workflows": [

    ],
    "run_started_at": "2022-08-05T08:59:47Z",
    "triggering_actor": {
      "login": "imilchev",
      "id": 16187050,
      "node_id": "MDQ6VXNlcjE2MTg3MDUw",
      "avatar_url": "https://avatars.githubusercontent.com/u/16187050?v=4",
      "gravatar_id": "",
      "url": "https://api.github.com/users/imilchev",
      "html_url": "https://github.com/imilchev",
      "followers_url": "https://api.github.com/users/imilchev/followers",
      "following_url": "https://api.github.com/users/imilchev/following{/other_user}",
      "gists_url": "https://api.github.com/users/imilchev/gists{/gist_id}",
      "starred_url": "https://api.github.com/users/imilchev/starred{/owner}{/repo}",
      "subscriptions_url": "https://api.github.com/users/imilchev/subscriptions",
      "organizations_url": "https://api.github.com/users/imilchev/orgs",
      "repos_url": "https://api.github.com/users/imilchev/repos",
      "events_url": "https://api.github.com/users/imilchev/events{/privacy}",
      "received_events_url": "https://api.github.com/users/imilchev/received_events",
      "type": "User",
      "site_admin": false
    }
  },
  "action": "created",
  "repository": {
    "id": 321915650,
    "node_id": "MDEwOlJlcG9zaXRvcnkzMjE5MTU2NTA=",
    "name": "frontend",
    "full_name": "podkrepi-bg/frontend",
    "private": false,
    "owner": {
      "login": "podkrepi-bg",
      "id": 74801011,
      "node_id": "MDEyOk9yZ2FuaXphdGlvbjc0ODAxMDEx",
      "avatar_url": "https://avatars.githubusercontent.com/u/74801011?v=4",
      "gravatar_id": "",
      "url": "https://api.github.com/users/podkrepi-bg",
      "html_url": "https://github.com/podkrepi-bg",
      "followers_url": "https://api.github.com/users/podkrepi-bg/followers",
      "following_url": "https://api.github.com/users/podkrepi-bg/following{/other_user}",
      "gists_url": "https://api.github.com/users/podkrepi-bg/gists{/gist_id}",
      "starred_url": "https://api.github.com/users/podkrepi-bg/starred{/owner}{/repo}",
      "subscriptions_url": "https://api.github.com/users/podkrepi-bg/subscriptions",
      "organizations_url": "https://api.github.com/users/podkrepi-bg/orgs",
      "repos_url": "https://api.github.com/users/podkrepi-bg/repos",
      "events_url": "https://api.github.com/users/podkrepi-bg/events{/privacy}",
      "received_events_url": "https://api.github.com/users/podkrepi-bg/received_events",
      "type": "Organization",
      "site_admin": false
    },
    "html_url": "https://github.com/podkrepi-bg/frontend",
    "description": "Charity platform https://podkrepi.bg Docs https://docs.podkrepi.bg",
    "fork": false,
    "url": "https://api.github.com/repos/podkrepi-bg/frontend",
    "forks_url": "https://api.github.com/repos/podkrepi-bg/frontend/forks",
    "keys_url": "https://api.github.com/repos/podkrepi-bg/frontend/keys{/key_id}",
    "collaborators_url": "https://api.github.com/repos/podkrepi-bg/frontend/collaborators{/collaborator}",
    "teams_url": "https://api.github.com/repos/podkrepi-bg/frontend/teams",
    "hooks_url": "https://api.github.com/repos/podkrepi-bg/frontend/hooks",
    "issue_events_url": "https://api.github.com/repos/podkrepi-bg/frontend/issues/events{/number}",
    "events_url": "https://api.github.com/repos/podkrepi-bg/frontend/events",
    "assignees_url": "https://api.github.com/repos/podkrepi-bg/frontend/assignees{/user}",
    "branches_url": "https://api.github.com/repos/podkrepi-bg/frontend/branches{/branch}",
    "tags_url": "https://api.github.com/repos/podkrepi-bg/frontend/tags",
    "blobs_url": "https://api.github.com/repos/podkrepi-bg/frontend/git/blobs{/sha}",
    "git_tags_url": "https://api.github.com/repos/podkrepi-bg/frontend/git/tags{/sha}",
    "git_refs_url": "https://api.github.com/repos/podkrepi-bg/frontend/git/refs{/sha}",
    "trees_url": "https://api.github.com/repos/podkrepi-bg/frontend/git/trees{/sha}",
    "statuses_url": "https://api.github.com/repos/podkrepi-bg/frontend/statuses/{sha}",
    "languages_url": "https://api.github.com/repos/podkrepi-bg/frontend/languages",
    "stargazers_url": "https://api.github.com/repos/podkrepi-bg/frontend/stargazers",
    "contributors_url": "https://api.github.com/repos/podkrepi-bg/frontend/contributors",
    "subscribers_url": "https://api.github.com/repos/podkrepi-bg/frontend/subscribers",
    "subscription_url": "https://api.github.com/repos/podkrepi-bg/frontend/subscription",
    "commits_url": "https://api.github.com/repos/podkrepi-bg/frontend/commits{/sha}",
    "git_commits_url": "https://api.github.com/repos/podkrepi-bg/frontend/git/commits{/sha}",
    "comments_url": "https://api.github.com/repos/podkrepi-bg/frontend/comments{/number}",
    "issue_comment_url": "https://api.github.com/repos/podkrepi-bg/frontend/issues/comments{/number}",
    "contents_url": "https://api.github.com/repos/podkrepi-bg/frontend/contents/{+path}",
    "compare_url": "https://api.github.com/repos/podkrepi-bg/frontend/compare/{base}...{head}",
    "merges_url": "https://api.github.com/repos/podkrepi-bg/frontend/merges",
    "archive_url": "https://api.github.com/repos/podkrepi-bg/frontend/{archive_format}{/ref}",
    "downloads_url": "https://api.github.com/repos/podkrepi-bg/frontend/downloads",
    "issues_url": "https://api.github.com/repos/podkrepi-bg/frontend/issues{/number}",
    "pulls_url": "https://api.github.com/repos/podkrepi-bg/frontend/pulls{/number}",
    "milestones_url": "https://api.github.com/repos/podkrepi-bg/frontend/milestones{/number}",
    "notifications_url": "https://api.github.com/repos/podkrepi-bg/frontend/notifications{?since,all,participating}",
    "labels_url": "https://api.github.com/repos/podkrepi-bg/frontend/labels{/name}",
    "releases_url": "https://api.github.com/repos/podkrepi-bg/frontend/releases{/id}",
    "deployments_url": "https://api.github.com/repos/podkrepi-bg/frontend/deployments",
    "created_at": "2020-12-16T08:21:38Z",
    "updated_at": "2022-08-03T10:32:47Z",
    "pushed_at": "2022-08-05T08:59:45Z",
    "git_url": "git://github.com/podkrepi-bg/frontend.git",
    "ssh_url": "[email protected]:podkrepi-bg/frontend.git",
    "clone_url": "https://github.com/podkrepi-bg/frontend.git",
    "svn_url": "https://github.com/podkrepi-bg/frontend",
    "homepage": "https://podkrepi.bg",
    "size": 24216,
    "stargazers_count": 91,
    "watchers_count": 91,
    "language": "TypeScript",
    "has_issues": true,
    "has_projects": false,
    "has_downloads": true,
    "has_wiki": false,
    "has_pages": false,
    "forks_count": 29,
    "mirror_url": null,
    "archived": false,
    "disabled": false,
    "open_issues_count": 63,
    "license": {
      "key": "mit",
      "name": "MIT License",
      "spdx_id": "MIT",
      "url": "https://api.github.com/licenses/mit",
      "node_id": "MDc6TGljZW5zZTEz"
    },
    "allow_forking": true,
    "is_template": false,
    "web_commit_signoff_required": false,
    "topics": [
      "frontend",
      "nextjs",
      "react",
      "scss"
    ],
    "visibility": "public",
    "forks": 29,
    "open_issues": 63,
    "watchers": 91,
    "default_branch": "master"
  },
  "organization": {
    "login": "podkrepi-bg",
    "id": 74801011,
    "node_id": "MDEyOk9yZ2FuaXphdGlvbjc0ODAxMDEx",
    "url": "https://api.github.com/orgs/podkrepi-bg",
    "repos_url": "https://api.github.com/orgs/podkrepi-bg/repos",
    "events_url": "https://api.github.com/orgs/podkrepi-bg/events",
    "hooks_url": "https://api.github.com/orgs/podkrepi-bg/hooks",
    "issues_url": "https://api.github.com/orgs/podkrepi-bg/issues",
    "members_url": "https://api.github.com/orgs/podkrepi-bg/members{/member}",
    "public_members_url": "https://api.github.com/orgs/podkrepi-bg/public_members{/member}",
    "avatar_url": "https://avatars.githubusercontent.com/u/74801011?v=4",
    "description": ""
  },
  "sender": {
    "login": "imilchev",
    "id": 16187050,
    "node_id": "MDQ6VXNlcjE2MTg3MDUw",
    "avatar_url": "https://avatars.githubusercontent.com/u/16187050?v=4",
    "gravatar_id": "",
    "url": "https://api.github.com/users/imilchev",
    "html_url": "https://github.com/imilchev",
    "followers_url": "https://api.github.com/users/imilchev/followers",
    "following_url": "https://api.github.com/users/imilchev/following{/other_user}",
    "gists_url": "https://api.github.com/users/imilchev/gists{/gist_id}",
    "starred_url": "https://api.github.com/users/imilchev/starred{/owner}{/repo}",
    "subscriptions_url": "https://api.github.com/users/imilchev/subscriptions",
    "organizations_url": "https://api.github.com/users/imilchev/orgs",
    "repos_url": "https://api.github.com/users/imilchev/repos",
    "events_url": "https://api.github.com/users/imilchev/events{/privacy}",
    "received_events_url": "https://api.github.com/users/imilchev/received_events",
    "type": "User",
    "site_admin": false
  }
}

Expected Behavior

Show the deployment event in the Discord channel.

Current Behavior

The Github webhook receives HTTP 400

Screenshots/Videos

No response

Client and System Information

Using a Github webhook

imilchev avatar Aug 05 '22 09:08 imilchev

You need to append /github to the webhook's url.

Zoddo avatar Aug 05 '22 09:08 Zoddo

I have that. It works for other events but these ones get rejected

imilchev avatar Aug 05 '22 09:08 imilchev

Same issue. Would appreciate a fix.

indiealexh avatar Jan 26 '23 16:01 indiealexh

Same issue here, it works for deployment.created but not for deployment_status.created

image

aviada-fgp avatar Jan 29 '23 00:01 aviada-fgp

I found there's quite a few events missing, including project v2 events.

ooliver1 avatar Jan 29 '23 13:01 ooliver1