Use OpenAPIConfig.ENCODE_PATH to encode tag name

This commit is contained in:
J.P. Krauss
2026-03-21 07:56:19 -07:00
parent d752d339f3
commit b8aa85d611
2 changed files with 4 additions and 2 deletions

3
dist/index.js vendored
View File

@@ -48170,6 +48170,7 @@ async function run() {
BASE: `${server_url}/api/v1`,
WITH_CREDENTIALS: true,
TOKEN: token,
ENCODE_PATH: encodeURIComponent,
});
const response = await createOrGetRelease(gitea_client, owner, repo, {
@@ -48210,7 +48211,7 @@ async function createOrGetRelease(client, owner, repo, body) {
let release = await client.repository.repoGetReleaseByTag({
owner: owner,
repo: repo,
tag: encodeURIComponent(body.tag_name),
tag: body.tag_name,
})
const release_id = release.id;
let target_commitish = release.target_commitish;

View File

@@ -34,6 +34,7 @@ async function run() {
BASE: `${server_url}/api/v1`,
WITH_CREDENTIALS: true,
TOKEN: token,
ENCODE_PATH: encodeURIComponent,
});
const response = await createOrGetRelease(gitea_client, owner, repo, {
@@ -74,7 +75,7 @@ async function createOrGetRelease(client, owner, repo, body) {
let release = await client.repository.repoGetReleaseByTag({
owner: owner,
repo: repo,
tag: encodeURIComponent(body.tag_name),
tag: body.tag_name,
})
const release_id = release.id;
let target_commitish = release.target_commitish;