Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set GitHub push user as BUILD_USER_ID #11

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

irissmann
Copy link

The GitHub plugin provides the id of the user who triggers a build by a push to GitHub. We would like to set this user in the environment variable BUILD_USER_ID.

Copy link
Member

@oleg-nenashev oleg-nenashev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The current implementation may be very risky as a default behavior. Reflection code for just a single Cause. I would rather check if there are better options offered in SCM API Plugin

@marc-guenther
Copy link
Member

marc-guenther commented Jan 19, 2017

I fully agree that this is an ugly hack. Unfortunately pushedBy is a private member with no getter :(
https://github.com/jenkinsci/github-plugin/blob/master/src/main/java/com/cloudbees/jenkins/GitHubPushCause.java
And this is useful information, which just simply isn't exposed anywhere.

EDIT: Ah well, I guess the intended way is to register ourselves here:

@fabiodcasilva fabiodcasilva requested a review from a team as a code owner November 2, 2024 17:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants