jenkinsci / pipeline-github-plugin

Pipeline: GitHub
https://plugins.jenkins.io/pipeline-github/
MIT License
159 stars 73 forks source link

PullRequest global variable is not shown in Global Variable Reference page. #123

Open Pldi23 opened 1 year ago

Pldi23 commented 1 year ago

Jenkins and plugins versions report

Environment ```text Paste the output here ```

What Operating System are you using (both controller, and any agents involved in the problem)?

I'm using mac, but it's not important.

Reproduction steps

Step 1. Navigate to {JENKINS_URL}/jenkins/job/{pipeline_job_name}/pipeline-syntax/globals and see the list of available global vars, but pullRequest var is missing.

Expected Results

When user navigate to {JENKINS_URL}/jenkins/job/{pipeline_job_name}/pipeline-syntax/globals pullRequest global variable should be listed.

Actual Results

When user navigate to {JENKINS_URL}/jenkins/job/{pipeline_job_name}/pipeline-syntax/globals pullRequest global variable is not listed.

Anything else?

I guess https://github.com/jenkinsci/pipeline-github-plugin/blob/master/src/main/java/org/jenkinsci/plugins/pipeline/github/PullRequestGlobalVariable.java#L15 should be an @Extension and description of all vars should be provided.

I think this improvement will significantly increase the use and recognition of the plugin.