Search code examples
githubgitlabgithub-apipull-requestgitlab-api

On GitLab or GitHub, is there any way to set the merge request or pull request Number to be whatever you want, even 0?


When I go through for example the 'New Merge Request' wizard on GitLab, I do not see a way to pick your own MR ID/number. I know these numbers have to be unique integers. Is there a way for a user to set this MR number to be whatever they want, even 0?

Thanks


Solution

  • I can only speak for GitHub, but the answer is no. I am almost certain the answer is also no for GitLab, but I can't officially say so. The goal is to have a simple, increasing integer for pull requests and issues so that people can easily find them and refer to them. It would defeat that purpose if people could pick random numbers which were very different from the existing sequence.

    I should point out that people already find it confusing when a number is missing from the sequence, such as when an issue is deleted, and GitHub doesn't even provide a way to enumerate all of the issues and PRs in order by number. So adding this feature wouldn't provide a lot of value, but would add a lot of complexity (e.g., find the next never-before-used issue or PR number).