@bussolabs/closeyourit-cli 0.6.0 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -10,6 +10,7 @@ export default class ProjectsGithubUpdate extends BaseCommand {
|
|
|
10
10
|
'sync-enabled': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
11
11
|
'tag-binding-enabled': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
12
12
|
'autoclose-on-merge': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
13
|
+
'sync-secrets': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
13
14
|
project: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
14
15
|
};
|
|
15
16
|
run(): Promise<unknown>;
|
|
@@ -9,6 +9,7 @@ class ProjectsGithubUpdate extends base_1.BaseCommand {
|
|
|
9
9
|
'<%= config.bin %> projects github-update -p LBRA --production-environment-id <env-uuid>',
|
|
10
10
|
'<%= config.bin %> projects github-update -p LBRA --no-tag-binding-enabled',
|
|
11
11
|
'<%= config.bin %> projects github-update -p LBRA --default-branch main --autoclose-on-merge',
|
|
12
|
+
'<%= config.bin %> projects github-update -p LBRA --sync-secrets',
|
|
12
13
|
];
|
|
13
14
|
static flags = {
|
|
14
15
|
...base_1.projectFlag,
|
|
@@ -28,6 +29,10 @@ class ProjectsGithubUpdate extends base_1.BaseCommand {
|
|
|
28
29
|
allowNo: true,
|
|
29
30
|
description: 'Enable/disable moving the ticket to done on PR merge',
|
|
30
31
|
}),
|
|
32
|
+
'sync-secrets': core_1.Flags.boolean({
|
|
33
|
+
allowNo: true,
|
|
34
|
+
description: 'Enable/disable pushing vault secrets to the GitHub Environment secrets (SECRETS_JSON)',
|
|
35
|
+
}),
|
|
31
36
|
};
|
|
32
37
|
async run() {
|
|
33
38
|
const { flags } = await this.parse(ProjectsGithubUpdate);
|
|
@@ -47,6 +52,8 @@ class ProjectsGithubUpdate extends base_1.BaseCommand {
|
|
|
47
52
|
body.tag_binding_enabled = flags['tag-binding-enabled'];
|
|
48
53
|
if (flags['autoclose-on-merge'] !== undefined)
|
|
49
54
|
body.autoclose_on_merge = flags['autoclose-on-merge'];
|
|
55
|
+
if (flags['sync-secrets'] !== undefined)
|
|
56
|
+
body.sync_secrets = flags['sync-secrets'];
|
|
50
57
|
// The GitHub action responds to both PATCH and PUT (Rails singleton `resource` update); the CLI
|
|
51
58
|
// transport speaks PUT — the backend applies only the keys present in the body either way.
|
|
52
59
|
const res = await this.api.put(`/cli/v1/projects/${encodeURIComponent(projectId)}/github`, body);
|