Create an API endpoint to filter a commit by ref name

gitlab-ce~1672342 has an external process that verifies a given branch contains a given commit SHA. The current API requires a handful of requests and are not very optimal. For example, the customer believes they can probably use the following lookup process:

  • Get the commit info and grab the 'committed_date'.
  • Get the commits in a branch using the since and until filters to narrow it down to the committed_date.
  • Look at the list of commits and match with the SHA.

It would be nice if we added a new API endpoint, or added a filter option to the commit endpoint. @stanhu suggested in Slack that some sort of filter_by_ref_name would be helpful.

cc/ @jramsay @DouweM What do you think?

Edited Jun 19, 2025 by 🤖 GitLab Bot 🤖
Assignee Loading
Time tracking Loading