Signed-off-by: cmoulliard <cmoulliard@redhat.com>
This commit is contained in:
cmoulliard
2024-01-04 19:15:53 +01:00
parent a72521bae8
commit 2b2fdccaa6
2 changed files with 4 additions and 3 deletions
@@ -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);