jenkinsci / zulip-plugin

Jenkins plugin for Zulip notifications of build status
https://zulip.com/integrations/doc/jenkins
MIT License
14 stars 22 forks source link

Project name is not very clear in notifications for multi-branch pipeline projects #31

Closed yrodiere closed 2 years ago

yrodiere commented 3 years ago

When I use the ZulipNotifier in a multi-branch pipeline project, I get notifications that look like this:

Project: production : Build: #1: SUCCESS

Project: staging : Build: #3: SUCCESS

The "project name" in these examples is in fact the branch name. That's because, for multi-branch pipeline projects, one sub-project is created for each branch, and this sub-project has the same name as the branch.

This notification message is not very clear, since it doesn't allow to identify the failing Jenkins job.

Ideally we should make the message clearer?

Version report

Jenkins and plugins versions report:

Jenkins: 2.289.2
OS: Linux - 4.18.0-305.7.1.el8_4.x86_64
---
jaxb:2.3.0.1
pipeline-milestone-step:1.3.2
cloudbees-folder:6.15
branch-api:2.6.5
jdk-tool:1.5
script-security:1.77
docker-commons:1.17
structs:1.23
momentjs:1.1.1
workflow-step-api:2.24
scm-api:2.6.4
docker-workflow:1.26
workflow-api:2.46
junit:1.51
command-launcher:1.6
pipeline-stage-view:2.19
bouncycastle-api:2.20
gradle:1.37.1
antisamy-markup-formatter:2.1
token-macro:2.15
build-timeout:1.20
credentials:2.5
pipeline-build-step:2.13
plain-credentials:1.7
ssh-credentials:1.19
pipeline-model-api:1.8.5
credentials-binding:1.27
workflow-support:3.8
durable-task:1.38
workflow-durable-task-step:2.39
matrix-project:1.19
jsch:0.1.55.2
resource-disposer:0.16
github-api:1.123
ws-cleanup:0.39
ace-editor:1.1
jquery-detached:1.2.1
git-client:3.8.0
workflow-scm-step:2.13
git:4.7.2
workflow-cps:2.93
workflow-job:2.41
github:1.33.1
apache-httpcomponents-client-4-api:4.5.13-1.0
display-url-api:2.3.5
mailer:1.34
git-server:1.10
workflow-basic-steps:2.23
jackson2-api:2.12.3
workflow-cps-global-lib:2.21
pipeline-input-step:2.12
pipeline-stage-step:2.5
pipeline-graph-analysis:1.11
pipeline-rest-api:2.19
handlebars:3.0.8
pipeline-model-extensions:1.8.5
blueocean-git-pipeline:1.24.7
workflow-multibranch:2.26
blueocean-jwt:1.24.7
authentication-tokens:1.4
h2-api:1.4.199
pipeline-stage-tags-metadata:1.8.5
favorite:2.3.3
pipeline-model-definition:1.8.5
lockable-resources:2.11
workflow-aggregator:2.6
github-branch-source:2.11.1
pipeline-github-lib:1.0
matrix-auth:2.6.7
sse-gateway:1.24
email-ext:2.83
embeddable-build-status:2.0.3
blueocean-config:1.24.7
config-file-provider:3.8.1
throttle-concurrents:2.3
blueocean-events:1.24.7
github-oauth:0.33
windows-slaves:1.8
ant:1.11
ghprb:1.42.2
jquery:1.12.4-1
javadoc:1.6
pam-auth:1.6
ldap:2.7
external-monitor-job:1.7
pubsub-light:1.16
blueocean-pipeline-scm-api:1.24.7
htmlpublisher:1.25
node-iterator-api:1.5.0
variant:1.4
zulip:1.2.1
aws-java-sdk:1.11.995
blueocean-dashboard:1.24.7
aws-credentials:1.29
doclinks:0.6.1
ec2:1.62
blueocean-jira:1.24.7
authorize-project:1.4.0
ssh-agent:1.23
maven-plugin:3.12
envinject-api:1.7
audit-trail:3.8
jobConfigHistory:2.28.1
jira:3.5
simple-theme-plugin:0.7
PrioritySorter:4.0.0
blueocean-rest-impl:1.24.7
jenkins-design-language:1.24.7
blueocean-display-url:2.4.1
blueocean-core-js:1.24.7
blueocean-commons:1.24.7
blueocean-rest:1.24.7
blueocean-web:1.24.7
ssh-slaves:1.32.0
postbuildscript:3.0.0
conditional-buildstep:1.4.1
parameterized-trigger:2.41
database-mysql:1.4
run-condition:1.5
blueocean-autofavorite:1.2.4
database:1.9
trilead-api:1.0.13
pipeline-github:2.7
pipeline-utility-steps:2.8.0
notification:1.15
pipeline-maven:3.10.0
snakeyaml-api:1.29.1
greenballs:1.15.1
blueocean-pipeline-api-impl:1.24.7
blueocean-github-pipeline:1.24.7
blueocean-personalization:1.24.7
blueocean-i18n:1.24.7
envinject:2.4.0
mysql-api:8.0.16
openshift-client:1.0.35
plugin-util-api:2.4.0
jmh-report:0.9.0
toolenv:1.2
warnings-ng:9.4.0
caffeine-api:2.9.1-23.v51c4e2c879c8
bootstrap5-api:5.0.2-1
jquery3-api:3.6.0-2
analysis-model-api:10.2.5
font-awesome-api:5.15.3-4
popper2-api:2.5.4-3
data-tables-api:1.10.25-2
popper-api:1.16.1-2
sshd:3.0.4
jjwt-api:0.11.2-9.c8b45b8bb173
echarts-api:5.1.2-3
checks-api:1.7.2
okhttp-api:3.14.9
forensics-api:1.2.1
bootstrap4-api:4.6.0-3
RHEL 8 on controller, Fedora 34 on agents.

Reproduction steps

Results

Expected result:

The notification should include the project name and branch, e.g.:

Project: hibernate.org » production : Build: #1: SUCCESS

Actual result:

The notification does not include the project name, only the branch name, e.g.:

Project: production : Build: #1: SUCCESS