Skip to content

Instantly share code, notes, and snippets.

@GuillaumeFalourd
Last active June 26, 2021 17:11
Show Gist options
  • Save GuillaumeFalourd/81f41fb8b53a0bd3d63856f919e501c2 to your computer and use it in GitHub Desktop.
Save GuillaumeFalourd/81f41fb8b53a0bd3d63856f919e501c2 to your computer and use it in GitHub Desktop.
Example of github context payload for a PUSH event (on Github Actions)
{
"token": "***",
"job": "github-context",
"ref": "refs/heads/main",
"sha": "675027d26658e47a4928b124f620eb1c65528c40",
"repository": "GuillaumeFalourd/poc-github-actions",
"repository_owner": "GuillaumeFalourd",
"repositoryUrl": "git://github.com/GuillaumeFalourd/poc-github-actions.git",
"run_id": "974558253",
"run_number": "3",
"retention_days": "90",
"actor": "GuillaumeFalourd",
"workflow": "24 - Github Context",
"head_ref": "",
"base_ref": "",
"event_name": "push",
"event": {
"after": "675027d26658e47a4928b124f620eb1c65528c40",
"base_ref": null,
"before": "c2877298db913a9b021e67f359243eb5d830828e",
"commits": [
{
"author": {
"email": "guillaume.falourd@zup.com.br",
"name": "GuillaumeFalourd",
"username": "GuillaumeFalourd"
},
"committer": {
"email": "guillaume.falourd@zup.com.br",
"name": "GuillaumeFalourd",
"username": "GuillaumeFalourd"
},
"distinct": true,
"id": "675027d26658e47a4928b124f620eb1c65528c40",
"message": "update github context workflow\n\nSigned-off-by: GuillaumeFalourd <guillaume.falourd@zup.com.br>",
"timestamp": "2021-06-26T14:07:19-03:00",
"tree_id": "e4cd8ee4108cdc8f7f810f6744d170825532eb72",
"url": "https://github.com/GuillaumeFalourd/poc-github-actions/commit/675027d26658e47a4928b124f620eb1c65528c40"
}
],
"compare": "https://github.com/GuillaumeFalourd/poc-github-actions/compare/c2877298db91...675027d26658",
"created": false,
"deleted": false,
"forced": false,
"head_commit": {
"author": {
"email": "guillaume.falourd@zup.com.br",
"name": "GuillaumeFalourd",
"url": "https://api.github.com/users/GuillaumeFalourd"
},
"private": false,
"pulls_url": "https://api.github.com/repos/GuillaumeFalourd/poc-github-actions/pulls{/number}",
"pushed_at": 1624727244,
"releases_url": "https://api.github.com/repos/GuillaumeFalourd/poc-github-actions/releases{/id}",
"size": 230,
"ssh_url": "git@github.com:GuillaumeFalourd/poc-github-actions.git",
"stargazers": 2,
"stargazers_count": 2,
"stargazers_url": "https://api.github.com/repos/GuillaumeFalourd/poc-github-actions/stargazers",
"statuses_url": "https://api.github.com/repos/GuillaumeFalourd/poc-github-actions/statuses/{sha}",
"subscribers_url": "https://api.github.com/repos/GuillaumeFalourd/poc-github-actions/subscribers",
"subscription_url": "https://api.github.com/repos/GuillaumeFalourd/poc-github-actions/subscription",
"svn_url": "https://github.com/GuillaumeFalourd/poc-github-actions",
"tags_url": "https://api.github.com/repos/GuillaumeFalourd/poc-github-actions/tags",
"teams_url": "https://api.github.com/repos/GuillaumeFalourd/poc-github-actions/teams",
"trees_url": "https://api.github.com/repos/GuillaumeFalourd/poc-github-actions/git/trees{/sha}",
"updated_at": "2021-06-26T17:05:58Z",
"url": "https://github.com/GuillaumeFalourd/poc-github-actions",
"watchers": 2,
"watchers_count": 2
},
"sender": {
"avatar_url": "https://avatars.githubusercontent.com/u/22433243?v=4",
"events_url": "https://api.github.com/users/GuillaumeFalourd/events{/privacy}",
"followers_url": "https://api.github.com/users/GuillaumeFalourd/followers",
"following_url": "https://api.github.com/users/GuillaumeFalourd/following{/other_user}",
"gists_url": "https://api.github.com/users/GuillaumeFalourd/gists{/gist_id}",
"gravatar_id": "",
"html_url": "https://github.com/GuillaumeFalourd",
"id": 22433243,
"login": "GuillaumeFalourd",
"node_id": "MDQ6VXNlcjIyNDMzMjQz",
"organizations_url": "https://api.github.com/users/GuillaumeFalourd/orgs",
"received_events_url": "https://api.github.com/users/GuillaumeFalourd/received_events",
"repos_url": "https://api.github.com/users/GuillaumeFalourd/repos",
"site_admin": false,
"starred_url": "https://api.github.com/users/GuillaumeFalourd/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/GuillaumeFalourd/subscriptions",
"type": "User",
"url": "https://api.github.com/users/GuillaumeFalourd"
}
},
"server_url": "https://github.com",
"api_url": "https://api.github.com",
"graphql_url": "https://api.github.com/graphql",
"workspace": "/home/runner/work/poc-github-actions/poc-github-actions",
"action": "run1"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment