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

Support custom status context messages

    XMLWordPrintable

Details

    Description

      The plugin[1] uses the default message[2]. I would like the option to dynamically set a custom message based on discovered during the build.

      Example of the default message

      This commit looks good
      

      Example custom messages. There are two customizations I would like to be able to add. The option to append the duration of the build. And an option to populate a build context variable that could be read by this plugin when creating the notification context. I am adding some short circuit logic to a pipeline to skip the build when the changeset doesn't match the when rule and would like to indicate that in the message.

      This commit looks good (44s)
      Build did not match when criteria  (1s)
      

      [1] https://github.com/jenkinsci/github-scm-trait-notification-context-plugin/blob/1.1/src/main/java/org/jenkinsci/plugins/githubScmTraitNotificationContext/NotificationContextTrait.java#L106
      [2] https://github.com/jenkinsci/github-branch-source-plugin/blob/github-branch-source-2.5.8/src/main/java/org/jenkinsci/plugins/github_branch_source/GitHubNotificationContext.java#L183-L207

      Attachments

        Issue Links

          Activity

            People

              stevenfoster Steven Foster
              mattnelson Matt Nelson
              Votes:
              4 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated: