Skip to content

Shortcut/keyword to target default branch on Repository Files API endpoint

Release notes

Problem to solve

When retrieving a file via the Repository Files API endpoint, the user should be able to indicate that they want the file from the repository default branch, and not need to hard-code the name of that branch.

Intended users

User experience goal

Reduce the need to hard-code branch names, which makes integrations more flexible and protects against broken integrations due to changing the default branch name.

Proposal

Make the ref argument optional. If ref is not specified, use the repository's default branch.

Further details

Permissions and Security

Documentation

Availability & Testing

What does success look like, and how can we measure that?

What is the type of buyer?

Is this a cross-stage feature?

Links / references

Edited by 🤖 GitLab Bot 🤖