jenkinsci / jenkinsci/branch-api-plugin

[JENKINS-40486] Plugin does not adhere to documented global variables

Open
#630 7 comments 0 reactions 0 assignees View on GitHub
component:branch-api-plugin imported-jira-issue pipeline priority:major resolution:unresolved
Dominant language
Java
Stars
39
Forks
154
PR merge metrics
No merged PRs in 30d

Description

The Jenkins local documentation for Pipelines declares that the following global variables will be populated:

CHANGE_ID

CHANGE_URL

CHANGE_TITLE

CHANGE_AUTHOR

CHANGE_AUTHOR_DISPLAY_NAME

CHANGE_AUTHOR_EMAIL

CHANGE_TARGET

The lack of data in these variables results in the following severely reduced functionality.



  • Unable to effectively notify users of pull request related build status via StashNotifier, HipChatNotifier, email and other notification plugins

  • Unable to effectively notify committers of build failures

  • Unable to detect pull requests without string parsing (which is hacky imo)

---
Originally reported by bobthemagicman, imported from: Plugin does not adhere to documented global variables


  • assignee: amuniz
  • status: Open
  • priority: Major
  • component(s): branch-api-plugin
  • label(s): bitbucket, global, notification, pipeline, technical-debt, triaged-2018-11
  • resolution: Unresolved
  • votes: 10
  • watchers: 18
  • imported: 20251211-141027

Raw content of original issue

The Jenkins local documentation for Pipelines declares that the following global variables will be populated:

CHANGE_ID
CHANGE_URL
CHANGE_TITLE
CHANGE_AUTHOR
CHANGE_AUTHOR_DISPLAY_NAME
CHANGE_AUTHOR_EMAIL
CHANGE_TARGET

The lack of data in these variables results in the following severely reduced functionality.



  • Unable to effectively notify users of pull request related build status via StashNotifier, HipChatNotifier, email and other notification plugins

  • Unable to effectively notify committers of build failures

  • Unable to detect pull requests without string parsing (which is hacky imo)


environment

```
Jenkins 2.36

Bitbucket Server 4.11.1

Bitbucket plugin: Post Webhooks for Bitbucket

bitbucket-branch-source-plugin 1.8
```

Contributor guide

Open the contributing guide

Research direction

Start by tracing how branch-api-plugin supplies the documented CHANGE_ID, CHANGE_URL, CHANGE_TITLE, CHANGE_AUTHOR, CHANGE_AUTHOR_DISPLAY_NAME, CHANGE_AUTHOR_EMAIL, and CHANGE_TARGET globals. Verify the behavior for Bitbucket pull requests and determine how completion should be checked for notification and pull-request detection use cases; the issue names no files or tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.