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

[JENKINS-33309] Use ChangeRequestAction #29

Merged
merged 1 commit into from Mar 11, 2016

Conversation

Projects
None yet
4 participants
@jglick
Copy link
Member

commented Mar 8, 2016

[JENKINS-33309] Set environment variables from ChangeRequestAction.
Also make sure SCMHead.actions are exported to REST.
@jenkinsadmin

This comment has been minimized.

Copy link
Member

commented Mar 8, 2016

Thank you for this pull request! Please check this document for how the Jenkins project handles pull requests.

@reviewbybees

This comment has been minimized.

Copy link

commented Mar 8, 2016

This pull request originates from a CloudBees employee. At CloudBees, we require that all pull requests be reviewed by other CloudBees employees before we seek to have the change accepted. If you want to learn more about our process please see this explanation.

// Note: not using Branch.name, since in the future that could be something different
// than SCMHead.name, which is what we really want here.
envs.put("BRANCH_NAME", projectFactory.getBranch(j).getHead().getName());
envs.put("BRANCH_NAME", head.getName());
ChangeRequestAction cr = head.getAction(ChangeRequestAction.class);

This comment has been minimized.

Copy link
@amuniz

amuniz Mar 9, 2016

Member

Who is adding this action to head?

This comment has been minimized.

Copy link
@amuniz

amuniz Mar 9, 2016

Member

IOW where is the TransientActionFactory implementation (as per jenkinsci/scm-api-plugin#7)?

This comment has been minimized.

Copy link
@jglick

jglick Mar 9, 2016

Author Member

The current implementation is in github-branch-source (see linked PR) and uses an override rather than TransientActionFactory.

This comment has been minimized.

Copy link
@amuniz

amuniz Mar 10, 2016

Member

Ok. So there are currently two ways to add actions to an SCMHead: extend it and override getAllActions or add an implementation of TransientActionFactory, right?

This comment has been minimized.

Copy link
@jglick

jglick Mar 10, 2016

Author Member

Correct. Similar to the situation for Actionables, where you can override getActions, etc., from the inside; or use TransientActionFactory from the outside. Actionable also exposes addAction from the outside, though this presumes that there is mutable persisted action storage, an imposition I did not really want to apply to SCMHead (besides the other API problems with Actionable mentioned in a linked JIRA ticket).

This comment has been minimized.

Copy link
@amuniz

amuniz Mar 10, 2016

Member

Ok, got it.

@amuniz

This comment has been minimized.

Copy link
Member

commented Mar 10, 2016

🐝

@jglick

This comment has been minimized.

Copy link
Member Author

commented Mar 10, 2016

@reviewbybees done

(@stephenc merge if you agree)

jglick added a commit that referenced this pull request Mar 11, 2016

@jglick jglick merged commit 72ab0f9 into jenkinsci:master Mar 11, 2016

1 check passed

Jenkins This pull request looks good
Details

@jglick jglick deleted the jglick:SCMHead-Actionable-JENKINS-33309 branch Mar 11, 2016

jglick added a commit that referenced this pull request Mar 11, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.