Fixing the issue about the branch name not included to the url converted. Wrong: "https://localhost:3333/api/v1/repos/org1/repo1/contents/?ref=catalog-info.yaml" and good: "https://localhost:3333/api/v1/repos/org1/repo1/contents/catalog-info.yaml?ref=maincatalog-info.yaml"
Signed-off-by: cmoulliard <cmoulliard@redhat.com>
This commit is contained in:
@@ -48,8 +48,6 @@ integrations:
|
||||
**NOTE**: As backstage will issue HTTPS/TLS requests to the gitea instance, it is needed to configure `gitea` with a valid certificate or at least with a
|
||||
self-signed certificate `gitea cert --host localhost -ca`. Don't forget to set the env var `NODE_EXTRA_CA_CERTS` to point to the CA pem file before to launch backstage !
|
||||
|
||||
**WARNING**: Please pass the branch name part of the `catalogInfoPath` for the action `register` till we will fix this issue (e.g `main/catalog-info.yaml`) !
|
||||
|
||||
When done, you can use the action in your template:
|
||||
|
||||
```yaml
|
||||
|
||||
@@ -31,6 +31,7 @@ import { examples } from './gitea.examples';
|
||||
import fetch, { RequestInit, Response } from 'node-fetch';
|
||||
import crypto from 'crypto';
|
||||
|
||||
/* NOT USED. See TODO hereafter
|
||||
const checkGiteaOrgRepo = async (
|
||||
config: GiteaIntegrationConfig,
|
||||
options: {
|
||||
@@ -61,6 +62,8 @@ const checkGiteaOrgRepo = async (
|
||||
}
|
||||
return response;
|
||||
};
|
||||
*/
|
||||
|
||||
const checkGiteaOrg = async (
|
||||
config: GiteaIntegrationConfig,
|
||||
options: {
|
||||
@@ -330,7 +333,7 @@ export function createPublishGiteaAction(options: {
|
||||
*/
|
||||
await sleep(3000);
|
||||
|
||||
const repoContentsUrl = `${integrationConfig.config.baseUrl}/${owner}/${repo}/src/branch/${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