lp:turnip

Get this repository:
git clone https://git.qastaging.paddev.net/turnip
Members of Canonical Launchpad Engineering can upload to this repository. Log in for directions.

Branches

Name Last Modified Last Commit
master 2023-10-19 15:52:36 UTC
Add ref creation POST endpoint to turnip-api

Author: Bowen Fan
Author Date: 2023-10-19 15:52:36 UTC

Add ref creation POST endpoint to turnip-api

A bulk endpoint is added at `/repo/{name}/refs`. The request payload should contain
a JSON array of dicts, e.g. [{"ref":"refs/tags/1234", "commit_sha1":<hash>}, ...].
The logic layer will use pygit2's `repo.create_reference` method to write the
requested ref names against the corresponding commits specified.

The response body indicates the refs that were successfully created and refs that
encountered errors. In case of logic layer failures (e.g. the commit cannot be found
in the repo), partial success is possible. In case of API layer failures (e.g. the
request body does not conform to what the API expects), the entire request will not
be processed and an API error will be returned.

Also includes corresponding unit tests for the new functions.

Merged from https://code.launchpad.net/~bowenfan/turnip/+git/turnip/+merge/452540

11 of 1 result
This repository contains Public information 
Everyone can see this information.