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

Support substitution tokens in custom github notification context

      Currently, when used within the context of a GiHub Branch Source hierarchy, all this plugin can do is let me set a custom but hardcoded notification context. (Since it is configured once for all jobs in the hierarchy)

      It would be useful to be able to dynamically set a custom (different) context for all jobs in the whole branch source hierarchy. For example, I could resolve JENKINS-55726 when opening daggy fix PRs (same origin branch) by setting a custom context like this (hypothetical variable):

      jenkins/${JOB_NAME}

      Then I wouldn't have each job marking multiple PRs passed or failed. This is just one use case.

      PR: https://github.com/jenkinsci/github-scm-trait-notification-context-plugin/pull/5

          [JENKINS-65892] Support substitution tokens in custom github notification context

          Alexander Komarov created issue -
          Alexander Komarov made changes -
          Description Original: Currently, when used within the context of a GiHub Branch Source hierarchy, all this plugin can do is let me set a custom but hardcoded notification context. (Since it is configured once for all jobs in the hierarchy)

          It would be useful to be able to dynamically set a custom (different) context for all jobs in the whole branch source hierarchy. For example, I could resolve JENKINS-55726 when opening daggy fix PRs (same origin branch) by setting a custom context like this (hypothetical variable):

          *jenkins/${JOB_NAME}*

          Then I wouldn't have each job marking multiple PRs passed or failed. This is just one use case.

          I'm happy to to submit a PR, but I'd like to hear back from maintainers in case this plugin is unmaintained.
          New: Currently, when used within the context of a GiHub Branch Source hierarchy, all this plugin can do is let me set a custom but hardcoded notification context. (Since it is configured once for all jobs in the hierarchy)

          It would be useful to be able to dynamically set a custom (different) context for all jobs in the whole branch source hierarchy. For example, I could resolve JENKINS-55726 when opening daggy fix PRs (same origin branch) by setting a custom context like this (hypothetical variable):

          *jenkins/${JOB_NAME}*

          Then I wouldn't have each job marking multiple PRs passed or failed. This is just one use case.

          PR: https://github.com/jenkinsci/github-scm-trait-notification-context-plugin/pull/5
          Alexander Komarov made changes -
          Attachment New: github-checks.png [ 55020 ]

          Alexander Komarov added a comment - - edited

          With my changes and context set to xxxx-${JOB_NAME}, the check contexts are unique, but they all show up on all daggy PRs for the same source branch (see screenshot). Still, it's better than randomly and incorrectly marking related PRs.

          Side Note: This is a Jenkins issue. When building the same github PRs using Azure DevOps, daggy PR build result is logged correctly (one job to one PR, even though they share a destination branch).

          Alexander Komarov added a comment - - edited With my changes and context set to xxxx-${JOB_NAME} , the check contexts are unique, but they all show up on all daggy PRs for the same source branch (see screenshot). Still, it's better than randomly and incorrectly marking related PRs. Side Note: This is a Jenkins issue. When building the same github PRs using Azure DevOps, daggy PR build result is logged correctly (one job to one PR, even though they share a destination branch).
          Matt Nelson made changes -
          Link New: This issue is related to JENKINS-60803 [ JENKINS-60803 ]

            stevenfoster Steven Foster
            akom Alexander Komarov
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: