Skip to content

Allow jobs that are not named PR-.* #20

@ashu82492

Description

@ashu82492

I have set up the plugin for a multibranch pipeline. But the pull request comments are not triggering the build.
I was checking the plugin code.

There is a regex variable pullRequestJobNamePattern=Pattern.compile("^PR-" + pullRequestId + "\\b.*$", Pattern.CASE_INSENSITIVE)

https://github.com/jenkinsci/github-pr-comment-build-plugin/blob/master/src/main/java/com/adobe/jenkins/github_pr_comment_build/IssueCommentGHEventSubscriber.java#L94

It is being used to match with the job name.
https://github.com/jenkinsci/github-pr-comment-build-plugin/blob/master/src/main/java/com/adobe/jenkins/github_pr_comment_build/IssueCommentGHEventSubscriber.java#L136

I need help in understanding why does this pattern have to be matched with the job name. As I could understand, the job name contains pipeline name and branch name concatenated by a slash (pipelineName/jobName). I debugged the code, In my case, this pattern is not being matched and hence pipeline is not being triggered.

Thanks

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions