-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SPIKE: Learn Gitea/DCS API that applies to creating releases #113
Comments
Abel may have some insight on this. |
Swagger for QA: https://qa.door43.org/api/swagger# To see all the releases: https://qa.door43.org/api/swagger#/repository/repoListReleases: |
AP to create a release is described here: This is a POST, taking 2 parameters and a JSON body.
{
"body": "string",
"draft": true,
"name": "string",
"prerelease": true,
"tag_name": "string",
"target_commitish": "string"
} |
Detailed docs at the Gitea page here {
"tag_name": "v1.0.0",
"target_commitish": "master",
"name": "v1.0.0",
"body": "Description of the release",
"draft": false,
"prerelease": false
} |
Let's make an example JSON and try it out: {
"tag_name": "v1.0.0",
"target_commitish": "master",
"name": "v1.0.0",
"body": "First release of es-419 Translation Notes",
"draft": false,
"prerelease": false
} Code was 201 (success). Returned JSON: {
"id": 852312,
"tag_name": "v1.0.0",
"target_commitish": "master",
"name": "v1.0.0",
"body": "First release of es-419 Translation Notes",
"url": "https://qa.door43.org/api/v1/repos/Es-419_gl/es-419_tn/releases/852312",
"html_url": "https://qa.door43.org/Es-419_gl/es-419_tn/releases/tag/v1.0.0",
"tarball_url": "https://qa.door43.org/Es-419_gl/es-419_tn/archive/v1.0.0.tar.gz",
"zipball_url": "https://qa.door43.org/Es-419_gl/es-419_tn/archive/v1.0.0.zip",
"draft": false,
"prerelease": false,
"created_at": "2022-03-11T16:44:09Z",
"published_at": "2022-03-11T16:44:09Z",
"author": {
"id": 13993,
"login": "cecil.new",
"full_name": "",
"email": "[email protected]",
"avatar_url": "https://qa.door43.org/avatars/4906b5e03f108264e4c119874ce31c37",
"language": "",
"is_admin": false,
"last_login": "0001-01-01T00:00:00Z",
"created": "2019-09-19T13:37:42Z",
"repo_languages": null,
"repo_subjects": null,
"restricted": false,
"active": false,
"prohibit_login": false,
"location": "",
"website": "",
"description": "",
"visibility": "public",
"followers_count": 0,
"following_count": 0,
"starred_repos_count": 0,
"username": "cecil.new"
},
"assets": []
} |
Just remember, a release is a Gitea thing, but our DCS server code will put that release into the Catalog IF (and only if, the only thing that is validated) the manifest.yaml file is valid, as it is in your example ("Catalog (prod)" badge on your release). If it isn't, the release will still be made, and you'll still get the same response when you make it, but will not have a Catalog entry (Invalid badge by the release). If you are making the release from the master branch, one way to verify that making a release will also result in a Catalog entry is if the master branch itself is in the catalog (all master branches have a catalog entry where stage=latest). So if https://qa.door43.org/api/catalog/v5/entry/es-419_gl/es-419_tn/master doesn't return a 500 error, you are good to go on making a release from master that will appear in the catalog. Hope that makes sense. Example of bad master branch (no stage=latest for this repo!): https://qa.door43.org/api/catalog/v5/entry/richmahn/en_tn/master Example of good master branch (has a stage=latest stage): https://qa.door43.org/api/catalog/v5/entry/unfoldingWord/en_tn/master |
@richmahn
Give the above, I think it would be nice to show why the manifest is invalid. Could you expose an endpoint for this? I'll file an enhancement request to put this on the table for you. Feature requested at unfoldingWord/dcs#336 |
@richmahn @birchamp
List of Scripture resource types:
List of OBS resource types:
|
Include documentation and a step by step manual solution. What will the interaction with Gitea look like for this?
The text was updated successfully, but these errors were encountered: