Details

    • Similar Issues:

      Description

      SCMHead could extend Actionable, or simply have a getAction(Class) method which can call TransientActionFactory. This would be useful for defining and implementing APIs for associating information with branches without forcing callers to cast to a subtype of SCMHead. For example, for any SCMSource supporting something like pull requests, you would like to be able to define an action listing the author and so on.

      To expose this kind of information directly via REST (Stapler exporting), it would suffice to make BranchJobProperty an @ExportedBean, same for Branch and SCMHead, etc.

        Attachments

          Issue Links

            Activity

            jglick Jesse Glick created issue -
            Hide
            recena Manuel Recena Soto added a comment -

            Jesse Glick Looks like getAction(Class) is more appropiate (IMO).

            Show
            recena Manuel Recena Soto added a comment - Jesse Glick Looks like getAction(Class) is more appropiate (IMO).
            Hide
            stephenconnolly Stephen Connolly added a comment -

            Jesse Glick My vote is to go for extending Actionable, yes it is more inheritance tree linkage, but it seems reasonable in this case

            Show
            stephenconnolly Stephen Connolly added a comment - Jesse Glick My vote is to go for extending Actionable, yes it is more inheritance tree linkage, but it seems reasonable in this case
            Hide
            recena Manuel Recena Soto added a comment -

            Maybe related? PR

            Show
            recena Manuel Recena Soto added a comment - Maybe related? PR
            jglick Jesse Glick made changes -
            Field Original Value New Value
            Component/s scm-api-plugin [ 18054 ]
            Component/s branch-api-plugin [ 18621 ]
            Hide
            jglick Jesse Glick added a comment -

            I investigated actually extending Actionable but decided against it for reasons described in JENKINS-33399: it brings in quite a lot of unwanted baggage.

            Show
            jglick Jesse Glick added a comment - I investigated actually extending Actionable but decided against it for reasons described in JENKINS-33399 : it brings in quite a lot of unwanted baggage.
            jglick Jesse Glick made changes -
            Link This issue depends on JENKINS-33399 [ JENKINS-33399 ]
            jglick Jesse Glick made changes -
            Assignee stephenconnolly [ stephenconnolly ] Jesse Glick [ jglick ]
            jglick Jesse Glick made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            jglick Jesse Glick made changes -
            Remote Link This issue links to "scm-api PR 7 (Web Link)" [ 14043 ]
            jglick Jesse Glick made changes -
            Remote Link This issue links to "branch-api PR 29 (Web Link)" [ 14044 ]
            jglick Jesse Glick made changes -
            Remote Link This issue links to "workflow PR 356 (Web Link)" [ 14045 ]
            jglick Jesse Glick made changes -
            Remote Link This issue links to "github-branch-source PR 31 (Web Link)" [ 14046 ]
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Jesse Glick
            Path:
            src/main/java/jenkins/scm/api/SCMHead.java
            src/main/java/jenkins/scm/api/actions/ChangeRequestAction.java
            http://jenkins-ci.org/commit/scm-api-plugin/6f50426f828c4aceeccd10e0af941d712d65f294
            Log:
            JENKINS-33309 Allow SCMHead to have actions, and define ChangeRequestAction.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: src/main/java/jenkins/scm/api/SCMHead.java src/main/java/jenkins/scm/api/actions/ChangeRequestAction.java http://jenkins-ci.org/commit/scm-api-plugin/6f50426f828c4aceeccd10e0af941d712d65f294 Log: JENKINS-33309 Allow SCMHead to have actions, and define ChangeRequestAction.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Stephen Connolly
            Path:
            src/main/java/jenkins/scm/api/SCMHead.java
            src/main/java/jenkins/scm/api/actions/ChangeRequestAction.java
            http://jenkins-ci.org/commit/scm-api-plugin/891ef066e09ceced578f97995b2492633e93c43c
            Log:
            Merge pull request #7 from jglick/SCMHead-Actionable-JENKINS-33309

            JENKINS-33309 Allow SCMHead to have actions, and define ChangeRequestAction

            Compare: https://github.com/jenkinsci/scm-api-plugin/compare/b82237184965...891ef066e09c

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Stephen Connolly Path: src/main/java/jenkins/scm/api/SCMHead.java src/main/java/jenkins/scm/api/actions/ChangeRequestAction.java http://jenkins-ci.org/commit/scm-api-plugin/891ef066e09ceced578f97995b2492633e93c43c Log: Merge pull request #7 from jglick/SCMHead-Actionable- JENKINS-33309 JENKINS-33309 Allow SCMHead to have actions, and define ChangeRequestAction Compare: https://github.com/jenkinsci/scm-api-plugin/compare/b82237184965...891ef066e09c
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Jesse Glick
            Path:
            pom.xml
            src/main/java/org/jenkinsci/plugins/github_branch_source/GitHubSCMSource.java
            src/main/java/org/jenkinsci/plugins/github_branch_source/PullRequestAction.java
            src/main/java/org/jenkinsci/plugins/github_branch_source/PullRequestSCMHead.java
            http://jenkins-ci.org/commit/github-branch-source-plugin/0d2f289c93eef349e510e725f45abfb87e89897f
            Log:
            JENKINS-33309 Implement ChangeRequestAction.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: pom.xml src/main/java/org/jenkinsci/plugins/github_branch_source/GitHubSCMSource.java src/main/java/org/jenkinsci/plugins/github_branch_source/PullRequestAction.java src/main/java/org/jenkinsci/plugins/github_branch_source/PullRequestSCMHead.java http://jenkins-ci.org/commit/github-branch-source-plugin/0d2f289c93eef349e510e725f45abfb87e89897f Log: JENKINS-33309 Implement ChangeRequestAction.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Jesse Glick
            Path:
            pom.xml
            src/main/java/org/jenkinsci/plugins/github_branch_source/GitHubSCMSource.java
            src/main/java/org/jenkinsci/plugins/github_branch_source/PullRequestAction.java
            src/main/java/org/jenkinsci/plugins/github_branch_source/PullRequestSCMHead.java
            http://jenkins-ci.org/commit/github-branch-source-plugin/3486aa81e9468357f9a1902740de0d8a15d53f4d
            Log:
            Merge pull request #31 from jglick/SCMHead-Actionable-JENKINS-33309

            JENKINS-33309 Implement ChangeRequestAction

            Compare: https://github.com/jenkinsci/github-branch-source-plugin/compare/e3784380a29f...3486aa81e946

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: pom.xml src/main/java/org/jenkinsci/plugins/github_branch_source/GitHubSCMSource.java src/main/java/org/jenkinsci/plugins/github_branch_source/PullRequestAction.java src/main/java/org/jenkinsci/plugins/github_branch_source/PullRequestSCMHead.java http://jenkins-ci.org/commit/github-branch-source-plugin/3486aa81e9468357f9a1902740de0d8a15d53f4d Log: Merge pull request #31 from jglick/SCMHead-Actionable- JENKINS-33309 JENKINS-33309 Implement ChangeRequestAction Compare: https://github.com/jenkinsci/github-branch-source-plugin/compare/e3784380a29f...3486aa81e946
            Hide
            jglick Jesse Glick added a comment -

            API defined and implemented in github-branch-source, so considering this fixed.

            Stapler exporting is still pending a couple more PRs.

            Show
            jglick Jesse Glick added a comment - API defined and implemented in github-branch-source , so considering this fixed. Stapler exporting is still pending a couple more PRs.
            jglick Jesse Glick made changes -
            Status In Progress [ 3 ] Resolved [ 5 ]
            Resolution Fixed [ 1 ]
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Jesse Glick
            Path:
            pom.xml
            src/main/java/jenkins/branch/Branch.java
            src/main/java/jenkins/branch/BranchNameContributor.java
            http://jenkins-ci.org/commit/branch-api-plugin/1d5c9aeb17b8f92dbe24ad18a2498b93a4f944d6
            Log:
            JENKINS-33309 Set environment variables from ChangeRequestAction.
            Also make sure SCMHead.actions are exported to REST.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: pom.xml src/main/java/jenkins/branch/Branch.java src/main/java/jenkins/branch/BranchNameContributor.java http://jenkins-ci.org/commit/branch-api-plugin/1d5c9aeb17b8f92dbe24ad18a2498b93a4f944d6 Log: JENKINS-33309 Set environment variables from ChangeRequestAction. Also make sure SCMHead.actions are exported to REST.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Jesse Glick
            Path:
            pom.xml
            src/main/java/jenkins/branch/Branch.java
            src/main/java/jenkins/branch/BranchNameContributor.java
            http://jenkins-ci.org/commit/branch-api-plugin/72ab0f9ed7a83a93847b966dafa527b1250f5866
            Log:
            Merge pull request #29 from jglick/SCMHead-Actionable-JENKINS-33309

            JENKINS-33309 Use ChangeRequestAction

            Compare: https://github.com/jenkinsci/branch-api-plugin/compare/60c05e72532c...72ab0f9ed7a8

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: pom.xml src/main/java/jenkins/branch/Branch.java src/main/java/jenkins/branch/BranchNameContributor.java http://jenkins-ci.org/commit/branch-api-plugin/72ab0f9ed7a83a93847b966dafa527b1250f5866 Log: Merge pull request #29 from jglick/SCMHead-Actionable- JENKINS-33309 JENKINS-33309 Use ChangeRequestAction Compare: https://github.com/jenkinsci/branch-api-plugin/compare/60c05e72532c...72ab0f9ed7a8
            rtyler R. Tyler Croy made changes -
            Workflow JNJira [ 169209 ] JNJira + In-Review [ 198564 ]

              People

              • Assignee:
                jglick Jesse Glick
                Reporter:
                jglick Jesse Glick
              • Votes:
                1 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: