Add release-manager's name to auto_deploy:promote release note when executed via chatops
What does this MR do and why?
This MR fixes an issue where the monthly release task deployment update comments don't display the actual human release manager's name when using the ChatOps command /chatops run auto_deploy promote.
Here is an example of the note with no human executor mentioned: gitlab-org/release/tasks#21684 (comment 2865270185)
Problem
When a release manager uses ChatOps to promote a package, the status notes in monthly release issues fail to show who performed the promotion (the executor). This happens because:
- The ChatOps command triggers the promote job via the
release-tools-opsbot user - The bot user doesn't have a matching username on gitlab.com
- The status note logic can't resolve the bot username to a human identity
- No release manager name appears in the deployment comments
Solution
This MR preserves the human release manager's identity by:
-
Passing the human identity through the job execution chain - When ChatOps triggers the promote job, it now passes the
RELEASE_USERas aRELEASE_MANAGERvariable to the job - Enhanced job triggering - Updated the GitLab API client to support passing variables when playing manual jobs - And pass RELEASE_MANAGER value to Gitlab API when triggering the job.
-
Smart status note logic - When the status note detects that the ops bot triggered the job, it uses the
RELEASE_MANAGERenvironment variable instead of trying to resolve the bot username
Intended result: Monthly release issue comments will now correctly display the actual human promoter (e.g., @test-user) instead of showing nothing or failing to resolve the bot identity.
Related Issues
This MR resolves this issue: gitlab-com/gl-infra/delivery#21635