Set CI_MERGE_REQUEST_TITLE also in single-merge-request branch pipelines.
Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.
According to https://docs.gitlab.com/ee/ci/variables/predefined_variables.html
the environment should contain a variable CI_MERGE_REQUEST_TITLE.
When running a CI pipeline on a merge request, this variable is not set (tested by calling env and echo $...).
Most other are present.
We would like to use this to run code test coverage analysis only just before merging to main.
The only way we figured out is to rely on the "Draft: " prefix.
That's because CI_MERGE_REQUEST_EVENT_TYPE is not present either,
so we can't experiment with running the code coverage only right before merging (the merge result run).
Since it behaves differently from the documentation, I am filing a bug report. I did not find any existing one.
Thanks.
Edit:
It could be that it's because we have "branch pipeline" rather than "merge request pipeline".
In such case:
- It would be a good idea to propagate the merge request name to the runs of the branch, for which a single merge request is open.
- We can turn this ticket into a feature request. (I have changed the title accordingly.)