Skip to content

Commit

Permalink
gitlab: standardize ID and IID terminology
Browse files Browse the repository at this point in the history
In the internal gitlab code we have multiple different ways to call for
project ID, merge request ID and others, for instance:

* Project ID: id, pid, project, projectID
* Merge Request ID: id, mrID, mrIID, mrNum
...

And because of that it was somewhat confusing when a single change was
touching two different functions with two different terminology.

This commit standardize these to:

Project ID: projID
MR, Issue, Todo, ...: `id`

However, when more than one object (mr, issue, note and etc) is being passed
through the function argument list, their IDs will contain the prefix
indication to which object that ID is referring to:

Project ID: projID
MR ID: mrID
Issue ID: issueID

Even though, internally, GitLab uses ID for global identification number and
IID for internal identification number (the merge request number that we're
used to use), in lab the global identification number has been used only for
"projects", while any other ID number refers to a single project, internal,
object. With that, the terminology of "mrID" instead of "mrIID" seems
reasonable and simpler to be used.

Signed-off-by: Bruno Meneguele <bmeneg@redhat.com>
  • Loading branch information
bmeneg committed Oct 28, 2021
1 parent efe8b62 commit 2a6cc47
Showing 1 changed file with 187 additions and 187 deletions.
Loading

0 comments on commit 2a6cc47

Please sign in to comment.