-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Provide module for the new backend system (#32)
* add module file and update readme * Bump versions * fix: upgrade dependencies & imports * fix: switch branch with clone instead of checkout * add module file and update readme * Bump versions * bump backend-plugin-api to 0.7.0 and update yarn.lock * increment minor --------- Co-authored-by: Johannes Bradt <[email protected]> Co-authored-by: Gio Divino <[email protected]>
- Loading branch information
1 parent
75ec167
commit 60cec64
Showing
5 changed files
with
3,937 additions
and
351 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import { scaffolderActionsExtensionPoint } from '@backstage/plugin-scaffolder-node/alpha'; | ||
import { | ||
createBackendModule, | ||
coreServices, | ||
} from '@backstage/backend-plugin-api'; | ||
import { ScmIntegrations } from '@backstage/integration'; | ||
|
||
import { | ||
cloneAzureRepoAction, | ||
pushAzureRepoAction, | ||
pullRequestAzureRepoAction, | ||
} from "./actions"; | ||
|
||
export const scaffolderModuleAzureRepositories = createBackendModule({ | ||
pluginId: 'scaffolder', | ||
moduleId: 'azure-repos', | ||
register(env) { | ||
env.registerInit({ | ||
deps: { | ||
scaffolder: scaffolderActionsExtensionPoint, | ||
config: coreServices.rootConfig, | ||
}, | ||
async init({ scaffolder, config }) { | ||
const integrations = ScmIntegrations.fromConfig(config); | ||
|
||
scaffolder.addActions(cloneAzureRepoAction({ integrations }), pushAzureRepoAction({ integrations, config }), pullRequestAzureRepoAction({ integrations })); | ||
}, | ||
}); | ||
}, | ||
}); |
Oops, something went wrong.