It doesn't. :-( Not in the latest version of the plugin.

On Tuesday, May 30, 2017 at 6:46:35 AM UTC-7, Arvind Jayaprakash wrote:
>
> The environment variable CHANGE_ID contains the PR number
>
> On Friday, May 26, 2017 at 6:07:20 AM UTC+5:30, Cody Ebberson wrote:
>>
>> Hello,
>>
>> I'm configuring Github + Jenkins + Sonar.  Almost everything is working, 
>> and I am incredibly pleased (great job!)  I'm now struggling with one 
>> missing piece which seems like it should be simple.
>>
>> The last piece I need is the Github pull request *number* as an 
>> environment variable to pass to Sonar for "preview" mode analysis.
>>
>> Here are the relevant components and versions:
>>
>> Jenkins version 2.46.3
>> Jenkins "GitHub Branch Source Plugin" version 2.0.5
>> Maven version 3.3.9
>> Maven Sonar plugin version 3.3.0.603
>> Sonar version  6.3.1.21392
>> Sonar Github plugin version 1.4.1
>>
>> Per https://stackoverflow.com/a/32095346 it looks like the old "GitHub 
>> Pull Request Builder" plugin added a ${ghprbPullId} environment variable. 
>>  That environment variable is not set by the "GitHub Branch Source Plugin" 
>> (as far as I can tell).
>>
>> A dump of "env" does not show anything about pull requests, change ID's, 
>> etc.  The known pull request number is not anywhere in the logs.
>>
>> Suggestions?
>>
>> If this isn't available through Jenkins, I think we could do some curl + 
>> Github API magic to search for the Pull Request number, but that obviously 
>> seems suboptimal.
>>
>> Thanks in advance!
>>
>> Cody
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/202c9cd6-f995-41b4-9509-69124ac0fefd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to