From 2f2854f165bbb83e53262a6bbd3ae5a431d6a427 Mon Sep 17 00:00:00 2001 From: Tony Redondo Date: Thu, 10 Oct 2024 15:53:10 +0200 Subject: [PATCH] internal/civisibility: add extra tags to github action pull_requests runs (#2922) --- internal/civisibility/constants/git.go | 9 + internal/civisibility/utils/ci_providers.go | 32 ++ .../civisibility/utils/ci_providers_test.go | 42 ++ .../utils/testdata/fixtures/github-event.json | 490 ++++++++++++++++++ 4 files changed, 573 insertions(+) create mode 100644 internal/civisibility/utils/testdata/fixtures/github-event.json diff --git a/internal/civisibility/constants/git.go b/internal/civisibility/constants/git.go index 6265be391a..a373132950 100644 --- a/internal/civisibility/constants/git.go +++ b/internal/civisibility/constants/git.go @@ -49,4 +49,13 @@ const ( // GitTag indicates the current git tag. // This constant is used to tag traces with the tag name associated with the current commit. GitTag = "git.tag" + + // GitHeadCommit indicates the GIT head commit hash. + GitHeadCommit = "git.commit.head_sha" + + // GitPrBaseCommit indicates the GIT PR base commit hash. + GitPrBaseCommit = "git.pull_request.base_branch_sha" + + // GitPrBaseBranch indicates the GIT PR base branch name. + GitPrBaseBranch = "git.pull_request.base_branch" ) diff --git a/internal/civisibility/utils/ci_providers.go b/internal/civisibility/utils/ci_providers.go index 9b714ce59e..17f0f304ad 100644 --- a/internal/civisibility/utils/ci_providers.go +++ b/internal/civisibility/utils/ci_providers.go @@ -408,6 +408,38 @@ func extractGithubActions() map[string]string { tags[constants.CIEnvVars] = string(jsonString) } + // Extract PR information from the github event json file + eventFilePath := os.Getenv("GITHUB_EVENT_PATH") + if stats, ok := os.Stat(eventFilePath); ok == nil && !stats.IsDir() { + if eventFile, err := os.Open(eventFilePath); err == nil { + defer eventFile.Close() + + var eventJson struct { + PullRequest struct { + Base struct { + Sha string `json:"sha"` + Ref string `json:"ref"` + } `json:"base"` + Head struct { + Sha string `json:"sha"` + } `json:"head"` + } `json:"pull_request"` + } + + eventDecoder := json.NewDecoder(eventFile) + if eventDecoder.Decode(&eventJson) == nil { + tags[constants.GitHeadCommit] = eventJson.PullRequest.Head.Sha + tags[constants.GitPrBaseCommit] = eventJson.PullRequest.Base.Sha + tags[constants.GitPrBaseBranch] = eventJson.PullRequest.Base.Ref + } + } + } + + // Fallback if GitPrBaseBranch is not set + if tmpVal, ok := tags[constants.GitPrBaseBranch]; !ok || tmpVal == "" { + tags[constants.GitPrBaseBranch] = os.Getenv("GITHUB_BASE_REF") + } + return tags } diff --git a/internal/civisibility/utils/ci_providers_test.go b/internal/civisibility/utils/ci_providers_test.go index b85acc1efc..8aeed064e7 100644 --- a/internal/civisibility/utils/ci_providers_test.go +++ b/internal/civisibility/utils/ci_providers_test.go @@ -13,6 +13,8 @@ import ( "path/filepath" "strings" "testing" + + "gopkg.in/DataDog/dd-trace-go.v1/internal/civisibility/constants" ) func setEnvs(t *testing.T, env map[string]string) { @@ -114,3 +116,43 @@ func TestTags(t *testing.T) { }) } } + +func TestGitHubEventFile(t *testing.T) { + originalEventPath := os.Getenv("GITHUB_EVENT_PATH") + originalBaseRef := os.Getenv("GITHUB_BASE_REF") + defer func() { + os.Setenv("GITHUB_EVENT_PATH", originalEventPath) + os.Setenv("GITHUB_BASE_REF", originalBaseRef) + }() + + os.Unsetenv("GITHUB_EVENT_PATH") + os.Unsetenv("GITHUB_BASE_REF") + + checkValue := func(tags map[string]string, key, expectedValue string) { + if tags[key] != expectedValue { + t.Fatalf("Key: %s, the actual value (%s) is different to the expected value (%s)", key, tags[key], expectedValue) + } + } + + t.Run("with event file", func(t *testing.T) { + eventFile := "testdata/fixtures/github-event.json" + t.Setenv("GITHUB_EVENT_PATH", eventFile) + t.Setenv("GITHUB_BASE_REF", "my-base-ref") // this should be ignored in favor of the event file value + + tags := extractGithubActions() + expectedHeadCommit := "df289512a51123083a8e6931dd6f57bb3883d4c4" + expectedBaseCommit := "52e0974c74d41160a03d59ddc73bb9f5adab054b" + expectedBaseRef := "main" + + checkValue(tags, constants.GitHeadCommit, expectedHeadCommit) + checkValue(tags, constants.GitPrBaseCommit, expectedBaseCommit) + checkValue(tags, constants.GitPrBaseBranch, expectedBaseRef) + }) + + t.Run("no event file", func(t *testing.T) { + t.Setenv("GITHUB_BASE_REF", "my-base-ref") // this should be ignored in favor of the event file value + + tags := extractGithubActions() + checkValue(tags, constants.GitPrBaseBranch, "my-base-ref") + }) +} diff --git a/internal/civisibility/utils/testdata/fixtures/github-event.json b/internal/civisibility/utils/testdata/fixtures/github-event.json new file mode 100644 index 0000000000..b9fe79f2aa --- /dev/null +++ b/internal/civisibility/utils/testdata/fixtures/github-event.json @@ -0,0 +1,490 @@ +{ + "action": "synchronize", + "after": "df289512a51123083a8e6931dd6f57bb3883d4c4", + "before": "f659d2fdd7bedffb40d9ab223dbde6afa5eadc32", + "number": 1, + "pull_request": { + "_links": { + "comments": { + "href": "https://api.github.com/repos/nikita-tkachenko-datadog/ci-test-project/issues/1/comments" + }, + "commits": { + "href": "https://api.github.com/repos/nikita-tkachenko-datadog/ci-test-project/pulls/1/commits" + }, + "html": { + "href": "https://github.com/nikita-tkachenko-datadog/ci-test-project/pull/1" + }, + "issue": { + "href": "https://api.github.com/repos/nikita-tkachenko-datadog/ci-test-project/issues/1" + }, + "review_comment": { + "href": "https://api.github.com/repos/nikita-tkachenko-datadog/ci-test-project/pulls/comments{/number}" + }, + "review_comments": { + "href": "https://api.github.com/repos/nikita-tkachenko-datadog/ci-test-project/pulls/1/comments" + }, + "self": { + "href": "https://api.github.com/repos/nikita-tkachenko-datadog/ci-test-project/pulls/1" + }, + "statuses": { + "href": "https://api.github.com/repos/nikita-tkachenko-datadog/ci-test-project/statuses/df289512a51123083a8e6931dd6f57bb3883d4c4" + } + }, + "active_lock_reason": null, + "additions": 2, + "assignee": null, + "assignees": [], + "author_association": "OWNER", + "auto_merge": null, + "base": { + "label": "nikita-tkachenko-datadog:main", + "ref": "main", + "repo": { + "allow_auto_merge": false, + "allow_forking": true, + "allow_merge_commit": true, + "allow_rebase_merge": true, + "allow_squash_merge": true, + "allow_update_branch": false, + "archive_url": "https://api.github.com/repos/nikita-tkachenko-datadog/ci-test-project/{archive_format}{/ref}", + "archived": false, + "assignees_url": "https://api.github.com/repos/nikita-tkachenko-datadog/ci-test-project/assignees{/user}", + "blobs_url": "https://api.github.com/repos/nikita-tkachenko-datadog/ci-test-project/git/blobs{/sha}", + "branches_url": "https://api.github.com/repos/nikita-tkachenko-datadog/ci-test-project/branches{/branch}", + "clone_url": "https://github.com/nikita-tkachenko-datadog/ci-test-project.git", + "collaborators_url": "https://api.github.com/repos/nikita-tkachenko-datadog/ci-test-project/collaborators{/collaborator}", + "comments_url": "https://api.github.com/repos/nikita-tkachenko-datadog/ci-test-project/comments{/number}", + "commits_url": "https://api.github.com/repos/nikita-tkachenko-datadog/ci-test-project/commits{/sha}", + "compare_url": "https://api.github.com/repos/nikita-tkachenko-datadog/ci-test-project/compare/{base}...{head}", + "contents_url": "https://api.github.com/repos/nikita-tkachenko-datadog/ci-test-project/contents/{+path}", + "contributors_url": "https://api.github.com/repos/nikita-tkachenko-datadog/ci-test-project/contributors", + "created_at": "2023-01-09T10:24:06Z", + "default_branch": "main", + "delete_branch_on_merge": false, + "deployments_url": "https://api.github.com/repos/nikita-tkachenko-datadog/ci-test-project/deployments", + "description": null, + "disabled": false, + "downloads_url": "https://api.github.com/repos/nikita-tkachenko-datadog/ci-test-project/downloads", + "events_url": "https://api.github.com/repos/nikita-tkachenko-datadog/ci-test-project/events", + "fork": false, + "forks": 0, + "forks_count": 0, + "forks_url": "https://api.github.com/repos/nikita-tkachenko-datadog/ci-test-project/forks", + "full_name": "nikita-tkachenko-datadog/ci-test-project", + "git_commits_url": "https://api.github.com/repos/nikita-tkachenko-datadog/ci-test-project/git/commits{/sha}", + "git_refs_url": "https://api.github.com/repos/nikita-tkachenko-datadog/ci-test-project/git/refs{/sha}", + "git_tags_url": "https://api.github.com/repos/nikita-tkachenko-datadog/ci-test-project/git/tags{/sha}", + "git_url": "git://github.com/nikita-tkachenko-datadog/ci-test-project.git", + "has_discussions": false, + "has_downloads": true, + "has_issues": true, + "has_pages": false, + "has_projects": true, + "has_wiki": false, + "homepage": null, + "hooks_url": "https://api.github.com/repos/nikita-tkachenko-datadog/ci-test-project/hooks", + "html_url": "https://github.com/nikita-tkachenko-datadog/ci-test-project", + "id": 586827266, + "is_template": false, + "issue_comment_url": "https://api.github.com/repos/nikita-tkachenko-datadog/ci-test-project/issues/comments{/number}", + "issue_events_url": "https://api.github.com/repos/nikita-tkachenko-datadog/ci-test-project/issues/events{/number}", + "issues_url": "https://api.github.com/repos/nikita-tkachenko-datadog/ci-test-project/issues{/number}", + "keys_url": "https://api.github.com/repos/nikita-tkachenko-datadog/ci-test-project/keys{/key_id}", + "labels_url": "https://api.github.com/repos/nikita-tkachenko-datadog/ci-test-project/labels{/name}", + "language": "Shell", + "languages_url": "https://api.github.com/repos/nikita-tkachenko-datadog/ci-test-project/languages", + "license": null, + "merge_commit_message": "PR_TITLE", + "merge_commit_title": "MERGE_MESSAGE", + "merges_url": "https://api.github.com/repos/nikita-tkachenko-datadog/ci-test-project/merges", + "milestones_url": "https://api.github.com/repos/nikita-tkachenko-datadog/ci-test-project/milestones{/number}", + "mirror_url": null, + "name": "ci-test-project", + "node_id": "R_kgDOIvpGAg", + "notifications_url": "https://api.github.com/repos/nikita-tkachenko-datadog/ci-test-project/notifications{?since,all,participating}", + "open_issues": 1, + "open_issues_count": 1, + "owner": { + "avatar_url": "https://avatars.githubusercontent.com/u/121111529?v=4", + "events_url": "https://api.github.com/users/nikita-tkachenko-datadog/events{/privacy}", + "followers_url": "https://api.github.com/users/nikita-tkachenko-datadog/followers", + "following_url": "https://api.github.com/users/nikita-tkachenko-datadog/following{/other_user}", + "gists_url": "https://api.github.com/users/nikita-tkachenko-datadog/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/nikita-tkachenko-datadog", + "id": 121111529, + "login": "nikita-tkachenko-datadog", + "node_id": "U_kgDOBzgD6Q", + "organizations_url": "https://api.github.com/users/nikita-tkachenko-datadog/orgs", + "received_events_url": "https://api.github.com/users/nikita-tkachenko-datadog/received_events", + "repos_url": "https://api.github.com/users/nikita-tkachenko-datadog/repos", + "site_admin": false, + "starred_url": "https://api.github.com/users/nikita-tkachenko-datadog/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/nikita-tkachenko-datadog/subscriptions", + "type": "User", + "url": "https://api.github.com/users/nikita-tkachenko-datadog" + }, + "private": true, + "pulls_url": "https://api.github.com/repos/nikita-tkachenko-datadog/ci-test-project/pulls{/number}", + "pushed_at": "2024-09-11T15:12:25Z", + "releases_url": "https://api.github.com/repos/nikita-tkachenko-datadog/ci-test-project/releases{/id}", + "size": 90, + "squash_merge_commit_message": "COMMIT_MESSAGES", + "squash_merge_commit_title": "COMMIT_OR_PR_TITLE", + "ssh_url": "git@github.com:nikita-tkachenko-datadog/ci-test-project.git", + "stargazers_count": 0, + "stargazers_url": "https://api.github.com/repos/nikita-tkachenko-datadog/ci-test-project/stargazers", + "statuses_url": "https://api.github.com/repos/nikita-tkachenko-datadog/ci-test-project/statuses/{sha}", + "subscribers_url": "https://api.github.com/repos/nikita-tkachenko-datadog/ci-test-project/subscribers", + "subscription_url": "https://api.github.com/repos/nikita-tkachenko-datadog/ci-test-project/subscription", + "svn_url": "https://github.com/nikita-tkachenko-datadog/ci-test-project", + "tags_url": "https://api.github.com/repos/nikita-tkachenko-datadog/ci-test-project/tags", + "teams_url": "https://api.github.com/repos/nikita-tkachenko-datadog/ci-test-project/teams", + "topics": [], + "trees_url": "https://api.github.com/repos/nikita-tkachenko-datadog/ci-test-project/git/trees{/sha}", + "updated_at": "2024-09-11T13:41:11Z", + "url": "https://api.github.com/repos/nikita-tkachenko-datadog/ci-test-project", + "use_squash_pr_title_as_default": false, + "visibility": "private", + "watchers": 0, + "watchers_count": 0, + "web_commit_signoff_required": false + }, + "sha": "52e0974c74d41160a03d59ddc73bb9f5adab054b", + "user": { + "avatar_url": "https://avatars.githubusercontent.com/u/121111529?v=4", + "events_url": "https://api.github.com/users/nikita-tkachenko-datadog/events{/privacy}", + "followers_url": "https://api.github.com/users/nikita-tkachenko-datadog/followers", + "following_url": "https://api.github.com/users/nikita-tkachenko-datadog/following{/other_user}", + "gists_url": "https://api.github.com/users/nikita-tkachenko-datadog/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/nikita-tkachenko-datadog", + "id": 121111529, + "login": "nikita-tkachenko-datadog", + "node_id": "U_kgDOBzgD6Q", + "organizations_url": "https://api.github.com/users/nikita-tkachenko-datadog/orgs", + "received_events_url": "https://api.github.com/users/nikita-tkachenko-datadog/received_events", + "repos_url": "https://api.github.com/users/nikita-tkachenko-datadog/repos", + "site_admin": false, + "starred_url": "https://api.github.com/users/nikita-tkachenko-datadog/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/nikita-tkachenko-datadog/subscriptions", + "type": "User", + "url": "https://api.github.com/users/nikita-tkachenko-datadog" + } + }, + "body": "# What Does This Do\r\n\r\n# Motivation\r\n\r\n# Additional Notes\r\n", + "changed_files": 3, + "closed_at": null, + "comments": 0, + "comments_url": "https://api.github.com/repos/nikita-tkachenko-datadog/ci-test-project/issues/1/comments", + "commits": 2, + "commits_url": "https://api.github.com/repos/nikita-tkachenko-datadog/ci-test-project/pulls/1/commits", + "created_at": "2024-09-11T15:08:02Z", + "deletions": 0, + "diff_url": "https://github.com/nikita-tkachenko-datadog/ci-test-project/pull/1.diff", + "draft": false, + "head": { + "label": "nikita-tkachenko-datadog:test-branch", + "ref": "test-branch", + "repo": { + "allow_auto_merge": false, + "allow_forking": true, + "allow_merge_commit": true, + "allow_rebase_merge": true, + "allow_squash_merge": true, + "allow_update_branch": false, + "archive_url": "https://api.github.com/repos/nikita-tkachenko-datadog/ci-test-project/{archive_format}{/ref}", + "archived": false, + "assignees_url": "https://api.github.com/repos/nikita-tkachenko-datadog/ci-test-project/assignees{/user}", + "blobs_url": "https://api.github.com/repos/nikita-tkachenko-datadog/ci-test-project/git/blobs{/sha}", + "branches_url": "https://api.github.com/repos/nikita-tkachenko-datadog/ci-test-project/branches{/branch}", + "clone_url": "https://github.com/nikita-tkachenko-datadog/ci-test-project.git", + "collaborators_url": "https://api.github.com/repos/nikita-tkachenko-datadog/ci-test-project/collaborators{/collaborator}", + "comments_url": "https://api.github.com/repos/nikita-tkachenko-datadog/ci-test-project/comments{/number}", + "commits_url": "https://api.github.com/repos/nikita-tkachenko-datadog/ci-test-project/commits{/sha}", + "compare_url": "https://api.github.com/repos/nikita-tkachenko-datadog/ci-test-project/compare/{base}...{head}", + "contents_url": "https://api.github.com/repos/nikita-tkachenko-datadog/ci-test-project/contents/{+path}", + "contributors_url": "https://api.github.com/repos/nikita-tkachenko-datadog/ci-test-project/contributors", + "created_at": "2023-01-09T10:24:06Z", + "default_branch": "main", + "delete_branch_on_merge": false, + "deployments_url": "https://api.github.com/repos/nikita-tkachenko-datadog/ci-test-project/deployments", + "description": null, + "disabled": false, + "downloads_url": "https://api.github.com/repos/nikita-tkachenko-datadog/ci-test-project/downloads", + "events_url": "https://api.github.com/repos/nikita-tkachenko-datadog/ci-test-project/events", + "fork": false, + "forks": 0, + "forks_count": 0, + "forks_url": "https://api.github.com/repos/nikita-tkachenko-datadog/ci-test-project/forks", + "full_name": "nikita-tkachenko-datadog/ci-test-project", + "git_commits_url": "https://api.github.com/repos/nikita-tkachenko-datadog/ci-test-project/git/commits{/sha}", + "git_refs_url": "https://api.github.com/repos/nikita-tkachenko-datadog/ci-test-project/git/refs{/sha}", + "git_tags_url": "https://api.github.com/repos/nikita-tkachenko-datadog/ci-test-project/git/tags{/sha}", + "git_url": "git://github.com/nikita-tkachenko-datadog/ci-test-project.git", + "has_discussions": false, + "has_downloads": true, + "has_issues": true, + "has_pages": false, + "has_projects": true, + "has_wiki": false, + "homepage": null, + "hooks_url": "https://api.github.com/repos/nikita-tkachenko-datadog/ci-test-project/hooks", + "html_url": "https://github.com/nikita-tkachenko-datadog/ci-test-project", + "id": 586827266, + "is_template": false, + "issue_comment_url": "https://api.github.com/repos/nikita-tkachenko-datadog/ci-test-project/issues/comments{/number}", + "issue_events_url": "https://api.github.com/repos/nikita-tkachenko-datadog/ci-test-project/issues/events{/number}", + "issues_url": "https://api.github.com/repos/nikita-tkachenko-datadog/ci-test-project/issues{/number}", + "keys_url": "https://api.github.com/repos/nikita-tkachenko-datadog/ci-test-project/keys{/key_id}", + "labels_url": "https://api.github.com/repos/nikita-tkachenko-datadog/ci-test-project/labels{/name}", + "language": "Shell", + "languages_url": "https://api.github.com/repos/nikita-tkachenko-datadog/ci-test-project/languages", + "license": null, + "merge_commit_message": "PR_TITLE", + "merge_commit_title": "MERGE_MESSAGE", + "merges_url": "https://api.github.com/repos/nikita-tkachenko-datadog/ci-test-project/merges", + "milestones_url": "https://api.github.com/repos/nikita-tkachenko-datadog/ci-test-project/milestones{/number}", + "mirror_url": null, + "name": "ci-test-project", + "node_id": "R_kgDOIvpGAg", + "notifications_url": "https://api.github.com/repos/nikita-tkachenko-datadog/ci-test-project/notifications{?since,all,participating}", + "open_issues": 1, + "open_issues_count": 1, + "owner": { + "avatar_url": "https://avatars.githubusercontent.com/u/121111529?v=4", + "events_url": "https://api.github.com/users/nikita-tkachenko-datadog/events{/privacy}", + "followers_url": "https://api.github.com/users/nikita-tkachenko-datadog/followers", + "following_url": "https://api.github.com/users/nikita-tkachenko-datadog/following{/other_user}", + "gists_url": "https://api.github.com/users/nikita-tkachenko-datadog/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/nikita-tkachenko-datadog", + "id": 121111529, + "login": "nikita-tkachenko-datadog", + "node_id": "U_kgDOBzgD6Q", + "organizations_url": "https://api.github.com/users/nikita-tkachenko-datadog/orgs", + "received_events_url": "https://api.github.com/users/nikita-tkachenko-datadog/received_events", + "repos_url": "https://api.github.com/users/nikita-tkachenko-datadog/repos", + "site_admin": false, + "starred_url": "https://api.github.com/users/nikita-tkachenko-datadog/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/nikita-tkachenko-datadog/subscriptions", + "type": "User", + "url": "https://api.github.com/users/nikita-tkachenko-datadog" + }, + "private": true, + "pulls_url": "https://api.github.com/repos/nikita-tkachenko-datadog/ci-test-project/pulls{/number}", + "pushed_at": "2024-09-11T15:12:25Z", + "releases_url": "https://api.github.com/repos/nikita-tkachenko-datadog/ci-test-project/releases{/id}", + "size": 90, + "squash_merge_commit_message": "COMMIT_MESSAGES", + "squash_merge_commit_title": "COMMIT_OR_PR_TITLE", + "ssh_url": "git@github.com:nikita-tkachenko-datadog/ci-test-project.git", + "stargazers_count": 0, + "stargazers_url": "https://api.github.com/repos/nikita-tkachenko-datadog/ci-test-project/stargazers", + "statuses_url": "https://api.github.com/repos/nikita-tkachenko-datadog/ci-test-project/statuses/{sha}", + "subscribers_url": "https://api.github.com/repos/nikita-tkachenko-datadog/ci-test-project/subscribers", + "subscription_url": "https://api.github.com/repos/nikita-tkachenko-datadog/ci-test-project/subscription", + "svn_url": "https://github.com/nikita-tkachenko-datadog/ci-test-project", + "tags_url": "https://api.github.com/repos/nikita-tkachenko-datadog/ci-test-project/tags", + "teams_url": "https://api.github.com/repos/nikita-tkachenko-datadog/ci-test-project/teams", + "topics": [], + "trees_url": "https://api.github.com/repos/nikita-tkachenko-datadog/ci-test-project/git/trees{/sha}", + "updated_at": "2024-09-11T13:41:11Z", + "url": "https://api.github.com/repos/nikita-tkachenko-datadog/ci-test-project", + "use_squash_pr_title_as_default": false, + "visibility": "private", + "watchers": 0, + "watchers_count": 0, + "web_commit_signoff_required": false + }, + "sha": "df289512a51123083a8e6931dd6f57bb3883d4c4", + "user": { + "avatar_url": "https://avatars.githubusercontent.com/u/121111529?v=4", + "events_url": "https://api.github.com/users/nikita-tkachenko-datadog/events{/privacy}", + "followers_url": "https://api.github.com/users/nikita-tkachenko-datadog/followers", + "following_url": "https://api.github.com/users/nikita-tkachenko-datadog/following{/other_user}", + "gists_url": "https://api.github.com/users/nikita-tkachenko-datadog/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/nikita-tkachenko-datadog", + "id": 121111529, + "login": "nikita-tkachenko-datadog", + "node_id": "U_kgDOBzgD6Q", + "organizations_url": "https://api.github.com/users/nikita-tkachenko-datadog/orgs", + "received_events_url": "https://api.github.com/users/nikita-tkachenko-datadog/received_events", + "repos_url": "https://api.github.com/users/nikita-tkachenko-datadog/repos", + "site_admin": false, + "starred_url": "https://api.github.com/users/nikita-tkachenko-datadog/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/nikita-tkachenko-datadog/subscriptions", + "type": "User", + "url": "https://api.github.com/users/nikita-tkachenko-datadog" + } + }, + "html_url": "https://github.com/nikita-tkachenko-datadog/ci-test-project/pull/1", + "id": 2066570986, + "issue_url": "https://api.github.com/repos/nikita-tkachenko-datadog/ci-test-project/issues/1", + "labels": [], + "locked": false, + "maintainer_can_modify": false, + "merge_commit_sha": "d9a3212d0d5d1483426dbbdf0beea32ee50abcde", + "mergeable": null, + "mergeable_state": "unknown", + "merged": false, + "merged_at": null, + "merged_by": null, + "milestone": null, + "node_id": "PR_kwDOIvpGAs57LV7q", + "number": 1, + "patch_url": "https://github.com/nikita-tkachenko-datadog/ci-test-project/pull/1.patch", + "rebaseable": null, + "requested_reviewers": [], + "requested_teams": [], + "review_comment_url": "https://api.github.com/repos/nikita-tkachenko-datadog/ci-test-project/pulls/comments{/number}", + "review_comments": 0, + "review_comments_url": "https://api.github.com/repos/nikita-tkachenko-datadog/ci-test-project/pulls/1/comments", + "state": "open", + "statuses_url": "https://api.github.com/repos/nikita-tkachenko-datadog/ci-test-project/statuses/df289512a51123083a8e6931dd6f57bb3883d4c4", + "title": "Test commit", + "updated_at": "2024-09-11T15:12:26Z", + "url": "https://api.github.com/repos/nikita-tkachenko-datadog/ci-test-project/pulls/1", + "user": { + "avatar_url": "https://avatars.githubusercontent.com/u/121111529?v=4", + "events_url": "https://api.github.com/users/nikita-tkachenko-datadog/events{/privacy}", + "followers_url": "https://api.github.com/users/nikita-tkachenko-datadog/followers", + "following_url": "https://api.github.com/users/nikita-tkachenko-datadog/following{/other_user}", + "gists_url": "https://api.github.com/users/nikita-tkachenko-datadog/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/nikita-tkachenko-datadog", + "id": 121111529, + "login": "nikita-tkachenko-datadog", + "node_id": "U_kgDOBzgD6Q", + "organizations_url": "https://api.github.com/users/nikita-tkachenko-datadog/orgs", + "received_events_url": "https://api.github.com/users/nikita-tkachenko-datadog/received_events", + "repos_url": "https://api.github.com/users/nikita-tkachenko-datadog/repos", + "site_admin": false, + "starred_url": "https://api.github.com/users/nikita-tkachenko-datadog/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/nikita-tkachenko-datadog/subscriptions", + "type": "User", + "url": "https://api.github.com/users/nikita-tkachenko-datadog" + } + }, + "repository": { + "allow_forking": true, + "archive_url": "https://api.github.com/repos/nikita-tkachenko-datadog/ci-test-project/{archive_format}{/ref}", + "archived": false, + "assignees_url": "https://api.github.com/repos/nikita-tkachenko-datadog/ci-test-project/assignees{/user}", + "blobs_url": "https://api.github.com/repos/nikita-tkachenko-datadog/ci-test-project/git/blobs{/sha}", + "branches_url": "https://api.github.com/repos/nikita-tkachenko-datadog/ci-test-project/branches{/branch}", + "clone_url": "https://github.com/nikita-tkachenko-datadog/ci-test-project.git", + "collaborators_url": "https://api.github.com/repos/nikita-tkachenko-datadog/ci-test-project/collaborators{/collaborator}", + "comments_url": "https://api.github.com/repos/nikita-tkachenko-datadog/ci-test-project/comments{/number}", + "commits_url": "https://api.github.com/repos/nikita-tkachenko-datadog/ci-test-project/commits{/sha}", + "compare_url": "https://api.github.com/repos/nikita-tkachenko-datadog/ci-test-project/compare/{base}...{head}", + "contents_url": "https://api.github.com/repos/nikita-tkachenko-datadog/ci-test-project/contents/{+path}", + "contributors_url": "https://api.github.com/repos/nikita-tkachenko-datadog/ci-test-project/contributors", + "created_at": "2023-01-09T10:24:06Z", + "default_branch": "main", + "deployments_url": "https://api.github.com/repos/nikita-tkachenko-datadog/ci-test-project/deployments", + "description": null, + "disabled": false, + "downloads_url": "https://api.github.com/repos/nikita-tkachenko-datadog/ci-test-project/downloads", + "events_url": "https://api.github.com/repos/nikita-tkachenko-datadog/ci-test-project/events", + "fork": false, + "forks": 0, + "forks_count": 0, + "forks_url": "https://api.github.com/repos/nikita-tkachenko-datadog/ci-test-project/forks", + "full_name": "nikita-tkachenko-datadog/ci-test-project", + "git_commits_url": "https://api.github.com/repos/nikita-tkachenko-datadog/ci-test-project/git/commits{/sha}", + "git_refs_url": "https://api.github.com/repos/nikita-tkachenko-datadog/ci-test-project/git/refs{/sha}", + "git_tags_url": "https://api.github.com/repos/nikita-tkachenko-datadog/ci-test-project/git/tags{/sha}", + "git_url": "git://github.com/nikita-tkachenko-datadog/ci-test-project.git", + "has_discussions": false, + "has_downloads": true, + "has_issues": true, + "has_pages": false, + "has_projects": true, + "has_wiki": false, + "homepage": null, + "hooks_url": "https://api.github.com/repos/nikita-tkachenko-datadog/ci-test-project/hooks", + "html_url": "https://github.com/nikita-tkachenko-datadog/ci-test-project", + "id": 586827266, + "is_template": false, + "issue_comment_url": "https://api.github.com/repos/nikita-tkachenko-datadog/ci-test-project/issues/comments{/number}", + "issue_events_url": "https://api.github.com/repos/nikita-tkachenko-datadog/ci-test-project/issues/events{/number}", + "issues_url": "https://api.github.com/repos/nikita-tkachenko-datadog/ci-test-project/issues{/number}", + "keys_url": "https://api.github.com/repos/nikita-tkachenko-datadog/ci-test-project/keys{/key_id}", + "labels_url": "https://api.github.com/repos/nikita-tkachenko-datadog/ci-test-project/labels{/name}", + "language": "Shell", + "languages_url": "https://api.github.com/repos/nikita-tkachenko-datadog/ci-test-project/languages", + "license": null, + "merges_url": "https://api.github.com/repos/nikita-tkachenko-datadog/ci-test-project/merges", + "milestones_url": "https://api.github.com/repos/nikita-tkachenko-datadog/ci-test-project/milestones{/number}", + "mirror_url": null, + "name": "ci-test-project", + "node_id": "R_kgDOIvpGAg", + "notifications_url": "https://api.github.com/repos/nikita-tkachenko-datadog/ci-test-project/notifications{?since,all,participating}", + "open_issues": 1, + "open_issues_count": 1, + "owner": { + "avatar_url": "https://avatars.githubusercontent.com/u/121111529?v=4", + "events_url": "https://api.github.com/users/nikita-tkachenko-datadog/events{/privacy}", + "followers_url": "https://api.github.com/users/nikita-tkachenko-datadog/followers", + "following_url": "https://api.github.com/users/nikita-tkachenko-datadog/following{/other_user}", + "gists_url": "https://api.github.com/users/nikita-tkachenko-datadog/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/nikita-tkachenko-datadog", + "id": 121111529, + "login": "nikita-tkachenko-datadog", + "node_id": "U_kgDOBzgD6Q", + "organizations_url": "https://api.github.com/users/nikita-tkachenko-datadog/orgs", + "received_events_url": "https://api.github.com/users/nikita-tkachenko-datadog/received_events", + "repos_url": "https://api.github.com/users/nikita-tkachenko-datadog/repos", + "site_admin": false, + "starred_url": "https://api.github.com/users/nikita-tkachenko-datadog/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/nikita-tkachenko-datadog/subscriptions", + "type": "User", + "url": "https://api.github.com/users/nikita-tkachenko-datadog" + }, + "private": true, + "pulls_url": "https://api.github.com/repos/nikita-tkachenko-datadog/ci-test-project/pulls{/number}", + "pushed_at": "2024-09-11T15:12:25Z", + "releases_url": "https://api.github.com/repos/nikita-tkachenko-datadog/ci-test-project/releases{/id}", + "size": 90, + "ssh_url": "git@github.com:nikita-tkachenko-datadog/ci-test-project.git", + "stargazers_count": 0, + "stargazers_url": "https://api.github.com/repos/nikita-tkachenko-datadog/ci-test-project/stargazers", + "statuses_url": "https://api.github.com/repos/nikita-tkachenko-datadog/ci-test-project/statuses/{sha}", + "subscribers_url": "https://api.github.com/repos/nikita-tkachenko-datadog/ci-test-project/subscribers", + "subscription_url": "https://api.github.com/repos/nikita-tkachenko-datadog/ci-test-project/subscription", + "svn_url": "https://github.com/nikita-tkachenko-datadog/ci-test-project", + "tags_url": "https://api.github.com/repos/nikita-tkachenko-datadog/ci-test-project/tags", + "teams_url": "https://api.github.com/repos/nikita-tkachenko-datadog/ci-test-project/teams", + "topics": [], + "trees_url": "https://api.github.com/repos/nikita-tkachenko-datadog/ci-test-project/git/trees{/sha}", + "updated_at": "2024-09-11T13:41:11Z", + "url": "https://api.github.com/repos/nikita-tkachenko-datadog/ci-test-project", + "visibility": "private", + "watchers": 0, + "watchers_count": 0, + "web_commit_signoff_required": false + }, + "sender": { + "avatar_url": "https://avatars.githubusercontent.com/u/121111529?v=4", + "events_url": "https://api.github.com/users/nikita-tkachenko-datadog/events{/privacy}", + "followers_url": "https://api.github.com/users/nikita-tkachenko-datadog/followers", + "following_url": "https://api.github.com/users/nikita-tkachenko-datadog/following{/other_user}", + "gists_url": "https://api.github.com/users/nikita-tkachenko-datadog/gists{/gist_id}", + "gravatar_id": "", + "html_url": "https://github.com/nikita-tkachenko-datadog", + "id": 121111529, + "login": "nikita-tkachenko-datadog", + "node_id": "U_kgDOBzgD6Q", + "organizations_url": "https://api.github.com/users/nikita-tkachenko-datadog/orgs", + "received_events_url": "https://api.github.com/users/nikita-tkachenko-datadog/received_events", + "repos_url": "https://api.github.com/users/nikita-tkachenko-datadog/repos", + "site_admin": false, + "starred_url": "https://api.github.com/users/nikita-tkachenko-datadog/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/nikita-tkachenko-datadog/subscriptions", + "type": "User", + "url": "https://api.github.com/users/nikita-tkachenko-datadog" + } +}