[go: up one dir, main page]

Skip to content

Automatically adding a label to an issue and/or a merge request when a merge is done

Problem to solve

Automatically adding a label to an issue and/or a merge request when a merge is done.

Intended users

Developer and Release Manager

Further details

We have a production server where our IT department is the sole entity with write permissions to the file system. Whenever we finish development and testing, we upload our files to a shared folder where a script they wrote promotes to the server. We are unable to leverage GitLab CI/CD because of this.

Because of our setup, we decided to add a label called pending promote so that we can easily identify issues and merge requests that have been merged to master but hasn't been promoted to the production server. So far this has been working for us but there's always a chance that someone who did the merge forgets to add the appropriate labels on the issue and/or merge request.

Proposal

My first proposal is to have something similar to when creating a merge request, if the description contains something like Closes #12345, the issue automatically gets closed when the merge is done. I'm hoping something like Adds ~label-name #12345 would do something similar.

My second proposal is to have it as a project setting. Since on the first proposal we rely on the user creating/merging the merge request to make sure the description contains the correct command, it is still prone to being forgotten which brings us back to the original problem. If we have it as a project setting, we eliminate the reliance on users remembering to do something first before merging.