{"id":14984796,"url":"https://github.com/jenkinsci/github-pr-comment-build-plugin","last_synced_at":"2026-03-15T09:06:03.987Z","repository":{"id":18371992,"uuid":"79159993","full_name":"jenkinsci/github-pr-comment-build-plugin","owner":"jenkinsci","description":null,"archived":false,"fork":false,"pushed_at":"2025-10-04T23:15:45.000Z","size":251,"stargazers_count":25,"open_issues_count":3,"forks_count":25,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-10-05T01:10:18.779Z","etag":null,"topics":["github","jenkins-pipeline"],"latest_commit_sha":null,"homepage":"https://plugins.jenkins.io/github-pr-comment-build","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"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","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2017-01-16T21:13:24.000Z","updated_at":"2025-10-04T23:15:41.000Z","dependencies_parsed_at":"2025-05-07T21:44:22.563Z","dependency_job_id":null,"html_url":"https://github.com/jenkinsci/github-pr-comment-build-plugin","commit_stats":{"total_commits":77,"total_committers":13,"mean_commits":5.923076923076923,"dds":0.4155844155844156,"last_synced_commit":"c8919acf2a6b0442bff10a0e445a72c4cc1dcf08"},"previous_names":[],"tags_count":21,"template":false,"template_full_name":null,"purl":"pkg:github/jenkinsci/github-pr-comment-build-plugin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jenkinsci%2Fgithub-pr-comment-build-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jenkinsci%2Fgithub-pr-comment-build-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jenkinsci%2Fgithub-pr-comment-build-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jenkinsci%2Fgithub-pr-comment-build-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jenkinsci","download_url":"https://codeload.github.com/jenkinsci/github-pr-comment-build-plugin/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jenkinsci%2Fgithub-pr-comment-build-plugin/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30539525,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-15T07:17:37.589Z","status":"ssl_error","status_checked_at":"2026-03-15T07:17:31.738Z","response_time":61,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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"],"created_at":"2024-09-24T14:09:40.957Z","updated_at":"2026-03-15T09:06:03.953Z","avatar_url":"https://github.com/jenkinsci.png","language":"Java","readme":"\u003e NOTE: This plugin is incompatible with version 2.177 of Jenkins.\n\u003e Upgrading to 2.260 solves the issue. Please see #24 for more information.\n\n# GitHub Pull Request Comment Build Plugin\n\n[![Jenkins Plugin](https://img.shields.io/jenkins/plugin/v/github-pr-comment-build.svg)](https://plugins.jenkins.io/github-pr-comment-build)\n[![Jenkins Plugin Installs](https://img.shields.io/jenkins/plugin/i/github-pr-comment-build.svg?color=blue)](https://plugins.jenkins.io/github-pr-comment-build)\n\n## About this plugin\n\nThis plugin listens for comments on pull requests and will trigger a GitHub multibranch\njob if a comment body matches the configured value, such as \"rerun the build\".\nThis is implemented as a branch property on multibranch jobs.\n\n### Setup\n\nFor the plugin to work your multibranch job must use one of the \"Discover pull requests from...\" behaviors.\nFor example:\n![GitHub Multibranch PR Behavior](docs/pull-request-behavior.png)\n\nTo enable the plugin's functionality, simply add one or more of the branch properties from\nthis plugin to the multibranch job and configure the regular expression to\nmatch against the comment body.\n\n![GitHub Multibranch Job Configuration](docs/branch-property-strategy.png)\n\nPlease ensure that you have a GitHub server properly connected via the Jenkins configuration,\nor else the plugin will not operate correctly.\n\n### Regular expression matching\n\nThe regex is not surrounded with any markers and uses the\n`Pattern.CASE_INSENSITIVE` and `Pattern.DOTALL` Java flags.\n\nFor example, `^rerun the build$` only matches comments that contain no other\ntext besides \"rerun the build\" (case insensitive), while `rebuild` would match\ncomments such as\n\n```\nPlease\nrebuild this\n```\n\nand\n\n```\nCommence the rebuilding\n```\n\nIf no pattern is provided, `^REBUILD$` is used.\n\n### Untrusted Builds\nThis plugin only triggers builds from trusted users.\nThis is an incompatible change since July 2022 releases of the plugin.\nIf you would like untrusted users to be able to trigger builds,\ncheck the \"Allow Untrusted Users\" checkbox. Use this feature with caution because\nit may open up security issues with your Jenkins infrastructure.\n\n### Using the PR Comment in a Pipeline Script\n\nIn order to use a PR comment in a pipeline script, the following code may be utilized. Note that this\ndepends on an experimental pipeline method call (`currentBuild.getCauses`) which may break in the future.\n\n```groovy\n// Comments\ndef commentCauses = currentBuild.getBuildCauses(\"com.adobe.jenkins.github_pr_comment_build.GitHubPullRequestCommentCause\")\nif (commentCauses) {\n    for (def commentCause : commentCauses) {\n        echo(\"\"\"Comment Author: ${commentCause.commentAuthor}, Body: \"${commentCause.commentBody}\" (${commentCause.commentUrl})\"\"\")\n    }\n} else {\n    echo(\"Build was not started by a PR comment\")\n}\n\n// Labels\ndef labelCauses = currentBuild.getBuildCauses(\"com.adobe.jenkins.github_pr_comment_build.GitHubPullRequestLabelCause\")\nif (labelCauses) {\n    for (def labelCause : labelCauses) {\n        echo(\"\"\"Label Author: ${labelCause.labellingAuthor}, Label: \"${labelCause.label}\" (${labelCause.labelUrl})\"\"\")\n    }\n} else {\n    echo(\"Build was not started by a PR label\")\n}\n\n// Reviews\ndef reviewCauses = currentBuild.getBuildCauses(\"com.adobe.jenkins.github_pr_comment_build.GitHubPullRequestReviewCause\")\nif (reviewCauses) {\n    for (def reviewCause : reviewCauses) {\n        echo(\"\"\"Review Author: ${reviewCause.reviewAuthor} (${reviewCause.pullRequestUrl})\"\"\")\n    }\n} else {\n    echo(\"Build was not started by a PR review\")\n}\n\n// Updates\ndef updateCauses = currentBuild.getBuildCauses(\"com.adobe.jenkins.github_pr_comment_build.GitHubPullRequestUpdateCause\")\nif (updateCauses) {\n    for (def updateCause : updateCauses) {\n        echo(\"\"\"Update Author: ${updateCause.updateAuthor} (${updateCause.pullRequestUrl})\"\"\")\n    }\n} else {\n    echo(\"Build was not started by a PR update\")\n}\n```\n\n### GitHub organization folders\n\nWhen using the GitHub organization folders approach to creating multibranch\npipeline jobs, the branch properties may not be edited [according to\ndesign](https://issues.jenkins-ci.org/browse/JENKINS-33900?focusedCommentId=326187\u0026page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-326187).\nInstead, use the functionality built into the GitHub Plugin with using the\n[issueCommentTrigger](https://github.com/jenkinsci/pipeline-github-plugin#issuecommenttrigger)\nin your pipeline script. This works in a similar way to this plugin. The main\nadvantage of this plugin is that it may be used from the Job DSL plugin to\ncreate jobs with this branch property already added (in the case when you don't\ntrust pipeline scripts, etc).\n\n## Changelog\n\n### Latest (Post September 20, 2021)\n\n### Incremental Releases\n\nReleases starting with `58.v945be9f1661f` have been moved to incremental\nversioning. See the release history and log on the\n[releases page](https://github.com/jenkinsci/github-pr-comment-build-plugin/releases).\n\n### Older releases\n\n#### 2.2 (November 6, 2020)\n\nAdd GitHub comment body in the cause object when a build is triggered\n(thanks to @jebentier for PR #25).\n\n#### 2.0 (June 15, 2017)\n\nSupport newer SCM/branch source plugins. Use this release if you are\nusing the 2.x releases of the SCM API-related plugins.\n\n#### 1.1 (March 6, 2017)\n\nAdd support for building a job when a PR title or body is updated as\nwell by using a separate branch property.\n\n#### 1.0 (January 23, 2017)\n\nInitial release\n\n\n## Plugin maintenance\n\n### Releasing new versions\n\nUse the instructions found [in the Jenkins docs](https://www.jenkins.io/doc/developer/publishing/releasing/) for GitHub\nreleases. The main point here is to make sure the PR that releases a new feature has the \"enhancement\" label on it, and\nthis will automatically trigger a new release.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjenkinsci%2Fgithub-pr-comment-build-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjenkinsci%2Fgithub-pr-comment-build-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjenkinsci%2Fgithub-pr-comment-build-plugin/lists"}