Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-41736

Better descriptions for jenkins.branch.BranchEventCause

    • Icon: Story Story
    • Resolution: Fixed
    • Icon: Minor Minor
    • branch-api-plugin
    • None

      We want to display the hudson.model.CauseAction "short description" on the UI in Blue Ocean. However, the BranchEventCause has a pretty generic description that isn't meaningful to the user.

      Could we have a better cause description for the branch events?

      "Pull Request opened by i386" etc ?

      Example of current cause action as reported to Blue Ocean

      {
            "_class": "hudson.model.CauseAction",
            "_links": {
              "self": {
                "_class": "io.jenkins.blueocean.rest.hal.Link",
                "href": "/blue/rest/organizations/jenkins/pipelines/blueocean/branches/master/runs/655/cause/"
              }
            },
            "causes": [
              {
                "_class": "jenkins.branch.BranchEventCause",
                "shortDescription": "Branch event"
              }
            ],
            "urlName": "cause"
      }
      

          [JENKINS-41736] Better descriptions for jenkins.branch.BranchEventCause

          Code changed in jenkins
          User: Stephen Connolly
          Path:
          pom.xml
          src/main/java/org/jenkinsci/plugins/github_branch_source/PullRequestGHEventSubscriber.java
          src/main/java/org/jenkinsci/plugins/github_branch_source/PushGHEventSubscriber.java
          http://jenkins-ci.org/commit/github-branch-source-plugin/7baeac0f9159c35d69391cb44d9e322680bcbdce
          Log:
          Merge pull request #129 from stephenc/jenkins-41736

          JENKINS-41736 Leverage the new event description API to expose event descriptions

          Compare: https://github.com/jenkinsci/github-branch-source-plugin/compare/f4403aecf858...7baeac0f9159

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Stephen Connolly Path: pom.xml src/main/java/org/jenkinsci/plugins/github_branch_source/PullRequestGHEventSubscriber.java src/main/java/org/jenkinsci/plugins/github_branch_source/PushGHEventSubscriber.java http://jenkins-ci.org/commit/github-branch-source-plugin/7baeac0f9159c35d69391cb44d9e322680bcbdce Log: Merge pull request #129 from stephenc/jenkins-41736 JENKINS-41736 Leverage the new event description API to expose event descriptions Compare: https://github.com/jenkinsci/github-branch-source-plugin/compare/f4403aecf858...7baeac0f9159

          Code changed in jenkins
          User: Stephen Connolly
          Path:
          pom.xml
          src/main/java/jenkins/branch/BranchEventCause.java
          src/main/java/jenkins/branch/MultiBranchProject.java
          src/main/java/jenkins/branch/OrganizationFolder.java
          http://jenkins-ci.org/commit/branch-api-plugin/4a79b68138ee98f0f66d75fa5d80ab3948850aeb
          Log:
          JENKINS-41736 Leverage the new event description API to expose event descriptions

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Stephen Connolly Path: pom.xml src/main/java/jenkins/branch/BranchEventCause.java src/main/java/jenkins/branch/MultiBranchProject.java src/main/java/jenkins/branch/OrganizationFolder.java http://jenkins-ci.org/commit/branch-api-plugin/4a79b68138ee98f0f66d75fa5d80ab3948850aeb Log: JENKINS-41736 Leverage the new event description API to expose event descriptions

          Code changed in jenkins
          User: Stephen Connolly
          Path:
          src/main/java/jenkins/branch/MultiBranchProject.java
          src/main/java/jenkins/branch/OrganizationFolder.java
          src/main/resources/jenkins/branch/BranchEventCause/description.jelly
          src/main/resources/jenkins/branch/BranchEventCause/description.properties
          http://jenkins-ci.org/commit/branch-api-plugin/84b6a6d419b2599f553b6fa2a5a4aa7f1b034756
          Log:
          JENKINS-41736 More places the description can be used

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Stephen Connolly Path: src/main/java/jenkins/branch/MultiBranchProject.java src/main/java/jenkins/branch/OrganizationFolder.java src/main/resources/jenkins/branch/BranchEventCause/description.jelly src/main/resources/jenkins/branch/BranchEventCause/description.properties http://jenkins-ci.org/commit/branch-api-plugin/84b6a6d419b2599f553b6fa2a5a4aa7f1b034756 Log: JENKINS-41736 More places the description can be used

          Code changed in jenkins
          User: Stephen Connolly
          Path:
          pom.xml
          src/main/java/jenkins/branch/BranchEventCause.java
          src/main/java/jenkins/branch/MultiBranchProject.java
          src/main/java/jenkins/branch/OrganizationFolder.java
          src/main/resources/jenkins/branch/BranchEventCause/description.jelly
          src/main/resources/jenkins/branch/BranchEventCause/description.properties
          http://jenkins-ci.org/commit/branch-api-plugin/a5e6362d03fdf31f6d7d7905885b38b67464a532
          Log:
          Merge pull request #96 from stephenc/jenkins-41736

          JENKINS-41736 Leverage the new event description API to expose event descriptions

          Compare: https://github.com/jenkinsci/branch-api-plugin/compare/e6975cda8daf...a5e6362d03fd

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Stephen Connolly Path: pom.xml src/main/java/jenkins/branch/BranchEventCause.java src/main/java/jenkins/branch/MultiBranchProject.java src/main/java/jenkins/branch/OrganizationFolder.java src/main/resources/jenkins/branch/BranchEventCause/description.jelly src/main/resources/jenkins/branch/BranchEventCause/description.properties http://jenkins-ci.org/commit/branch-api-plugin/a5e6362d03fdf31f6d7d7905885b38b67464a532 Log: Merge pull request #96 from stephenc/jenkins-41736 JENKINS-41736 Leverage the new event description API to expose event descriptions Compare: https://github.com/jenkinsci/branch-api-plugin/compare/e6975cda8daf...a5e6362d03fd

          Ryan Campbell added a comment -

          stephenconnolly, Is there any reason we shouldn't mark this as Closed? Or if not, what are the remaining steps and who needs to do them?

          Ryan Campbell added a comment - stephenconnolly , Is there any reason we shouldn't mark this as Closed? Or if not, what are the remaining steps and who needs to do them?

          Ryan Campbell added a comment -

          Last remaining step is to release branch-api 2.0.9 and then this should automatically start working in Blue Ocean automatically.

          Ryan Campbell added a comment - Last remaining step is to release branch-api 2.0.9 and then this should automatically start working in Blue Ocean automatically.

          James Dumay added a comment -

          Amazing - just saw the PR https://github.com/jenkinsci/github-branch-source-plugin/pull/129 and strings LGTM

          James Dumay added a comment - Amazing - just saw the PR https://github.com/jenkinsci/github-branch-source-plugin/pull/129 and strings LGTM

          Ryan Campbell added a comment -

          branch-api 2.0.9 has been released with these changes!

          Ryan Campbell added a comment - branch-api 2.0.9 has been released with these changes!

          Vivek Pandey added a comment -

          Vivek Pandey added a comment - BlueOcean PR  https://github.com/jenkinsci/blueocean-plugin/pull/1030 .

          James Dumay added a comment -

          James Dumay added a comment - recampbell stephenconnolly thank you!

            stephenconnolly Stephen Connolly
            jamesdumay James Dumay
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: