Uploaded image for project: 'Skara'
  1. Skara
  2. SKARA-2077

GitLabRepository.recentCommitComments may miss commits on non default branch

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 1.0
    • None
    • libraries
    • None

      The recentCommitComments method on GitLabRepository is a big hack to overcome shortcomings in the GitLab APIs that has caused trouble for us at several occasions. I have now discovered another flaw in the implementation.

      The sub method `getCommitTitleToCommitsMap` is used to build a map of commit messages to a list of commits. On first call, it builds the bulk of the map from a local repository. This is then kept up to date by calling the rest endpoint "GET /projects/:id/repository/commits" using the `since` argument to get all commits created after the newest commit already present in the map. The problem is that this API point will only return commits on the default branch. This means that after a bot restart, any new commits on other branches will not be found when looking for commit commands.

            erikj Erik Joelsson
            erikj Erik Joelsson
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: