Skip to content

Commit

Permalink
Merge pull request #19 from humanitec/orgId
Browse files Browse the repository at this point in the history
feat(scaffolder): enable forwarding of githubOrgId
  • Loading branch information
johanneswuerbach authored May 15, 2024
2 parents 92126b6 + 5a41696 commit cb8d8f6
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/flat-ants-ring.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@humanitec/backstage-plugin-scaffolder-backend-module': minor
---

Enable forwarding of githubOrgId
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ import { createTemplateAction } from '@backstage/plugin-scaffolder-node';
interface EnvironmentAction {
orgId: string
cloudProvider?: string
githubOrgId?: string
}

export function createGetEnvironmentAction({ orgId, cloudProvider }: EnvironmentAction) {
export function createGetEnvironmentAction({ orgId, cloudProvider, githubOrgId }: EnvironmentAction) {
return createTemplateAction({
id: 'humanitec:get-environment',
schema: {
Expand All @@ -20,6 +21,9 @@ export function createGetEnvironmentAction({ orgId, cloudProvider }: Environment
cloudProvider: {
type: 'string'
},
githubOrgId: {
type: 'string'
},
githubOIDCCustomization: {
type: 'object'
}
Expand All @@ -29,6 +33,7 @@ export function createGetEnvironmentAction({ orgId, cloudProvider }: Environment
handler: async (ctx) => {
ctx.output('orgId', orgId);
ctx.output('cloudProvider', cloudProvider);
ctx.output('githubOrgId', githubOrgId);

let githubOIDCCustomization
if (cloudProvider === 'azure') {
Expand Down
1 change: 1 addition & 0 deletions plugins/humanitec-backend-scaffolder-module/src/module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ export const humanitecModule = createBackendModule({
createGetEnvironmentAction({
orgId: config.getString('humanitec.orgId'),
cloudProvider: config.getOptionalString('humanitec.cloudProvider'),
githubOrgId: config.getOptionalString('humanitec.githubOrgId'),
}),
);
},
Expand Down

0 comments on commit cb8d8f6

Please sign in to comment.