Use the proper repoContentsUrl to access gitea repo and enhance the test case
Signed-off-by: cmoulliard <cmoulliard@redhat.com>
This commit is contained in:
@@ -137,6 +137,11 @@ describe('publish:gitea', () => {
|
||||
name: undefined,
|
||||
},
|
||||
});
|
||||
|
||||
expect(mockContext.output).toHaveBeenCalledWith(
|
||||
'repoContentsUrl',
|
||||
'https://gitea.com/org1/repo/src/branch/main',
|
||||
);
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
|
||||
@@ -330,7 +330,7 @@ export function createPublishGiteaAction(options: {
|
||||
*/
|
||||
await sleep(3000);
|
||||
|
||||
const repoContentsUrl = `${integrationConfig.config.baseUrl}/${owner}/${repo}/+/refs/${defaultBranch}`;
|
||||
const repoContentsUrl = `${integrationConfig.config.baseUrl}/${owner}/${repo}/src/branch/${defaultBranch}`;
|
||||
ctx.output('remoteUrl', remoteUrl);
|
||||
ctx.output('commitHash', commitResult?.commitHash);
|
||||
ctx.output('repoContentsUrl', repoContentsUrl);
|
||||
|
||||
Reference in New Issue
Block a user