-
Notifications
You must be signed in to change notification settings - Fork 383
Add GitHub branch and pull request info to the 'Details' widget #826
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
base: master
Are you sure you want to change the base?
Conversation
src/main/java/org/jenkinsci/plugins/github_branch_source/ScmDetailGroup.java
Outdated
Show resolved
Hide resolved
SCMRevisionAction scmRevisionAction = getObject().getAction(SCMRevisionAction.class); | ||
SCMRevision revision = scmRevisionAction.getRevision(); | ||
|
||
if (revision instanceof AbstractGitSCMSource.SCMRevisionImpl abstractRevision) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
potentially belongs in the Git plugin? and then this plugin only handles the pull request one?
Although not sure if you could figure out the link from there, maybe you can though?
<groupId>org.jenkins-ci.plugins</groupId> | ||
<artifactId>github-api</artifactId> | ||
</dependency> | ||
<dependency> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs to be removed when scm-api has been released.
Opening for review to get thoughts. Is the information we show the right information - e.g. is commit hash needed? Is my usage of the API correct/are there more efficient ways of doing this. |
2.504.1 introduced a new
Detail
API, allowing core and plugin developers to attach details and groups to objects in Jenkins. This is currently only used byRun
in core.This PR adds relevant Git info to
ScmDetailGroup
, provided by scm-api-plugin.Description
For branches show:
For pull requests show:
Submitter checklist
Reviewer checklist
Documentation changes
Users/aliases to notify