diff --git a/README.md b/README.md index cd152838..636b09ad 100644 --- a/README.md +++ b/README.md @@ -339,23 +339,43 @@ gitReplaceChars: 'ab/' The above configuration replaces all occurences of the characters 'a', 'b' and '/' in the branch title. +## Automatically link pull request with issue + +This app can automatically link a pull request to the issue for which the issue +branch (of the pull request) was created. You can enable this feature with: + +```yaml +autoLinkIssue: true +``` + +Be aware that the app needs to be able to find the issue number in the branch +name, otherwise this feature will not work. This feature only works if one of +the following is true for your app configuration: + +- You use the default `branchName` setting +- Your `branchName` setting is `tiny`, `short` or `full` +- Your branch name starts with the issue number +- Your branch name contains the string `issue-` (case insensitive) followed by + the issue number, for example: `Project-A-Issue-123-Rewrite_in_Clojure` + ## Automatically close issues after a pull request merge -This app can close issues automatically for you when a pull request for an issue branch is merged. You can enable this -feature with: +This app can close issues automatically for you when a pull request for an +issue branch is merged. You can enable this feature with: ```yaml autoCloseIssue: true ``` -Be aware that the app needs to be able to find the issue number in the branch name, otherwise this feature will not -work. This feature only works if one of the following is true for your app configuration: +Be aware that the app needs to be able to find the issue number in the branch +name, otherwise this feature will not work. This feature only works if one of +the following is true for your app configuration: - You use the default `branchName` setting - Your `branchName` setting is `tiny`, `short` or `full` - Your branch name starts with the issue number -- Your branch name contains the string `issue-` (case insensitive) followed by the issue number, for - example: `Project-A-Issue-123-Rewrite_in_Clojure` +- Your branch name contains the string `issue-` (case insensitive) followed by + the issue number, for example: `Project-A-Issue-123-Rewrite_in_Clojure` ## Default source branch diff --git a/src/config.js b/src/config.js index 3ddd5b9a..147a087d 100644 --- a/src/config.js +++ b/src/config.js @@ -76,6 +76,10 @@ function isExperimentalBranchNameArgument (config) { config.experimental.branchNameArgument === true) } +function autoLinkIssue (config) { + return 'autoLinkIssue' in config && config.autoLinkIssue === true +} + function autoCloseIssue (config) { return 'autoCloseIssue' in config && config.autoCloseIssue === true } @@ -243,6 +247,7 @@ module.exports = { isModeImmediate: isModeImmediate, isModeChatOps: isModeChatOps, getChatOpsCommandArgument: getChatOpsCommandArgument, + autoLinkIssue: autoLinkIssue, autoCloseIssue: autoCloseIssue, isSilent: isSilent, isChatOpsCommand: isChatOpsCommand, diff --git a/src/github.js b/src/github.js index 199ef1c1..4d5048b8 100644 --- a/src/github.js +++ b/src/github.js @@ -438,6 +438,14 @@ async function updatePrTitle (app, ctx, config, pr, issueTitle, labels) { } } +async function updatePrBody (app, ctx, config, pr, body) { + const owner = context.getRepoOwnerLogin(ctx) + const repo = context.getRepoName(ctx) + const pullNumber = pr.number + app.log.info(`Updating body for PR #${pullNumber} in ${owner}/${repo}`) + await ctx.octokit.pulls.update({ owner: owner, repo: repo, pull_number: pullNumber, body: body }) +} + module.exports = { createIssueBranch: createIssueBranch, addComment: addComment, @@ -452,5 +460,6 @@ module.exports = { getBranchName: getBranchName, createBranch: createBranch, createPr: createPr, - updatePrTitle: updatePrTitle + updatePrTitle: updatePrTitle, + updatePrBody: updatePrBody } diff --git a/src/webhooks/pull-request.js b/src/webhooks/pull-request.js index cb235283..a1199d56 100644 --- a/src/webhooks/pull-request.js +++ b/src/webhooks/pull-request.js @@ -20,6 +20,21 @@ async function handle (app, ctx) { } } } + if (Config.autoLinkIssue(config)) { + const pr = ctx.payload.pull_request + const branchName = pr.head.ref + const issueNumber = github.getIssueNumberFromBranchName(branchName) + if (issueNumber) { + const body = pr.body + const linkText = `closes #${issueNumber}` + if (!body) { + await github.updatePrBody(app, ctx, config, pr, linkText) + } else if (!body.includes(`closes #${issueNumber}`)) { + const updatedBody = body.length === 0 ? linkText : `${body}\n${linkText}` + await github.updatePrBody(app, ctx, config, pr, updatedBody) + } + } + } } module.exports = { diff --git a/tests/test-fixtures/pull_request.opened.json b/tests/test-fixtures/pull_request.opened.json new file mode 100644 index 00000000..fccf2a51 --- /dev/null +++ b/tests/test-fixtures/pull_request.opened.json @@ -0,0 +1,523 @@ +{ + "action": "opened", + "number": 53, + "pull_request": { + "url": "https://api.github.com/repos/facio-ergo-sum/test-repo-create-issue-branch-staging-app/pulls/53", + "id": 1623715160, + "node_id": "PR_kwDOD122ts5gx-1Y", + "html_url": "https://github.com/facio-ergo-sum/test-repo-create-issue-branch-staging-app/pull/53", + "diff_url": "https://github.com/facio-ergo-sum/test-repo-create-issue-branch-staging-app/pull/53.diff", + "patch_url": "https://github.com/facio-ergo-sum/test-repo-create-issue-branch-staging-app/pull/53.patch", + "issue_url": "https://api.github.com/repos/facio-ergo-sum/test-repo-create-issue-branch-staging-app/issues/53", + "number": 53, + "state": "open", + "locked": false, + "title": "Update README.md", + "user": { + "login": "robvanderleek", + "id": 5324924, + "node_id": "MDQ6VXNlcjUzMjQ5MjQ=", + "avatar_url": "https://avatars.githubusercontent.com/u/5324924?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/robvanderleek", + "html_url": "https://github.com/robvanderleek", + "followers_url": "https://api.github.com/users/robvanderleek/followers", + "following_url": "https://api.github.com/users/robvanderleek/following{/other_user}", + "gists_url": "https://api.github.com/users/robvanderleek/gists{/gist_id}", + "starred_url": "https://api.github.com/users/robvanderleek/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/robvanderleek/subscriptions", + "organizations_url": "https://api.github.com/users/robvanderleek/orgs", + "repos_url": "https://api.github.com/users/robvanderleek/repos", + "events_url": "https://api.github.com/users/robvanderleek/events{/privacy}", + "received_events_url": "https://api.github.com/users/robvanderleek/received_events", + "type": "User", + "site_admin": false + }, + "body": null, + "created_at": "2023-11-30T13:31:22Z", + "updated_at": "2023-11-30T13:31:22Z", + "closed_at": null, + "merged_at": null, + "merge_commit_sha": null, + "assignee": null, + "assignees": [ + + ], + "requested_reviewers": [ + + ], + "requested_teams": [ + + ], + "labels": [ + + ], + "milestone": null, + "draft": false, + "commits_url": "https://api.github.com/repos/facio-ergo-sum/test-repo-create-issue-branch-staging-app/pulls/53/commits", + "review_comments_url": "https://api.github.com/repos/facio-ergo-sum/test-repo-create-issue-branch-staging-app/pulls/53/comments", + "review_comment_url": "https://api.github.com/repos/facio-ergo-sum/test-repo-create-issue-branch-staging-app/pulls/comments{/number}", + "comments_url": "https://api.github.com/repos/facio-ergo-sum/test-repo-create-issue-branch-staging-app/issues/53/comments", + "statuses_url": "https://api.github.com/repos/facio-ergo-sum/test-repo-create-issue-branch-staging-app/statuses/f9dc669403cbbbfed1f1819b771089b4809749b2", + "head": { + "label": "facio-ergo-sum:issue-52-A_new_issue", + "ref": "issue-52-A_new_issue", + "sha": "f9dc669403cbbbfed1f1819b771089b4809749b2", + "user": { + "login": "facio-ergo-sum", + "id": 79683951, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc5NjgzOTUx", + "avatar_url": "https://avatars.githubusercontent.com/u/79683951?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/facio-ergo-sum", + "html_url": "https://github.com/facio-ergo-sum", + "followers_url": "https://api.github.com/users/facio-ergo-sum/followers", + "following_url": "https://api.github.com/users/facio-ergo-sum/following{/other_user}", + "gists_url": "https://api.github.com/users/facio-ergo-sum/gists{/gist_id}", + "starred_url": "https://api.github.com/users/facio-ergo-sum/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/facio-ergo-sum/subscriptions", + "organizations_url": "https://api.github.com/users/facio-ergo-sum/orgs", + "repos_url": "https://api.github.com/users/facio-ergo-sum/repos", + "events_url": "https://api.github.com/users/facio-ergo-sum/events{/privacy}", + "received_events_url": "https://api.github.com/users/facio-ergo-sum/received_events", + "type": "Organization", + "site_admin": false + }, + "repo": { + "id": 257799862, + "node_id": "MDEwOlJlcG9zaXRvcnkyNTc3OTk4NjI=", + "name": "test-repo-create-issue-branch-staging-app", + "full_name": "facio-ergo-sum/test-repo-create-issue-branch-staging-app", + "private": false, + "owner": { + "login": "facio-ergo-sum", + "id": 79683951, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc5NjgzOTUx", + "avatar_url": "https://avatars.githubusercontent.com/u/79683951?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/facio-ergo-sum", + "html_url": "https://github.com/facio-ergo-sum", + "followers_url": "https://api.github.com/users/facio-ergo-sum/followers", + "following_url": "https://api.github.com/users/facio-ergo-sum/following{/other_user}", + "gists_url": "https://api.github.com/users/facio-ergo-sum/gists{/gist_id}", + "starred_url": "https://api.github.com/users/facio-ergo-sum/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/facio-ergo-sum/subscriptions", + "organizations_url": "https://api.github.com/users/facio-ergo-sum/orgs", + "repos_url": "https://api.github.com/users/facio-ergo-sum/repos", + "events_url": "https://api.github.com/users/facio-ergo-sum/events{/privacy}", + "received_events_url": "https://api.github.com/users/facio-ergo-sum/received_events", + "type": "Organization", + "site_admin": false + }, + "html_url": "https://github.com/facio-ergo-sum/test-repo-create-issue-branch-staging-app", + "description": null, + "fork": false, + "url": "https://api.github.com/repos/facio-ergo-sum/test-repo-create-issue-branch-staging-app", + "forks_url": "https://api.github.com/repos/facio-ergo-sum/test-repo-create-issue-branch-staging-app/forks", + "keys_url": "https://api.github.com/repos/facio-ergo-sum/test-repo-create-issue-branch-staging-app/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/facio-ergo-sum/test-repo-create-issue-branch-staging-app/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/facio-ergo-sum/test-repo-create-issue-branch-staging-app/teams", + "hooks_url": "https://api.github.com/repos/facio-ergo-sum/test-repo-create-issue-branch-staging-app/hooks", + "issue_events_url": "https://api.github.com/repos/facio-ergo-sum/test-repo-create-issue-branch-staging-app/issues/events{/number}", + "events_url": "https://api.github.com/repos/facio-ergo-sum/test-repo-create-issue-branch-staging-app/events", + "assignees_url": "https://api.github.com/repos/facio-ergo-sum/test-repo-create-issue-branch-staging-app/assignees{/user}", + "branches_url": "https://api.github.com/repos/facio-ergo-sum/test-repo-create-issue-branch-staging-app/branches{/branch}", + "tags_url": "https://api.github.com/repos/facio-ergo-sum/test-repo-create-issue-branch-staging-app/tags", + "blobs_url": "https://api.github.com/repos/facio-ergo-sum/test-repo-create-issue-branch-staging-app/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/facio-ergo-sum/test-repo-create-issue-branch-staging-app/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/facio-ergo-sum/test-repo-create-issue-branch-staging-app/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/facio-ergo-sum/test-repo-create-issue-branch-staging-app/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/facio-ergo-sum/test-repo-create-issue-branch-staging-app/statuses/{sha}", + "languages_url": "https://api.github.com/repos/facio-ergo-sum/test-repo-create-issue-branch-staging-app/languages", + "stargazers_url": "https://api.github.com/repos/facio-ergo-sum/test-repo-create-issue-branch-staging-app/stargazers", + "contributors_url": "https://api.github.com/repos/facio-ergo-sum/test-repo-create-issue-branch-staging-app/contributors", + "subscribers_url": "https://api.github.com/repos/facio-ergo-sum/test-repo-create-issue-branch-staging-app/subscribers", + "subscription_url": "https://api.github.com/repos/facio-ergo-sum/test-repo-create-issue-branch-staging-app/subscription", + "commits_url": "https://api.github.com/repos/facio-ergo-sum/test-repo-create-issue-branch-staging-app/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/facio-ergo-sum/test-repo-create-issue-branch-staging-app/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/facio-ergo-sum/test-repo-create-issue-branch-staging-app/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/facio-ergo-sum/test-repo-create-issue-branch-staging-app/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/facio-ergo-sum/test-repo-create-issue-branch-staging-app/contents/{+path}", + "compare_url": "https://api.github.com/repos/facio-ergo-sum/test-repo-create-issue-branch-staging-app/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/facio-ergo-sum/test-repo-create-issue-branch-staging-app/merges", + "archive_url": "https://api.github.com/repos/facio-ergo-sum/test-repo-create-issue-branch-staging-app/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/facio-ergo-sum/test-repo-create-issue-branch-staging-app/downloads", + "issues_url": "https://api.github.com/repos/facio-ergo-sum/test-repo-create-issue-branch-staging-app/issues{/number}", + "pulls_url": "https://api.github.com/repos/facio-ergo-sum/test-repo-create-issue-branch-staging-app/pulls{/number}", + "milestones_url": "https://api.github.com/repos/facio-ergo-sum/test-repo-create-issue-branch-staging-app/milestones{/number}", + "notifications_url": "https://api.github.com/repos/facio-ergo-sum/test-repo-create-issue-branch-staging-app/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/facio-ergo-sum/test-repo-create-issue-branch-staging-app/labels{/name}", + "releases_url": "https://api.github.com/repos/facio-ergo-sum/test-repo-create-issue-branch-staging-app/releases{/id}", + "deployments_url": "https://api.github.com/repos/facio-ergo-sum/test-repo-create-issue-branch-staging-app/deployments", + "created_at": "2020-04-22T05:23:19Z", + "updated_at": "2021-11-29T17:22:10Z", + "pushed_at": "2023-11-30T13:31:22Z", + "git_url": "git://github.com/facio-ergo-sum/test-repo-create-issue-branch-staging-app.git", + "ssh_url": "git@github.com:facio-ergo-sum/test-repo-create-issue-branch-staging-app.git", + "clone_url": "https://github.com/facio-ergo-sum/test-repo-create-issue-branch-staging-app.git", + "svn_url": "https://github.com/facio-ergo-sum/test-repo-create-issue-branch-staging-app", + "homepage": "https://github.com/apps/create-issue-branch-staging", + "size": 16, + "stargazers_count": 1, + "watchers_count": 1, + "language": null, + "has_issues": true, + "has_projects": true, + "has_downloads": true, + "has_wiki": false, + "has_pages": false, + "has_discussions": false, + "forks_count": 3, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 2, + "license": null, + "allow_forking": true, + "is_template": false, + "web_commit_signoff_required": false, + "topics": [ + + ], + "visibility": "public", + "forks": 3, + "open_issues": 2, + "watchers": 1, + "default_branch": "main", + "allow_squash_merge": true, + "allow_merge_commit": true, + "allow_rebase_merge": true, + "allow_auto_merge": false, + "delete_branch_on_merge": false, + "allow_update_branch": false, + "use_squash_pr_title_as_default": false, + "squash_merge_commit_message": "COMMIT_MESSAGES", + "squash_merge_commit_title": "COMMIT_OR_PR_TITLE", + "merge_commit_message": "PR_TITLE", + "merge_commit_title": "MERGE_MESSAGE" + } + }, + "base": { + "label": "facio-ergo-sum:main", + "ref": "main", + "sha": "5e45b9e209c665d10ad319f76cc6a5fbcaed984a", + "user": { + "login": "facio-ergo-sum", + "id": 79683951, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc5NjgzOTUx", + "avatar_url": "https://avatars.githubusercontent.com/u/79683951?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/facio-ergo-sum", + "html_url": "https://github.com/facio-ergo-sum", + "followers_url": "https://api.github.com/users/facio-ergo-sum/followers", + "following_url": "https://api.github.com/users/facio-ergo-sum/following{/other_user}", + "gists_url": "https://api.github.com/users/facio-ergo-sum/gists{/gist_id}", + "starred_url": "https://api.github.com/users/facio-ergo-sum/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/facio-ergo-sum/subscriptions", + "organizations_url": "https://api.github.com/users/facio-ergo-sum/orgs", + "repos_url": "https://api.github.com/users/facio-ergo-sum/repos", + "events_url": "https://api.github.com/users/facio-ergo-sum/events{/privacy}", + "received_events_url": "https://api.github.com/users/facio-ergo-sum/received_events", + "type": "Organization", + "site_admin": false + }, + "repo": { + "id": 257799862, + "node_id": "MDEwOlJlcG9zaXRvcnkyNTc3OTk4NjI=", + "name": "test-repo-create-issue-branch-staging-app", + "full_name": "facio-ergo-sum/test-repo-create-issue-branch-staging-app", + "private": false, + "owner": { + "login": "facio-ergo-sum", + "id": 79683951, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc5NjgzOTUx", + "avatar_url": "https://avatars.githubusercontent.com/u/79683951?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/facio-ergo-sum", + "html_url": "https://github.com/facio-ergo-sum", + "followers_url": "https://api.github.com/users/facio-ergo-sum/followers", + "following_url": "https://api.github.com/users/facio-ergo-sum/following{/other_user}", + "gists_url": "https://api.github.com/users/facio-ergo-sum/gists{/gist_id}", + "starred_url": "https://api.github.com/users/facio-ergo-sum/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/facio-ergo-sum/subscriptions", + "organizations_url": "https://api.github.com/users/facio-ergo-sum/orgs", + "repos_url": "https://api.github.com/users/facio-ergo-sum/repos", + "events_url": "https://api.github.com/users/facio-ergo-sum/events{/privacy}", + "received_events_url": "https://api.github.com/users/facio-ergo-sum/received_events", + "type": "Organization", + "site_admin": false + }, + "html_url": "https://github.com/facio-ergo-sum/test-repo-create-issue-branch-staging-app", + "description": null, + "fork": false, + "url": "https://api.github.com/repos/facio-ergo-sum/test-repo-create-issue-branch-staging-app", + "forks_url": "https://api.github.com/repos/facio-ergo-sum/test-repo-create-issue-branch-staging-app/forks", + "keys_url": "https://api.github.com/repos/facio-ergo-sum/test-repo-create-issue-branch-staging-app/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/facio-ergo-sum/test-repo-create-issue-branch-staging-app/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/facio-ergo-sum/test-repo-create-issue-branch-staging-app/teams", + "hooks_url": "https://api.github.com/repos/facio-ergo-sum/test-repo-create-issue-branch-staging-app/hooks", + "issue_events_url": "https://api.github.com/repos/facio-ergo-sum/test-repo-create-issue-branch-staging-app/issues/events{/number}", + "events_url": "https://api.github.com/repos/facio-ergo-sum/test-repo-create-issue-branch-staging-app/events", + "assignees_url": "https://api.github.com/repos/facio-ergo-sum/test-repo-create-issue-branch-staging-app/assignees{/user}", + "branches_url": "https://api.github.com/repos/facio-ergo-sum/test-repo-create-issue-branch-staging-app/branches{/branch}", + "tags_url": "https://api.github.com/repos/facio-ergo-sum/test-repo-create-issue-branch-staging-app/tags", + "blobs_url": "https://api.github.com/repos/facio-ergo-sum/test-repo-create-issue-branch-staging-app/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/facio-ergo-sum/test-repo-create-issue-branch-staging-app/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/facio-ergo-sum/test-repo-create-issue-branch-staging-app/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/facio-ergo-sum/test-repo-create-issue-branch-staging-app/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/facio-ergo-sum/test-repo-create-issue-branch-staging-app/statuses/{sha}", + "languages_url": "https://api.github.com/repos/facio-ergo-sum/test-repo-create-issue-branch-staging-app/languages", + "stargazers_url": "https://api.github.com/repos/facio-ergo-sum/test-repo-create-issue-branch-staging-app/stargazers", + "contributors_url": "https://api.github.com/repos/facio-ergo-sum/test-repo-create-issue-branch-staging-app/contributors", + "subscribers_url": "https://api.github.com/repos/facio-ergo-sum/test-repo-create-issue-branch-staging-app/subscribers", + "subscription_url": "https://api.github.com/repos/facio-ergo-sum/test-repo-create-issue-branch-staging-app/subscription", + "commits_url": "https://api.github.com/repos/facio-ergo-sum/test-repo-create-issue-branch-staging-app/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/facio-ergo-sum/test-repo-create-issue-branch-staging-app/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/facio-ergo-sum/test-repo-create-issue-branch-staging-app/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/facio-ergo-sum/test-repo-create-issue-branch-staging-app/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/facio-ergo-sum/test-repo-create-issue-branch-staging-app/contents/{+path}", + "compare_url": "https://api.github.com/repos/facio-ergo-sum/test-repo-create-issue-branch-staging-app/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/facio-ergo-sum/test-repo-create-issue-branch-staging-app/merges", + "archive_url": "https://api.github.com/repos/facio-ergo-sum/test-repo-create-issue-branch-staging-app/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/facio-ergo-sum/test-repo-create-issue-branch-staging-app/downloads", + "issues_url": "https://api.github.com/repos/facio-ergo-sum/test-repo-create-issue-branch-staging-app/issues{/number}", + "pulls_url": "https://api.github.com/repos/facio-ergo-sum/test-repo-create-issue-branch-staging-app/pulls{/number}", + "milestones_url": "https://api.github.com/repos/facio-ergo-sum/test-repo-create-issue-branch-staging-app/milestones{/number}", + "notifications_url": "https://api.github.com/repos/facio-ergo-sum/test-repo-create-issue-branch-staging-app/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/facio-ergo-sum/test-repo-create-issue-branch-staging-app/labels{/name}", + "releases_url": "https://api.github.com/repos/facio-ergo-sum/test-repo-create-issue-branch-staging-app/releases{/id}", + "deployments_url": "https://api.github.com/repos/facio-ergo-sum/test-repo-create-issue-branch-staging-app/deployments", + "created_at": "2020-04-22T05:23:19Z", + "updated_at": "2021-11-29T17:22:10Z", + "pushed_at": "2023-11-30T13:31:22Z", + "git_url": "git://github.com/facio-ergo-sum/test-repo-create-issue-branch-staging-app.git", + "ssh_url": "git@github.com:facio-ergo-sum/test-repo-create-issue-branch-staging-app.git", + "clone_url": "https://github.com/facio-ergo-sum/test-repo-create-issue-branch-staging-app.git", + "svn_url": "https://github.com/facio-ergo-sum/test-repo-create-issue-branch-staging-app", + "homepage": "https://github.com/apps/create-issue-branch-staging", + "size": 16, + "stargazers_count": 1, + "watchers_count": 1, + "language": null, + "has_issues": true, + "has_projects": true, + "has_downloads": true, + "has_wiki": false, + "has_pages": false, + "has_discussions": false, + "forks_count": 3, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 2, + "license": null, + "allow_forking": true, + "is_template": false, + "web_commit_signoff_required": false, + "topics": [ + + ], + "visibility": "public", + "forks": 3, + "open_issues": 2, + "watchers": 1, + "default_branch": "main", + "allow_squash_merge": true, + "allow_merge_commit": true, + "allow_rebase_merge": true, + "allow_auto_merge": false, + "delete_branch_on_merge": false, + "allow_update_branch": false, + "use_squash_pr_title_as_default": false, + "squash_merge_commit_message": "COMMIT_MESSAGES", + "squash_merge_commit_title": "COMMIT_OR_PR_TITLE", + "merge_commit_message": "PR_TITLE", + "merge_commit_title": "MERGE_MESSAGE" + } + }, + "_links": { + "self": { + "href": "https://api.github.com/repos/facio-ergo-sum/test-repo-create-issue-branch-staging-app/pulls/53" + }, + "html": { + "href": "https://github.com/facio-ergo-sum/test-repo-create-issue-branch-staging-app/pull/53" + }, + "issue": { + "href": "https://api.github.com/repos/facio-ergo-sum/test-repo-create-issue-branch-staging-app/issues/53" + }, + "comments": { + "href": "https://api.github.com/repos/facio-ergo-sum/test-repo-create-issue-branch-staging-app/issues/53/comments" + }, + "review_comments": { + "href": "https://api.github.com/repos/facio-ergo-sum/test-repo-create-issue-branch-staging-app/pulls/53/comments" + }, + "review_comment": { + "href": "https://api.github.com/repos/facio-ergo-sum/test-repo-create-issue-branch-staging-app/pulls/comments{/number}" + }, + "commits": { + "href": "https://api.github.com/repos/facio-ergo-sum/test-repo-create-issue-branch-staging-app/pulls/53/commits" + }, + "statuses": { + "href": "https://api.github.com/repos/facio-ergo-sum/test-repo-create-issue-branch-staging-app/statuses/f9dc669403cbbbfed1f1819b771089b4809749b2" + } + }, + "author_association": "COLLABORATOR", + "auto_merge": null, + "active_lock_reason": null, + "merged": false, + "mergeable": null, + "rebaseable": null, + "mergeable_state": "unknown", + "merged_by": null, + "comments": 0, + "review_comments": 0, + "maintainer_can_modify": false, + "commits": 1, + "additions": 1, + "deletions": 0, + "changed_files": 1 + }, + "repository": { + "id": 257799862, + "node_id": "MDEwOlJlcG9zaXRvcnkyNTc3OTk4NjI=", + "name": "test-repo-create-issue-branch-staging-app", + "full_name": "facio-ergo-sum/test-repo-create-issue-branch-staging-app", + "private": false, + "owner": { + "login": "facio-ergo-sum", + "id": 79683951, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc5NjgzOTUx", + "avatar_url": "https://avatars.githubusercontent.com/u/79683951?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/facio-ergo-sum", + "html_url": "https://github.com/facio-ergo-sum", + "followers_url": "https://api.github.com/users/facio-ergo-sum/followers", + "following_url": "https://api.github.com/users/facio-ergo-sum/following{/other_user}", + "gists_url": "https://api.github.com/users/facio-ergo-sum/gists{/gist_id}", + "starred_url": "https://api.github.com/users/facio-ergo-sum/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/facio-ergo-sum/subscriptions", + "organizations_url": "https://api.github.com/users/facio-ergo-sum/orgs", + "repos_url": "https://api.github.com/users/facio-ergo-sum/repos", + "events_url": "https://api.github.com/users/facio-ergo-sum/events{/privacy}", + "received_events_url": "https://api.github.com/users/facio-ergo-sum/received_events", + "type": "Organization", + "site_admin": false + }, + "html_url": "https://github.com/facio-ergo-sum/test-repo-create-issue-branch-staging-app", + "description": null, + "fork": false, + "url": "https://api.github.com/repos/facio-ergo-sum/test-repo-create-issue-branch-staging-app", + "forks_url": "https://api.github.com/repos/facio-ergo-sum/test-repo-create-issue-branch-staging-app/forks", + "keys_url": "https://api.github.com/repos/facio-ergo-sum/test-repo-create-issue-branch-staging-app/keys{/key_id}", + "collaborators_url": "https://api.github.com/repos/facio-ergo-sum/test-repo-create-issue-branch-staging-app/collaborators{/collaborator}", + "teams_url": "https://api.github.com/repos/facio-ergo-sum/test-repo-create-issue-branch-staging-app/teams", + "hooks_url": "https://api.github.com/repos/facio-ergo-sum/test-repo-create-issue-branch-staging-app/hooks", + "issue_events_url": "https://api.github.com/repos/facio-ergo-sum/test-repo-create-issue-branch-staging-app/issues/events{/number}", + "events_url": "https://api.github.com/repos/facio-ergo-sum/test-repo-create-issue-branch-staging-app/events", + "assignees_url": "https://api.github.com/repos/facio-ergo-sum/test-repo-create-issue-branch-staging-app/assignees{/user}", + "branches_url": "https://api.github.com/repos/facio-ergo-sum/test-repo-create-issue-branch-staging-app/branches{/branch}", + "tags_url": "https://api.github.com/repos/facio-ergo-sum/test-repo-create-issue-branch-staging-app/tags", + "blobs_url": "https://api.github.com/repos/facio-ergo-sum/test-repo-create-issue-branch-staging-app/git/blobs{/sha}", + "git_tags_url": "https://api.github.com/repos/facio-ergo-sum/test-repo-create-issue-branch-staging-app/git/tags{/sha}", + "git_refs_url": "https://api.github.com/repos/facio-ergo-sum/test-repo-create-issue-branch-staging-app/git/refs{/sha}", + "trees_url": "https://api.github.com/repos/facio-ergo-sum/test-repo-create-issue-branch-staging-app/git/trees{/sha}", + "statuses_url": "https://api.github.com/repos/facio-ergo-sum/test-repo-create-issue-branch-staging-app/statuses/{sha}", + "languages_url": "https://api.github.com/repos/facio-ergo-sum/test-repo-create-issue-branch-staging-app/languages", + "stargazers_url": "https://api.github.com/repos/facio-ergo-sum/test-repo-create-issue-branch-staging-app/stargazers", + "contributors_url": "https://api.github.com/repos/facio-ergo-sum/test-repo-create-issue-branch-staging-app/contributors", + "subscribers_url": "https://api.github.com/repos/facio-ergo-sum/test-repo-create-issue-branch-staging-app/subscribers", + "subscription_url": "https://api.github.com/repos/facio-ergo-sum/test-repo-create-issue-branch-staging-app/subscription", + "commits_url": "https://api.github.com/repos/facio-ergo-sum/test-repo-create-issue-branch-staging-app/commits{/sha}", + "git_commits_url": "https://api.github.com/repos/facio-ergo-sum/test-repo-create-issue-branch-staging-app/git/commits{/sha}", + "comments_url": "https://api.github.com/repos/facio-ergo-sum/test-repo-create-issue-branch-staging-app/comments{/number}", + "issue_comment_url": "https://api.github.com/repos/facio-ergo-sum/test-repo-create-issue-branch-staging-app/issues/comments{/number}", + "contents_url": "https://api.github.com/repos/facio-ergo-sum/test-repo-create-issue-branch-staging-app/contents/{+path}", + "compare_url": "https://api.github.com/repos/facio-ergo-sum/test-repo-create-issue-branch-staging-app/compare/{base}...{head}", + "merges_url": "https://api.github.com/repos/facio-ergo-sum/test-repo-create-issue-branch-staging-app/merges", + "archive_url": "https://api.github.com/repos/facio-ergo-sum/test-repo-create-issue-branch-staging-app/{archive_format}{/ref}", + "downloads_url": "https://api.github.com/repos/facio-ergo-sum/test-repo-create-issue-branch-staging-app/downloads", + "issues_url": "https://api.github.com/repos/facio-ergo-sum/test-repo-create-issue-branch-staging-app/issues{/number}", + "pulls_url": "https://api.github.com/repos/facio-ergo-sum/test-repo-create-issue-branch-staging-app/pulls{/number}", + "milestones_url": "https://api.github.com/repos/facio-ergo-sum/test-repo-create-issue-branch-staging-app/milestones{/number}", + "notifications_url": "https://api.github.com/repos/facio-ergo-sum/test-repo-create-issue-branch-staging-app/notifications{?since,all,participating}", + "labels_url": "https://api.github.com/repos/facio-ergo-sum/test-repo-create-issue-branch-staging-app/labels{/name}", + "releases_url": "https://api.github.com/repos/facio-ergo-sum/test-repo-create-issue-branch-staging-app/releases{/id}", + "deployments_url": "https://api.github.com/repos/facio-ergo-sum/test-repo-create-issue-branch-staging-app/deployments", + "created_at": "2020-04-22T05:23:19Z", + "updated_at": "2021-11-29T17:22:10Z", + "pushed_at": "2023-11-30T13:31:22Z", + "git_url": "git://github.com/facio-ergo-sum/test-repo-create-issue-branch-staging-app.git", + "ssh_url": "git@github.com:facio-ergo-sum/test-repo-create-issue-branch-staging-app.git", + "clone_url": "https://github.com/facio-ergo-sum/test-repo-create-issue-branch-staging-app.git", + "svn_url": "https://github.com/facio-ergo-sum/test-repo-create-issue-branch-staging-app", + "homepage": "https://github.com/apps/create-issue-branch-staging", + "size": 16, + "stargazers_count": 1, + "watchers_count": 1, + "language": null, + "has_issues": true, + "has_projects": true, + "has_downloads": true, + "has_wiki": false, + "has_pages": false, + "has_discussions": false, + "forks_count": 3, + "mirror_url": null, + "archived": false, + "disabled": false, + "open_issues_count": 2, + "license": null, + "allow_forking": true, + "is_template": false, + "web_commit_signoff_required": false, + "topics": [ + + ], + "visibility": "public", + "forks": 3, + "open_issues": 2, + "watchers": 1, + "default_branch": "main", + "custom_properties": { + + } + }, + "organization": { + "login": "facio-ergo-sum", + "id": 79683951, + "node_id": "MDEyOk9yZ2FuaXphdGlvbjc5NjgzOTUx", + "url": "https://api.github.com/orgs/facio-ergo-sum", + "repos_url": "https://api.github.com/orgs/facio-ergo-sum/repos", + "events_url": "https://api.github.com/orgs/facio-ergo-sum/events", + "hooks_url": "https://api.github.com/orgs/facio-ergo-sum/hooks", + "issues_url": "https://api.github.com/orgs/facio-ergo-sum/issues", + "members_url": "https://api.github.com/orgs/facio-ergo-sum/members{/member}", + "public_members_url": "https://api.github.com/orgs/facio-ergo-sum/public_members{/member}", + "avatar_url": "https://avatars.githubusercontent.com/u/79683951?v=4", + "description": "" + }, + "sender": { + "login": "robvanderleek", + "id": 5324924, + "node_id": "MDQ6VXNlcjUzMjQ5MjQ=", + "avatar_url": "https://avatars.githubusercontent.com/u/5324924?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/robvanderleek", + "html_url": "https://github.com/robvanderleek", + "followers_url": "https://api.github.com/users/robvanderleek/followers", + "following_url": "https://api.github.com/users/robvanderleek/following{/other_user}", + "gists_url": "https://api.github.com/users/robvanderleek/gists{/gist_id}", + "starred_url": "https://api.github.com/users/robvanderleek/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/robvanderleek/subscriptions", + "organizations_url": "https://api.github.com/users/robvanderleek/orgs", + "repos_url": "https://api.github.com/users/robvanderleek/repos", + "events_url": "https://api.github.com/users/robvanderleek/events{/privacy}", + "received_events_url": "https://api.github.com/users/robvanderleek/received_events", + "type": "User", + "site_admin": false + }, + "installation": { + "id": 14973652, + "node_id": "MDIzOkludGVncmF0aW9uSW5zdGFsbGF0aW9uMTQ5NzM2NTI=" + } +} \ No newline at end of file