{"id":14984748,"url":"https://github.com/jenkinsci/pipeline-github-plugin","last_synced_at":"2025-10-05T14:31:42.791Z","repository":{"id":23787364,"uuid":"90785054","full_name":"jenkinsci/pipeline-github-plugin","owner":"jenkinsci","description":"Pipeline: GitHub","archived":false,"fork":true,"pushed_at":"2024-05-08T01:36:31.000Z","size":220,"stargazers_count":159,"open_issues_count":33,"forks_count":73,"subscribers_count":11,"default_branch":"master","last_synced_at":"2024-09-25T15:29:46.806Z","etag":null,"topics":["github","jenkins-pipeline","jenkins-plugin","pipeline"],"latest_commit_sha":null,"homepage":"https://plugins.jenkins.io/pipeline-github/","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"aaronjwhiteside/pipeline-github","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jenkinsci.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-05-09T19:39:50.000Z","updated_at":"2024-08-07T08:57:16.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/jenkinsci/pipeline-github-plugin","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jenkinsci%2Fpipeline-github-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jenkinsci%2Fpipeline-github-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jenkinsci%2Fpipeline-github-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jenkinsci%2Fpipeline-github-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jenkinsci","download_url":"https://codeload.github.com/jenkinsci/pipeline-github-plugin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219877021,"owners_count":16554818,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["github","jenkins-pipeline","jenkins-plugin","pipeline"],"created_at":"2024-09-24T14:09:36.595Z","updated_at":"2025-10-05T14:31:37.456Z","avatar_url":"https://github.com/jenkinsci.png","language":"Java","readme":"Table of Contents\n=================\n  * [Pipeline: GitHub](#pipeline-github)\n  * [License](#license)\n  * [Prerequisites](#prerequisites)\n  * [Credentials](#credentials)\n  * [Triggers](#triggers)\n    * [issueCommentTrigger](#issuecommenttrigger)\n    * [pullRequestReview](#pullrequestreview)\n  * [Global Variables](#global-variables)\n    * [pullRequest](#pullrequest)\n  * [Auxiliary Classes](#auxiliary-classes)\n    * [CommitStatus](#commitstatus)\n    * [Commit](#commit)\n    * [CommitFile](#commitfile)\n    * [IssueComment](#issuecomment)\n    * [ReviewComment](#reviewcomment)\n    * [Review](#review)\n    * [Milestone](#milestone)\n  * [Examples](#examples)\n\n\n# Pipeline: GitHub\nThe entry points for this plugin’s functionality are additional global variables, available to pipeline scripts when the plugin is enabled and the prerequisites are met.\n\n# License\nMIT\n\n# Prerequisites\n\n- Jenkins running Java 8 or higher.\n\n- Projects/jobs must be automatically created by the GitHub Organization folder/project type.\n\nSee: [GitHub Branch Source Plugin](https://go.cloudbees.com/docs/cloudbees-documentation/cje-user-guide/index.html#github-branch-source)\n\n# Credentials\n\nCurrently all operations against GitHub will be performed using the builds `GitHubSCMSource` credentials. These will typically be the `Scan Credentials` you configured in your GitHub Organization.\n\nHowever you can override this in a pipeline script by calling `setCredentials(String userName, String password)` before any properties or methods are accessed/invoked on the `pullRequest` global variable.\n\n```groovy\npullRequest.setCredentials('John.Smith', 'qwerty4321')\n```\n\nIf you plan to use this plugin to add/modify/remove comments, labels, commit statuses etc. Please ensure that the required permissions are assigned to the token supplied in the credentials (`Scan Credentials` or `Manually` supplied).\n\n# Triggers\n\nThis plugin adds the following pipeline triggers\n\n* issueCommentTrigger\n* pullRequestReview\n\n## issueCommentTrigger\n\n### Requirements\n\n- This trigger only works on Pull Requests, created by the GitHub Branch Source Plugin.\n- Currently this trigger will only allow collaborators of the repository in question to trigger builds.\n\n### Limitations\n\nThe Pull Request's job/build must have run at least once for the trigger to be registered. If an initial run never takes place then the trigger won't be registered and cannot pickup on any comments made.\n\nThis should not be an issue in practice, because a requirement of using this plugin is that your jobs are setup automatically by the GitHub Branch Source Plugin, which will trigger an initial build when it is notified of a new Pull Request.\n\n### Considerations\n\nThis trigger would be of limited usefulness for people wishing to build public GitHub/Jenkins bots, using pipeline scripts. As there is no way to ensure that a Pull Request's `Jenkinsfile` contains any triggers. Not to mention you would not want to trust just any `Jenkinsfile` from a random Pull Request/non-collaborator.\n\nThis trigger is intended to be used inside enterprise organizations:\n1. Where all branches and forks just contain a token `Jenkinsfile` that delegates to the real pipeline script, using [shared libraries](https://jenkins.io/doc/book/pipeline/shared-libraries/).\n2. Trust all their Pull Request authors.\n\n### Parameters\n\n- `commentPattern` (__Required__) - A Java style regular expression\n\n### Usage\n\n#### Scripted Pipeline:\n```groovy\nproperties([\n    pipelineTriggers([\n        issueCommentTrigger('.*test this please.*')\n    ])\n])\n```\n\n#### Declarative Pipeline:\n```groovy\npipeline {\n    triggers {\n        issueCommentTrigger('.*test this please.*')\n    }\n}\n```\n\n#### Detecting whether a build was started by the trigger in a script:\n\nNote that the following uses `currentBuild.rawBuild` and should therefore only\nbe done in a `@NonCPS` context. See [the workflow-cps-plugin Technical Design\n](https://github.com/jenkinsci/workflow-cps-plugin/blob/master/README.md#technical-design)\nfor more information.\n\n```groovy\ndef triggerCause = currentBuild.rawBuild.getCause(org.jenkinsci.plugins.pipeline.github.trigger.IssueCommentCause)\n\nif (triggerCause) {\n    echo(\"Build was started by ${triggerCause.userLogin}, who wrote: \" +\n         \"\\\"${triggerCause.comment}\\\", which matches the \" +\n         \"\\\"${triggerCause.triggerPattern}\\\" trigger pattern.\")\n} else {\n    echo('Build was not started by a trigger')\n}\n```\n\n#### Environment variables\n\nThe GitHub comment and author that triggered the build are exposed as environment variables (from version \u003e 2.5).\n\n* `GITHUB_COMMENT`\n* `GITHUB_COMMENT_AUTHOR`\n\n## pullRequestReview\n\n### Parameters\n\n- `reviewStates` (__Optional__) - A Java array of the PR review states you wish to trigger the build with. If not specified it will trigger for any review state. Possible states are `pending, approved, changes_requested, commented, dismissed`\n\n### Usage\n\n#### Scripted Pipeline:\n```groovy\nproperties([\n    pipelineTriggers([\n      pullRequestReview(reviewStates: ['approved'])\n    ])\n])\n```\n\n#### Declarative Pipeline:\n```groovy\npipeline {\n    triggers {\n      pullRequestReview(reviewStates: ['approved'])\n    }\n}\n```\n\n#### Detecting whether a build was started by the trigger in a script:\n\nNote that the following uses `currentBuild.rawBuild` and should therefore only\nbe done in a `@NonCPS` context. See [the workflow-cps-plugin Technical Design\n](https://github.com/jenkinsci/workflow-cps-plugin/blob/master/README.md#technical-design)\nfor more information.\n\n```groovy\ndef triggerCause = currentBuild.rawBuild.getCause(org.jenkinsci.plugins.pipeline.github.trigger.PullRequestReviewCause)\n\nif (triggerCause) {\n    echo(\"Build was started by ${triggerCause.userLogin}, who reviewed the PR: \" +\n         \"\\\"${triggerCause.state}\\\", which matches one of \" +\n         \"\\\"${triggerCause.reviewStates}\\\" trigger pattern.\")\n} else {\n    echo('Build was not started by a trigger')\n}\n```\n\n#### Environment variables\n\nThe GitHub review comment and author that triggered the build are exposed as environment variables (from version \u003e 2.8).\n\n* `GITHUB_REVIEW_COMMENT`\n* `GITHUB_REVIEW_AUTHOR`\n* `GITHUB_REVIEW_STATE`\n\n\n# Global Variables\n\n## `repository`\nComing soon!\n\n## `pullRequest`\n\n### Usage\n\nBefore you can use the `pullRequest` global variable you must ensure you are actually in a Pull Request build job. The best way to do this is to check for the existence of the `CHANGE_ID` environment variable.\n\n#### Scripted Pipeline:\n```groovy\nnode {\n    stage('Build') {\n        try {\n            echo 'Hello World'\n        } catch (err) {\n            // CHANGE_ID is set only for pull requests, so it is safe to access the pullRequest global variable\n            if (env.CHANGE_ID) {\n                pullRequest.addLabel('Build Failed')\n            }\n            throw err\n        }\n    }\n}\n```\n\n#### Declarative Pipeline:\n```groovy\npipeline {\n    agent any\n    stages {\n        stage('Build') {\n            steps {\n                echo 'Hello World'\n            }\n        }\n    }\n    post {\n        failure {\n            script {\n                // CHANGE_ID is set only for pull requests, so it is safe to access the pullRequest global variable\n                if (env.CHANGE_ID) {\n                    pullRequest.addLabel('Build Failed')\n                }\n            }\n        }\n    }\n}\n```\n\n### Properties\n\nName | Type | Setter   | Description\n-----|------|----------|------------\nid | `Integer` | false |\nstate | `String` | **true** | Valid values `open` or `closed`\nnumber | `Integer` | false\nurl | `String` | false\npatchUrl | `String` | false\ndiffUrl | `String` | false\nissueUrl | `String` | false\ntitle | `String` | **true**\nbody | `String` | **true**\nlocked | `Boolean` | **true** | Accepts `true`, `false` or `'true'`, `'false'`\nmilestone | `Milestone` | **true** | Setter accepts int or Milestone class.\nhead | `String` | false | Revision (SHA) of the head commit of this pull request\nheadRef | `String` | false | Name of the branch this pull request is created for\nbase | `String` | **true** | Name of the base branch in the current repository this pull request targets\nfiles | `Iterable\u003cCommitFile\u003e` | false\nassignees | `Iterable\u003cString\u003e` | **true** | Accepts a `List\u003cString\u003e`\ncommits | `Iterable\u003cCommit\u003e` | false\ncomments | `Iterable\u003cIssueComment\u003e` | false\nreviewComments | `Iterable\u003cReviewComment\u003e` | false\nlabels | `Iterable\u003cString\u003e` | **true** | Accepts a `List\u003cString\u003e`\nstatuses | `Iterable\u003cCommitStatus\u003e` | false\nrequestedReviewers | `Iterable\u003cString\u003e` | false\nreviews | `Iterable\u003cReview\u003e` | false\nupdatedAt | `Date` | false\ncreatedAt | `Date` | false\ncreatedBy | `String` | false\nclosedAt | `Date` | false\nclosedBy | `String` | false\nmergedAt | `Date` | false\nmergedBy | `String` | false\ncommitCount | `Integer` | false\ncommentCount | `Integer` | false\nadditions | `Integer` | false\ndeletions | `Integer` | false\nchangedFiles | `Integer` | false\nmerged | `Boolean` | false\nmergeable | `Boolean` | false\nmergeCommitSha | `String` | false\nmergeableState | `String` | false\nmaintainerCanModify | `Boolean` | **true** | Accepts `true`, `false` or `'true'`, `'false'`\ndraft | `Boolean` | false\n\n\n### Methods\n\n#### Merge\n\n\u003e String merge(__[String commitTitle, String commitMessage, String sha, String mergeMethod]__)\n\nReturns the merge's SHA/commit id.\n\n#### Commit Status\n\n\u003e CommitStatus createStatus(String status __[, String context, String description, String targetUrl]__)\n\n#### Labels\n\u003e void addLabels(List\u003cString\u003e labels)\n\n\u003e void removeLabel(String label)\n\n#### Assignees\n\u003e void addAssignees(List\u003cString\u003e assignees)\n\n\u003e void removeAssignees(List\u003cString\u003e assignees)\n\n#### Reviews\n\u003e void review(String event)\n\n\u003e void review(String event, String body)\n\n\u003e void review(String commitId, String event, String body)\n\n#### Review Comments\n\u003e ReviewComment reviewComment(String commitId, String path, int position, String body)\n\n\u003e ReviewComment editReviewComment(long commentId, String body)\n\n\u003e ReviewComment replyToReviewComment(long commentId, String body)\n\n\u003e void deleteReviewComment(long commentId)\n\n#### Pull Request Comments (Issue Comments)\n\u003e IssueComment comment(String body)\n\n\u003e IssueComment editComment(long commentId, String body)\n\n\u003e void deleteComment(long commentId)\n\n### Requested Reviewers\n\u003e Iterable\u003cString\u003e getRequestedReviewers\u003c\u003e()\n\n\u003e void createReviewRequests(List\u003cString\u003e reviewers)\n\n\u003e void createTeamReviewRequests(List\u003cString\u003e teams)\n\n\u003e Iterable\u003cString\u003e getRequestedTeamReviewers\u003c\u003e()\n\n\u003e void deleteReviewRequests(List\u003cString\u003e reviewers)\n\n\u003e void deleteTeamReviewRequests(List\u003cString\u003e teams)\n\n### Delete Branch\n\u003e void deleteBranch()\n\n#### Misc\n\u003e void setCredentials(String userName, String password)\n\n# Auxiliary Classes\n\n## CommitStatus\n### Properties\nName | Type | Setter | Description\n-----|------|----------|------------\nid | `String` | false |\nurl | `String` | false\nstate | `String` | false | One of `pending`, `success`, `failure` or `error`\ncontext | `String` | false\ndescription | `String` | false\ntargetUrl | `String` | false\ncreatedAt | `Date` | false\nupdatedAt | `Date` | false\ncreator | `String` | false\n\n### Methods\nNone.\n\n## Commit\n### Properties\nName | Type | Setter | Description\n-----|------|----------|------------\nsha | `String` | false\nurl | `String` | false\nauthor | `String` | false\ncommitter | `String` | false\nparents | `Iterable\u003cString\u003e` | false | List of parent commit SHA's\nmessage | `String` | false |\ncommentCount | `Integer` | false\ncomments | `Iterable\u003cReviewComment\u003e` | false\nadditions | `Integer` | false\ndeletions | `Integer` | false\ntotalChanges | `Integer` | false\nfiles | `Iterable\u003cCommitFile\u003e` | false | List of files added, removed and or modified in this commit\nstatuses | `Iterable\u003cCommitStatus\u003e` | false | List of statuses associated with this commit\n\n### Methods\n#### Commit Status\n\u003e CommitStatus createStatus(String status __[, String context, String description, String targetUrl]__)\n\n#### Review Comment\n\u003e ReviewComment comment(String body __[, String path, Integer position]__)\n\n## CommitFile\n### Properties\nName | Type | Setter | Description\n-----|------|----------|------------\nsha | `String` | false\nfilename | `String` | false\nstatus | `String` | false\npatch | `String` | false\nadditions | `Integer` | false\ndeletions | `Integer` | false\nchanges | `Integer` | false\nrawUrl | `String` | false\nblobUrl | `String` | false\n\n### Methods\nNone.\n\n## IssueComment\n### Properties\nName | Type | Setter | Description\n-----|------|----------|------------\nid | `Integer` | false\nurl | `String` | false\nuser | `String` | false\nbody | `String` | **true**\ncreatedAt | `Date` | false\nupdatedAt | `Date` | false\n\n### Methods\n\u003e void delete()\n\n## ReviewComment\n### Properties\nName | Type | Setter | Description\n-----|------|----------|------------\nid | `Long` | false\nurl | `String` | false\nuser | `String` | false\ncreatedAt | `Date` | false\nupdatedAt | `Date` | false\ncommitId | `String` | false\noriginalCommitId | `Long` | false\nbody | `String` | **true**\npath | `String` | false\nline | `Integer` | false | This will always return `null` as the GitHub APIs no longer return `line`, use `position` instead.\nposition | `Integer` | false\noriginalPosition | `Integer` | false\ndiffHunk | `String` | false\npullRequestUrl | `String` | false\npullRequestReviewId | `Long` | false\ninReplyToId | `Long` | false\n\n### Methods\n\u003e void delete()\n\n\n## Review\n### Properties\nName | Type | Setter | Description\n-----|------|----------|------------\nid | `long` | false\nuser | `String` | false\nbody | `String` | false\ncommitId | `String` | false\nstate | `String` | One of APPROVED, PENDING, CHANGES_REQUESTED, DISMISSED, COMMENTED\n\n### Methods\nNone.\n\n## Milestone\n### Properties\nName | Type | Setter | Description\n-----|------|----------|------------\nnumber | `Integer` | false\ncreatedAt | `Date` | false\ndueOn | `Date` | false\nupdatedAt | `Date` | false\nclosedAt | `Date` | false\nclosedIssues | `Integer` | false\nopenIssues | `Integer` | false\ndescription | `String` | false\nstate | `String` | false\ntitle | `String` | false\nurl | `String` | false\ncreator | `String` | false\n\n### Methods\nNone.\n\n\n# Examples\n\n## Pull Requests\n\n### Updating a Pull Request's title and body\n```groovy\npullRequest.title = 'Updated title'\npullRequest.body = pullRequest.body + '\\nEdited by Pipeline'\n```\n\n### Closing a Pull Request\n```groovy\npullRequest.status = 'closed'\n```\n\n### Creating a Commit Status against the head of the Pull Request\n```groovy\npullRequest.createStatus(status: 'success',\n                         context: 'continuous-integration/jenkins/pr-merge/tests',\n                         description: 'All tests are passing',\n                         targetUrl: \"${env.JOB_URL}/testResults\")\n```\n\n### Locking and unlocking a Pull Request's conversation\n```groovy\nif (pullRequest.locked) {\n    pullRequest.locked = false\n}\n```\n\n### Merging a Pull Request\n```groovy\nif (pullRequest.mergeable) {\n    pullRequest.merge('merge commit message here')\n}\n// or\nif (pullRequest.mergeable) {\n    pullRequest.merge(commitTitle: 'Make it so..', commitMessage: 'TO BOLDLY GO WHERE NO MAN HAS GONE BEFORE...', mergeMethod: 'squash')\n}\n```\n\n### Adding a label\n```groovy\npullRequest.addLabel('Build Passing')\n```\n\n### Removing a label\n```groovy\npullRequest.removeLabel('Build Passing')\n```\n\n### Replacing all labels\n```groovy\npullRequest.labels = ['Bug', 'Feature']\n```\n\n### Adding an assignee\n```groovy\npullRequest.addAssignee('Spock')\n```\n\n### Removing an assignee\n```groovy\npullRequest.removeAssignee('McCoy')\n```\n\n### Replacing all assignees\n```groovy\npullRequest.assignees = ['Data', 'Scotty']\n```\n\n### Listing all added/modified/removed files\n```groovy\nfor (commitFile in pullRequest.files) {\n    echo \"SHA: ${commitFile.sha} File Name: ${commitFile.filename} Status: ${commitFile.status}\"\n}\n```\n\n### Adding a review\n```groovy\npullRequest.review('APPROVE')\n// or\npullRequest.review('REQUEST_CHANGES', 'Change is the essential process of all existence.')\n// or\ndef commitId = 'SHA of the commit containing the change/file you wish to review' // if unspecified, defaults to the most recent commit\ndef event = 'REQUEST_CHANGES' // valid review events: APPROVE, REQUEST_CHANGES, COMMENT\ndef body = 'Change is the essential process of all existence.' // body is required when event equals REQUEST_CHANGES or COMMENT\npullRequest.review(commitId, event, body)\n```\n\n### Adding a comment\n```groovy\ndef comment = pullRequest.comment('This PR is highly illogical..')\n```\n\n### Editing a comment\n```groovy\npullRequest.editComment(comment.id, 'Live long and prosper.')\n// or\ncomment.body = 'Live long and prosper.'\n```\n\n### Deleting a comment\n```groovy\npullRequest.deleteComment(commentId)\n// or\ncomment.delete()\n```\n\n### Adding a review comment\n```groovy\ndef commitId = 'SHA of the commit containing the change/file you wish to review';\ndef path = 'src/main/java/Main.java'\ndef lineNumber = 5\ndef body = 'The review comment'\ndef comment = pullRequest.reviewComment(commitId, path, lineNumber, body)\n```\n\n### Editing a review comment\n```groovy\npullRequest.editReviewComment(comment.id, 'Live long and prosper.')\n// or\ncomment.body = 'Live long and prosper.'\n```\n\n### Deleting a review comment\n```groovy\npullRequest.deleteReviewComment(comment.id)\n// or\ncomment.delete()\n```\n\n### Replying to a review comment\n```groovy\npullRequest.replyToReviewComment(comment.id, 'Khaaannnn!')\n// or\ncomment.createReply('Khaaannnn!')\n```\n\n### Listing a Pull Request's commits\n```groovy\nfor (commit in pullRequest.commits) {\n   echo \"SHA: ${commit.sha}, Committer: ${commit.committer}, Commit Message: ${commit.message}\"\n}\n```\n\n### Listing a Pull Request's comments\n```groovy\nfor (comment in pullRequest.comments) {\n  echo \"Author: ${comment.user}, Comment: ${comment.body}\"\n}\n```\n\n### Listing a Pull Request's review comments\n```groovy\nfor (reviewComment in pullRequest.reviewComments) {\n  echo \"File: ${reviewComment.path}, Position: ${reviewComment.position}, Author: ${reviewComment.user}, Comment: ${reviewComment.body}\"\n}\n```\n\n### Listing a commit's statuses\n```groovy\nfor (commit in pullRequest.commits) {\n  for (status  in commit.statuses) {\n     echo \"Commit: ${commit.sha}, State: ${status.state}, Context: ${status.context}, URL: ${status.targetUrl}\"\n  }\n}\n```\n\n### Creating a Commit Status against arbitrary commits\n```groovy\nfor (commit in pullRequest.commits) {\n  commit.createStatus(status: 'pending')\n}\n```\n\n### Listing a Pull Request's current statuses\n```groovy\nfor (status in pullRequest.statuses) {\n  echo \"Commit: ${pullRequest.head}, State: ${status.state}, Context: ${status.context}, URL: ${status.targetUrl}\"\n}\n```\n\n### Listing a Pull Request's requested reviewers\n```groovy\nfor (requestedReviewer in pullRequest.requestedReviewers) {\n  echo \"${requestedReviewer} was requested to review this Pull Request\"\n}\n```\n\n### Listing a Pull Request's requested team reviewers\n```groovy\nfor (requestedTeamReviewer in pullRequest.requestedTeamReviewers) {\n  echo \"${requestedTeamReviewer} was requested to review this Pull Request\"\n}\n```\n\n### Listing a Pull Request's reviews\n```groovy\nfor (review in pullRequest.reviews) {\n  echo \"${review.user} has a review in ${review.state} state for Pull Request. Review body: ${review.body}\"\n}\n```\n\n### Requesting reviewers\n```groovy\npullRequest.createReviewRequests(['Spock', 'McCoy'])\n```\n\n### Deleting requested reviewers\n```groovy\npullRequest.deleteReviewRequests(['McCoy'])\n```\n\n### Requesting team reviewers\n```groovy\npullRequest.createTeamReviewRequests(['justice-league'])\n```\n\n### Deleting requested team reviewers\n```groovy\npullRequest.deleteTeamReviewRequests(['justice-league'])\n```\n\n### Deleting a branch of the pull request after Merging the pull request\n```groovy\npullRequest.merge(pullRequest.title)\npullRequest.deleteBranch()\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjenkinsci%2Fpipeline-github-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjenkinsci%2Fpipeline-github-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjenkinsci%2Fpipeline-github-plugin/lists"}