@simplysf/simply-gitlab 0.12.0 → 0.13.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.
- package/README.md +757 -221
- package/docs/guides/credentials.md +16 -0
- package/docs/guides/scripting.md +20 -0
- package/docs/guides/write-safety.md +5 -5
- package/lib/commands/gitlab/branch/view.d.ts +11 -0
- package/lib/commands/gitlab/branch/view.js +51 -0
- package/lib/commands/gitlab/branch/view.js.map +1 -0
- package/lib/commands/gitlab/commit/compare.d.ts +13 -0
- package/lib/commands/gitlab/commit/compare.js +57 -0
- package/lib/commands/gitlab/commit/compare.js.map +1 -0
- package/lib/commands/gitlab/mr/list.d.ts +1 -1
- package/lib/commands/gitlab/mr/view.d.ts +1 -0
- package/lib/commands/gitlab/mr/view.js +8 -2
- package/lib/commands/gitlab/mr/view.js.map +1 -1
- package/lib/commands/gitlab/release/create.d.ts +20 -0
- package/lib/commands/gitlab/release/create.js +69 -0
- package/lib/commands/gitlab/release/create.js.map +1 -0
- package/lib/commands/gitlab/release/view.d.ts +11 -0
- package/lib/commands/gitlab/release/view.js +50 -0
- package/lib/commands/gitlab/release/view.js.map +1 -0
- package/lib/shared/base-command.d.ts +2 -0
- package/lib/shared/base-command.js +18 -3
- package/lib/shared/base-command.js.map +1 -1
- package/oclif.manifest.json +1577 -687
- package/package.json +3 -3
|
@@ -46,6 +46,22 @@ like it should.
|
|
|
46
46
|
OAuth 2 tokens are not supported: GitLab accepts those only as `Authorization: Bearer`, and this
|
|
47
47
|
CLI runs no OAuth flow.
|
|
48
48
|
|
|
49
|
+
## CI job tokens
|
|
50
|
+
|
|
51
|
+
Inside a pipeline, `CI_JOB_TOKEN` can stand in for an access token. GitLab accepts it only under its
|
|
52
|
+
own `JOB-TOKEN` header, so say which kind of token it is:
|
|
53
|
+
|
|
54
|
+
```sh
|
|
55
|
+
SIMPLY_GITLAB_TOKEN=$CI_JOB_TOKEN SIMPLY_GITLAB_TOKEN_KIND=job simply gitlab release view --tag "$CI_COMMIT_TAG"
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
`--gitlab-token-kind job` does the same from the command line. The kind is `personal` unless you set
|
|
59
|
+
it, and any value other than `personal` or `job` is an error rather than a silent fallback. This
|
|
60
|
+
variable is new, so it has no unprefixed name.
|
|
61
|
+
|
|
62
|
+
A job token can reach only some endpoints, and which ones depends on the GitLab version and on the
|
|
63
|
+
project's job token settings. A refused call is the usual authentication error, exit code `3`.
|
|
64
|
+
|
|
49
65
|
## Precedence
|
|
50
66
|
|
|
51
67
|
Explicit flags beat the environment, which beats the file's contents. That ordering is what makes
|
package/docs/guides/scripting.md
CHANGED
|
@@ -103,6 +103,26 @@ simply gitlab ci job list --project group/project --scope failed --limit 5 --jso
|
|
|
103
103
|
failures and certificate problems do not retry, because another attempt cannot fix them. A script
|
|
104
104
|
does not need its own retry loop around these commands.
|
|
105
105
|
|
|
106
|
+
The exception is `commit create`. A commit has nothing GitLab could use to spot a duplicate, so if a
|
|
107
|
+
proxy answers 502 after GitLab has already made the commit, sending it again would make a second
|
|
108
|
+
one. That command is therefore retried only when the request provably never reached GitLab (a 429,
|
|
109
|
+
or a refused connection). Any other failure is raised straight away, and the `--json` error carries
|
|
110
|
+
`"maybeApplied": true`:
|
|
111
|
+
|
|
112
|
+
```json
|
|
113
|
+
{
|
|
114
|
+
"error": {
|
|
115
|
+
"name": "HttpError",
|
|
116
|
+
"message": "... The change may have been applied anyway; check before retrying.",
|
|
117
|
+
"exitCode": 1,
|
|
118
|
+
"status": 502,
|
|
119
|
+
"maybeApplied": true
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
When you see it, check the branch with `commit list` before deciding whether to send the commit again.
|
|
125
|
+
|
|
106
126
|
## Never interactive
|
|
107
127
|
|
|
108
128
|
No command prompts or blocks on stdin. Every write takes `--dry-run`, and the one that cannot be
|
|
@@ -3,13 +3,13 @@ title: Write safety
|
|
|
3
3
|
description: The layers between a Simply GitLab command and a change to your repository, which of them is a real boundary, and why CI variable values are hidden by default.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
`commit create`, `mr create`, `mr update`, and `
|
|
8
|
-
Those
|
|
6
|
+
Nine commands change data — `project create`, `branch create`, `file create`, `file update`,
|
|
7
|
+
`commit create`, `mr create`, `mr update`, `mr merge`, and `release create`. Nothing in this CLI
|
|
8
|
+
deletes anything. Those nine sit behind several layers, and only the last is a real boundary.
|
|
9
9
|
|
|
10
10
|
## `--confirm` only where it cannot be undone
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
Eight of those writes either create something or edit a merge request, and both are recoverable: a
|
|
13
13
|
branch can be deleted, a file can be committed over, a closed merge request can be reopened.
|
|
14
14
|
Requiring a confirmation for actions like those would train you to pass it always, at which point
|
|
15
15
|
it protects nothing while still implying that it does.
|
|
@@ -21,7 +21,7 @@ which merges without the merge train testing the change, requires it.
|
|
|
21
21
|
|
|
22
22
|
## `--dry-run`
|
|
23
23
|
|
|
24
|
-
Accepted by all
|
|
24
|
+
Accepted by all nine. It prints the exact request body that would be sent and sends nothing, which
|
|
25
25
|
is the cheapest way to see what is about to happen. The one nuance is `project create`: a namespace
|
|
26
26
|
or template given as a path is still looked up, so the printed ids are the ones that would be sent.
|
|
27
27
|
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { GitLabCommand } from '../../../shared/base-command.js';
|
|
2
|
+
export default class GitlabBranchView extends GitLabCommand<typeof GitlabBranchView> {
|
|
3
|
+
static readonly summary = "Show one branch.";
|
|
4
|
+
static readonly description: string;
|
|
5
|
+
static readonly examples: string[];
|
|
6
|
+
static readonly flags: {
|
|
7
|
+
branch: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
8
|
+
project: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
9
|
+
};
|
|
10
|
+
run(): Promise<unknown>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2026, SimplySF.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import { Flags } from '@oclif/core';
|
|
17
|
+
import { formatKeyValue } from '@simplysf/simply-gitlab-core';
|
|
18
|
+
import { GitLabCommand, projectFlag } from '../../../shared/base-command.js';
|
|
19
|
+
export default class GitlabBranchView extends GitLabCommand {
|
|
20
|
+
static summary = 'Show one branch.';
|
|
21
|
+
static description = 'Looks the branch up by its exact name, unlike branch list --search, which matches any part of ' +
|
|
22
|
+
'a name. A branch that does not exist fails with status 404. So does a project the token cannot ' +
|
|
23
|
+
'see, so a 404 alone does not prove the branch is missing.';
|
|
24
|
+
static examples = [
|
|
25
|
+
'<%= config.bin %> <%= command.id %> --project group/project --branch main',
|
|
26
|
+
'<%= config.bin %> <%= command.id %> --project group/project --branch release/1.2 --json',
|
|
27
|
+
];
|
|
28
|
+
static flags = {
|
|
29
|
+
...projectFlag,
|
|
30
|
+
branch: Flags.string({ summary: 'Exact branch name.', required: true }),
|
|
31
|
+
};
|
|
32
|
+
async run() {
|
|
33
|
+
const branch = (await this.gitlab().getBranch(this.flags.project, this.flags.branch));
|
|
34
|
+
const traits = [
|
|
35
|
+
branch.default === true ? 'default' : undefined,
|
|
36
|
+
branch.protected === true ? 'protected' : undefined,
|
|
37
|
+
branch.merged === true ? 'merged' : undefined,
|
|
38
|
+
].filter((trait) => trait !== undefined);
|
|
39
|
+
this.logSafe(formatKeyValue([
|
|
40
|
+
['Branch', branch.name ?? this.flags.branch],
|
|
41
|
+
['Traits', traits.length === 0 ? undefined : traits.join(', ')],
|
|
42
|
+
['Commit', branch.commit?.id],
|
|
43
|
+
['Title', branch.commit?.title],
|
|
44
|
+
['Author', branch.commit?.author_name],
|
|
45
|
+
['Date', branch.commit?.committed_date],
|
|
46
|
+
['URL', branch.web_url],
|
|
47
|
+
]));
|
|
48
|
+
return branch;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
//# sourceMappingURL=view.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"view.js","sourceRoot":"","sources":["../../../../src/commands/gitlab/branch/view.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACpC,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAgB7E,MAAM,CAAC,OAAO,OAAO,gBAAiB,SAAQ,aAAsC;IAC3E,MAAM,CAAmB,OAAO,GAAG,kBAAkB,CAAC;IACtD,MAAM,CAAmB,WAAW,GACzC,gGAAgG;QAChG,iGAAiG;QACjG,2DAA2D,CAAC;IAEvD,MAAM,CAAmB,QAAQ,GAAG;QACzC,2EAA2E;QAC3E,yFAAyF;KAC1F,CAAC;IAEK,MAAM,CAAmB,KAAK,GAAG;QACtC,GAAG,WAAW;QACd,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,oBAAoB,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;KACxE,CAAC;IAEK,KAAK,CAAC,GAAG;QACd,MAAM,MAAM,GAAG,CAAC,MAAM,IAAI,CAAC,MAAM,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAW,CAAC;QAEhG,MAAM,MAAM,GAAG;YACb,MAAM,CAAC,OAAO,KAAK,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS;YAC/C,MAAM,CAAC,SAAS,KAAK,IAAI,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS;YACnD,MAAM,CAAC,MAAM,KAAK,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS;SAC9C,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC;QAEzC,IAAI,CAAC,OAAO,CACV,cAAc,CAAC;YACb,CAAC,QAAQ,EAAE,MAAM,CAAC,IAAI,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC;YAC5C,CAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YAC/D,CAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,EAAE,CAAC;YAC7B,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC;YAC/B,CAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC;YACtC,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC;YACvC,CAAC,KAAK,EAAE,MAAM,CAAC,OAAO,CAAC;SACxB,CAAC,CACH,CAAC;QACF,OAAO,MAAM,CAAC;IAChB,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { GitLabCommand } from '../../../shared/base-command.js';
|
|
2
|
+
export default class GitlabCommitCompare extends GitLabCommand<typeof GitlabCommitCompare> {
|
|
3
|
+
static readonly summary = "Compare two branches, tags, or commits.";
|
|
4
|
+
static readonly description: string;
|
|
5
|
+
static readonly examples: string[];
|
|
6
|
+
static readonly flags: {
|
|
7
|
+
from: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
8
|
+
to: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
9
|
+
straight: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
10
|
+
project: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
|
+
};
|
|
12
|
+
run(): Promise<unknown>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2026, SimplySF.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import { Flags } from '@oclif/core';
|
|
17
|
+
import { commitColumns, formatTable } from '@simplysf/simply-gitlab-core';
|
|
18
|
+
import { GitLabCommand, projectFlag } from '../../../shared/base-command.js';
|
|
19
|
+
export default class GitlabCommitCompare extends GitLabCommand {
|
|
20
|
+
static summary = 'Compare two branches, tags, or commits.';
|
|
21
|
+
static description = 'Lists the commits on --to that are not on --from, and counts the files they change. By ' +
|
|
22
|
+
'default the comparison starts where the two refs diverge, which answers "what would merging ' +
|
|
23
|
+
'--to bring in". --straight compares the two refs directly instead.\n\n' +
|
|
24
|
+
'GitLab limits how much one comparison returns and says so in the payload rather than ' +
|
|
25
|
+
'failing; this command says so too. Use --json for the diffs themselves.';
|
|
26
|
+
static examples = [
|
|
27
|
+
'<%= config.bin %> <%= command.id %> --project group/project --from v1.2.0 --to main',
|
|
28
|
+
'<%= config.bin %> <%= command.id %> --project group/project --from main --to feature --straight --json',
|
|
29
|
+
];
|
|
30
|
+
static flags = {
|
|
31
|
+
...projectFlag,
|
|
32
|
+
from: Flags.string({ summary: 'Branch, tag, or SHA to compare from.', required: true }),
|
|
33
|
+
to: Flags.string({ summary: 'Branch, tag, or SHA to compare to.', required: true }),
|
|
34
|
+
straight: Flags.boolean({
|
|
35
|
+
summary: 'Compare the two refs directly rather than from where they diverge.',
|
|
36
|
+
default: false,
|
|
37
|
+
}),
|
|
38
|
+
};
|
|
39
|
+
async run() {
|
|
40
|
+
const comparison = (await this.gitlab().compare(this.flags.project, this.flags.from, this.flags.to, {
|
|
41
|
+
straight: this.flags.straight || undefined,
|
|
42
|
+
}));
|
|
43
|
+
const commits = comparison.commits ?? [];
|
|
44
|
+
if (commits.length === 0) {
|
|
45
|
+
this.logSafe(`No commits on ${this.flags.to} that are not on ${this.flags.from}.`);
|
|
46
|
+
}
|
|
47
|
+
else {
|
|
48
|
+
this.logSafe(formatTable(commits, commitColumns));
|
|
49
|
+
this.log(`\n${commits.length} commit(s), ${comparison.diffs?.length ?? 0} file(s) changed.`);
|
|
50
|
+
}
|
|
51
|
+
if (comparison.compare_timeout === true) {
|
|
52
|
+
this.log('GitLab stopped the comparison early, so this result is incomplete.');
|
|
53
|
+
}
|
|
54
|
+
return comparison;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
//# sourceMappingURL=compare.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compare.js","sourceRoot":"","sources":["../../../../src/commands/gitlab/commit/compare.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,KAAK,EA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,OAAO,CAAC,iBAAiB,IAAI,CAAC,KAAK,CAAC,EAAE,oBAAoB,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,CAAC,CAAC;QACrF,CAAC;aAAM,CAAC;YACN,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,OAAO,EAAE,aAAa,CAAC,CAAC,CAAC;YAClD,IAAI,CAAC,GAAG,CAAC,KAAK,OAAO,CAAC,MAAM,eAAe,UAAU,CAAC,KAAK,EAAE,MAAM,IAAI,CAAC,mBAAmB,CAAC,CAAC;QAC/F,CAAC;QACD,IAAI,UAAU,CAAC,eAAe,KAAK,IAAI,EAAE,CAAC;YACxC,IAAI,CAAC,GAAG,CAAC,oEAAoE,CAAC,CAAC;QACjF,CAAC;QACD,OAAO,UAAU,CAAC;IACpB,CAAC"}
|
|
@@ -4,7 +4,7 @@ export default class GitlabMrList extends GitLabCommand<typeof GitlabMrList> {
|
|
|
4
4
|
static readonly description: string;
|
|
5
5
|
static readonly examples: string[];
|
|
6
6
|
static readonly flags: {
|
|
7
|
-
state: import("@oclif/core/interfaces").OptionFlag<"
|
|
7
|
+
state: import("@oclif/core/interfaces").OptionFlag<"merged" | "opened" | "closed" | "locked" | "all", import("@oclif/core/interfaces").CustomOptions>;
|
|
8
8
|
'source-branch': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
9
9
|
'target-branch': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
10
10
|
'author-username': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
@@ -5,6 +5,7 @@ export default class GitlabMrView extends GitLabCommand<typeof GitlabMrView> {
|
|
|
5
5
|
static readonly examples: string[];
|
|
6
6
|
static readonly flags: {
|
|
7
7
|
mr: import("@oclif/core/interfaces").OptionFlag<number, import("@oclif/core/interfaces").CustomOptions>;
|
|
8
|
+
recheck: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
8
9
|
project: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
9
10
|
};
|
|
10
11
|
run(): Promise<unknown>;
|
|
@@ -20,18 +20,24 @@ export default class GitlabMrView extends GitLabCommand {
|
|
|
20
20
|
static summary = 'Show one merge request.';
|
|
21
21
|
static description = 'Takes the project-scoped iid — the number in the merge request URL — not the instance-wide ' +
|
|
22
22
|
'id. Use --json for the full payload, which carries the pipeline status, approvals, and diff ' +
|
|
23
|
-
'refs the summary below leaves out
|
|
23
|
+
'refs the summary below leaves out.\n\n' +
|
|
24
|
+
'Right after a push, GitLab can report a merge status it has not finished working out. ' +
|
|
25
|
+
'--recheck asks it to work the status out again before answering.';
|
|
24
26
|
static examples = [
|
|
25
27
|
'<%= config.bin %> <%= command.id %> --project group/project --mr 42',
|
|
26
28
|
'<%= config.bin %> <%= command.id %> --project group/project --mr 42 --json',
|
|
29
|
+
'<%= config.bin %> <%= command.id %> --project group/project --mr 42 --recheck',
|
|
27
30
|
];
|
|
28
31
|
static flags = {
|
|
29
32
|
...projectFlag,
|
|
30
33
|
mr: Flags.integer({ summary: 'Merge request iid.', required: true }),
|
|
34
|
+
recheck: Flags.boolean({ summary: 'Ask GitLab to recheck the merge status first.', default: false }),
|
|
31
35
|
};
|
|
32
36
|
async run() {
|
|
33
37
|
const iid = assertIid(this.flags.mr);
|
|
34
|
-
const mr = (await this.gitlab().getMergeRequest(this.flags.project, iid
|
|
38
|
+
const mr = (await this.gitlab().getMergeRequest(this.flags.project, iid, {
|
|
39
|
+
recheckMergeStatus: this.flags.recheck || undefined,
|
|
40
|
+
}));
|
|
35
41
|
this.logSafe(formatKeyValue([
|
|
36
42
|
['Merge request', `!${mr.iid ?? iid}`],
|
|
37
43
|
['Title', mr.title],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"view.js","sourceRoot":"","sources":["../../../../src/commands/gitlab/mr/view.ts"],"names":[],"mappings":"AAAA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AC;QACF,IAAI,OAAO,EAAE,CAAC,WAAW,KAAK,QAAQ,IAAI,EAAE,CAAC,WAAW,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC;YACvE,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;YACb,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC,WAAW,CAAC,OAAO,EAAE,CAAC,CAAC;QACzC,CAAC;QAED,OAAO,EAAE,CAAC;IACZ,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { GitLabCommand } from '../../../shared/base-command.js';
|
|
2
|
+
export default class GitlabReleaseCreate extends GitLabCommand<typeof GitlabReleaseCreate> {
|
|
3
|
+
static isWrite: boolean;
|
|
4
|
+
static readonly summary = "Create a release.";
|
|
5
|
+
static readonly description: string;
|
|
6
|
+
static readonly examples: string[];
|
|
7
|
+
static readonly flags: {
|
|
8
|
+
tag: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
9
|
+
name: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
10
|
+
description: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
11
|
+
ref: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
12
|
+
milestone: import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
|
+
'released-at': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
14
|
+
body: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
15
|
+
'body-file': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
16
|
+
'dry-run': import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
17
|
+
project: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
18
|
+
};
|
|
19
|
+
run(): Promise<unknown>;
|
|
20
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2026, SimplySF.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import { Flags } from '@oclif/core';
|
|
17
|
+
import { buildReleaseCreateBody, formatKeyValue, parseBodyInput } from '@simplysf/simply-gitlab-core';
|
|
18
|
+
import { GitLabCommand, projectFlag, writeFlags } from '../../../shared/base-command.js';
|
|
19
|
+
export default class GitlabReleaseCreate extends GitLabCommand {
|
|
20
|
+
static isWrite = true;
|
|
21
|
+
static summary = 'Create a release.';
|
|
22
|
+
static description = 'Attaches a release to --tag. When the tag does not exist yet, pass --ref and GitLab creates ' +
|
|
23
|
+
'the tag there first. When the tag exists, --ref is ignored, so this never moves a tag. A tag ' +
|
|
24
|
+
'carries at most one release, and a second create for it is refused with status 409.\n\n' +
|
|
25
|
+
'--body or --body-file supplies raw JSON for anything the flags do not cover, such as asset ' +
|
|
26
|
+
'links. Use --dry-run to see exactly what would be sent.';
|
|
27
|
+
static examples = [
|
|
28
|
+
'<%= config.bin %> <%= command.id %> --project group/project --tag v1.2.0 --name 1.2.0 --description "Bug fixes."',
|
|
29
|
+
'<%= config.bin %> <%= command.id %> --project group/project --tag v1.3.0 --ref main --dry-run',
|
|
30
|
+
];
|
|
31
|
+
static flags = {
|
|
32
|
+
...projectFlag,
|
|
33
|
+
...writeFlags,
|
|
34
|
+
tag: Flags.string({ summary: 'Tag to attach the release to.' }),
|
|
35
|
+
name: Flags.string({ summary: 'Release title. GitLab uses the tag name when it is omitted.' }),
|
|
36
|
+
description: Flags.string({ summary: 'Release notes, as Markdown.' }),
|
|
37
|
+
ref: Flags.string({ summary: 'Branch, tag, or SHA to create the tag from, when it does not exist yet.' }),
|
|
38
|
+
milestone: Flags.string({ summary: 'Milestone title to associate. Repeatable.', multiple: true }),
|
|
39
|
+
'released-at': Flags.string({ summary: 'Release date, as ISO 8601. Defaults to now.' }),
|
|
40
|
+
body: Flags.string({ summary: 'Raw JSON request body.', exclusive: ['body-file'] }),
|
|
41
|
+
'body-file': Flags.string({ summary: 'Path to a file holding the raw JSON request body.' }),
|
|
42
|
+
};
|
|
43
|
+
async run() {
|
|
44
|
+
const request = buildReleaseCreateBody({
|
|
45
|
+
tagName: this.flags.tag,
|
|
46
|
+
name: this.flags.name,
|
|
47
|
+
description: this.flags.description,
|
|
48
|
+
ref: this.flags.ref,
|
|
49
|
+
milestones: this.flags.milestone,
|
|
50
|
+
releasedAt: this.flags['released-at'],
|
|
51
|
+
body: parseBodyInput(this.flags.body, this.flags['body-file']),
|
|
52
|
+
});
|
|
53
|
+
if (this.flags['dry-run']) {
|
|
54
|
+
this.log('Dry run — not sent. Request body:');
|
|
55
|
+
this.logSafe(JSON.stringify(request, null, 2));
|
|
56
|
+
return request;
|
|
57
|
+
}
|
|
58
|
+
const created = (await this.gitlab().createRelease(this.flags.project, request));
|
|
59
|
+
this.logSafe(formatKeyValue([
|
|
60
|
+
['Created', created.name ?? created.tag_name],
|
|
61
|
+
['Tag', created.tag_name],
|
|
62
|
+
['Commit', created.commit?.id],
|
|
63
|
+
// eslint-disable-next-line no-underscore-dangle -- GitLab's field name
|
|
64
|
+
['URL', created._links?.self],
|
|
65
|
+
]));
|
|
66
|
+
return created;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
//# sourceMappingURL=create.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create.js","sourceRoot":"","sources":["../../../../src/commands/gitlab/release/create.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACpC,OAAO,EAAE,sBAAsB,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AACtG,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AASzF,MAAM,CAAC,OAAO,OAAO,mBAAoB,SAAQ,aAAyC;IACjF,MAAM,CAAU,OAAO,GAAG,IAAI,CAAC;IAE/B,MAAM,CAAmB,OAAO,GAAG,mBAAmB,CAAC;IACvD,MAAM,CAAmB,WAAW,GACzC,8FAA8F;QAC9F,+FAA+F;QAC/F,yFAAyF;QACzF,6FAA6F;QAC7F,yDAAyD,CAAC;IAErD,MAAM,CAAmB,QAAQ,GAAG;QACzC,kHAAkH;QAClH,+FAA+F;KAChG,CAAC;IAEK,MAAM,CAAmB,KAAK,GAAG;QACtC,GAAG,WAAW;QACd,GAAG,UAAU;QACb,GAAG,EAAE,KAAK,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,+BAA+B,EAAE,CAAC;QAC/D,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,6DAA6D,EAAE,CAAC;QAC9F,WAAW,EAAE,KAAK,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,6BAA6B,EAAE,CAAC;QACrE,GAAG,EAAE,KAAK,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,yEAAyE,EAAE,CAAC;QACzG,SAAS,EAAE,KAAK,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,2CAA2C,EAAE,QAAQ,EAAE,IAAI,EAAE,CA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,OAAO,CAAC,IAAI,IAAI,OAAO,CAAC,QAAQ,CAAC;YAC7C,CAAC,KAAK,EAAE,OAAO,CAAC,QAAQ,CAAC;YACzB,CAAC,QAAQ,EAAE,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC;YAC9B,uEAAuE;YACvE,CAAC,KAAK,EAAE,OAAO,CAAC,MAAM,EAAE,IAAI,CAAC;SAC9B,CAAC,CACH,CAAC;QACF,OAAO,OAAO,CAAC;IACjB,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { GitLabCommand } from '../../../shared/base-command.js';
|
|
2
|
+
export default class GitlabReleaseView extends GitLabCommand<typeof GitlabReleaseView> {
|
|
3
|
+
static readonly summary = "Show one release.";
|
|
4
|
+
static readonly description: string;
|
|
5
|
+
static readonly examples: string[];
|
|
6
|
+
static readonly flags: {
|
|
7
|
+
tag: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
8
|
+
project: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
9
|
+
};
|
|
10
|
+
run(): Promise<unknown>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2026, SimplySF.
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import { Flags } from '@oclif/core';
|
|
17
|
+
import { formatKeyValue } from '@simplysf/simply-gitlab-core';
|
|
18
|
+
import { GitLabCommand, projectFlag } from '../../../shared/base-command.js';
|
|
19
|
+
export default class GitlabReleaseView extends GitLabCommand {
|
|
20
|
+
static summary = 'Show one release.';
|
|
21
|
+
static description = 'Looks the release up by its tag. A tag that has no release fails with status 404, as does a ' +
|
|
22
|
+
'project the token cannot see. Use --json for asset links and milestones.';
|
|
23
|
+
static examples = [
|
|
24
|
+
'<%= config.bin %> <%= command.id %> --project group/project --tag v1.2.0',
|
|
25
|
+
'<%= config.bin %> <%= command.id %> --project group/project --tag v1.2.0 --json',
|
|
26
|
+
];
|
|
27
|
+
static flags = {
|
|
28
|
+
...projectFlag,
|
|
29
|
+
tag: Flags.string({ summary: 'Tag the release is attached to.', required: true }),
|
|
30
|
+
};
|
|
31
|
+
async run() {
|
|
32
|
+
const release = (await this.gitlab().getRelease(this.flags.project, this.flags.tag));
|
|
33
|
+
const released = release.upcoming_release === true ? `${release.released_at ?? '?'} (upcoming)` : release.released_at;
|
|
34
|
+
this.logSafe(formatKeyValue([
|
|
35
|
+
['Release', release.name],
|
|
36
|
+
['Tag', release.tag_name ?? this.flags.tag],
|
|
37
|
+
['Commit', release.commit?.id],
|
|
38
|
+
['Author', release.author?.username],
|
|
39
|
+
['Released', released],
|
|
40
|
+
// eslint-disable-next-line no-underscore-dangle -- GitLab's field name
|
|
41
|
+
['URL', release._links?.self],
|
|
42
|
+
]));
|
|
43
|
+
if (typeof release.description === 'string' && release.description.trim() !== '') {
|
|
44
|
+
this.log('');
|
|
45
|
+
this.logSafe(release.description.trimEnd());
|
|
46
|
+
}
|
|
47
|
+
return release;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
//# sourceMappingURL=view.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"view.js","sourceRoot":"","sources":["../../../../src/commands/gitlab/release/view.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,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AAQ,CAAC;YACtB,uEAAuE;YACvE,CAAC,KAAK,EAAE,OAAO,CAAC,MAAM,EAAE,IAAI,CAAC;SAC9B,CAAC,CACH,CAAC;QACF,IAAI,OAAO,OAAO,CAAC,WAAW,KAAK,QAAQ,IAAI,OAAO,CAAC,WAAW,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC;YACjF,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;YACb,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,WAAW,CAAC,OAAO,EAAE,CAAC,CAAC;QAC9C,CAAC;QACD,OAAO,OAAO,CAAC;IACjB,CAAC"}
|
|
@@ -28,6 +28,7 @@ export declare function limitFlag(fallback: number, what: string): {
|
|
|
28
28
|
declare const gitlabFlags: {
|
|
29
29
|
'gitlab-url': Interfaces.OptionFlag<string | undefined, Interfaces.CustomOptions>;
|
|
30
30
|
'gitlab-token': Interfaces.OptionFlag<string | undefined, Interfaces.CustomOptions>;
|
|
31
|
+
'gitlab-token-kind': Interfaces.OptionFlag<"personal" | "job" | undefined, Interfaces.CustomOptions>;
|
|
31
32
|
'env-file': Interfaces.OptionFlag<string | undefined, Interfaces.CustomOptions>;
|
|
32
33
|
};
|
|
33
34
|
export type GitLabFlags<T extends typeof Command> = Interfaces.InferredFlags<typeof gitlabFlags & T['flags']>;
|
|
@@ -45,6 +46,7 @@ export declare abstract class GitLabCommand<T extends typeof Command> extends Co
|
|
|
45
46
|
static baseFlags: {
|
|
46
47
|
'gitlab-url': Interfaces.OptionFlag<string | undefined, Interfaces.CustomOptions>;
|
|
47
48
|
'gitlab-token': Interfaces.OptionFlag<string | undefined, Interfaces.CustomOptions>;
|
|
49
|
+
'gitlab-token-kind': Interfaces.OptionFlag<"personal" | "job" | undefined, Interfaces.CustomOptions>;
|
|
48
50
|
'env-file': Interfaces.OptionFlag<string | undefined, Interfaces.CustomOptions>;
|
|
49
51
|
};
|
|
50
52
|
/**
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
*/
|
|
16
16
|
import process from 'node:process';
|
|
17
17
|
import { Command, Flags } from '@oclif/core';
|
|
18
|
-
import { assertWritesAllowed, AuthError, CliError, collectSecrets, deprecatedEnvWarning, LEGACY_ENV, GitLabClient, HttpError, loadEnvFile, redactSecrets, resolveGitLabConfig, sanitiseDeep, SECRET_ENV, stripControl, } from '@simplysf/simply-gitlab-core';
|
|
18
|
+
import { assertWritesAllowed, AuthError, CliError, collectSecrets, deprecatedEnvWarning, LEGACY_ENV, GitLabClient, HttpError, loadEnvFile, NetworkError, redactSecrets, resolveGitLabConfig, sanitiseDeep, SECRET_ENV, stripControl, } from '@simplysf/simply-gitlab-core';
|
|
19
19
|
/**
|
|
20
20
|
* Splits a comma-separated flag value, dropping blanks. `--labels ''` and `--labels 'a,'` would
|
|
21
21
|
* otherwise yield an empty label, which GitLab stores as one.
|
|
@@ -114,8 +114,9 @@ const envFileFlag = {
|
|
|
114
114
|
summary: 'Path to a .env file holding connection settings.',
|
|
115
115
|
description: 'Loaded before anything else. Variables already present in the environment win, so the ' +
|
|
116
116
|
'file never overrides an explicit export, and only GitLab connection variables ' +
|
|
117
|
-
'(SIMPLY_GITLAB_URL, SIMPLY_GITLAB_TOKEN,
|
|
118
|
-
'
|
|
117
|
+
'(SIMPLY_GITLAB_URL, SIMPLY_GITLAB_TOKEN, SIMPLY_GITLAB_TOKEN_KIND, SIMPLY_GITLAB_SSL_VERIFY, ' +
|
|
118
|
+
'SIMPLY_GITLAB_READ_ONLY, and the deprecated unprefixed names of all but the token kind) are ' +
|
|
119
|
+
'read from it. A path that cannot be read is an error.',
|
|
119
120
|
helpGroup: 'CONNECTION',
|
|
120
121
|
}),
|
|
121
122
|
};
|
|
@@ -131,6 +132,15 @@ const gitlabFlags = {
|
|
|
131
132
|
env: 'SIMPLY_GITLAB_TOKEN',
|
|
132
133
|
helpGroup: 'CONNECTION',
|
|
133
134
|
}),
|
|
135
|
+
'gitlab-token-kind': Flags.option({
|
|
136
|
+
options: ['personal', 'job'],
|
|
137
|
+
summary: 'What kind of token --gitlab-token is. Defaults to personal.',
|
|
138
|
+
description: "Pass job when the token is a pipeline's CI_JOB_TOKEN, which GitLab accepts under a different " +
|
|
139
|
+
'header from every other token. A job token can reach only some endpoints, and which ones ' +
|
|
140
|
+
"depends on the instance and on the project's job token settings.",
|
|
141
|
+
env: 'SIMPLY_GITLAB_TOKEN_KIND',
|
|
142
|
+
helpGroup: 'CONNECTION',
|
|
143
|
+
})(),
|
|
134
144
|
};
|
|
135
145
|
/**
|
|
136
146
|
* Everything every command shares: `--json` (oclif prints whatever `run()` returns, verbatim),
|
|
@@ -187,6 +197,7 @@ export class GitLabCommand extends Command {
|
|
|
187
197
|
const overrides = {
|
|
188
198
|
url: this.flagValue('gitlab-url'),
|
|
189
199
|
token: this.flagValue('gitlab-token'),
|
|
200
|
+
tokenKind: this.flagValue('gitlab-token-kind'),
|
|
190
201
|
};
|
|
191
202
|
return resolveGitLabConfig(overrides);
|
|
192
203
|
}
|
|
@@ -220,6 +231,10 @@ export class GitLabCommand extends Command {
|
|
|
220
231
|
message,
|
|
221
232
|
exitCode,
|
|
222
233
|
...(error instanceof HttpError ? { status: error.status, body: sanitiseDeep(error.body, redact) } : {}),
|
|
234
|
+
// Only when set: a write that failed this way may have landed, and must not be blindly retried.
|
|
235
|
+
...((error instanceof HttpError || error instanceof NetworkError) && error.maybeApplied
|
|
236
|
+
? { maybeApplied: true }
|
|
237
|
+
: {}),
|
|
223
238
|
...(error instanceof AuthError ? { status: error.status } : {}),
|
|
224
239
|
},
|
|
225
240
|
})}\n`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base-command.js","sourceRoot":"","sources":["../../src/shared/base-command.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,OAAO,MAAM,cAAc,CAAC;AACnC,OAAO,EAAE,OAAO,EAAE,KAAK,EAAmB,MAAM,aAAa,CAAC;AAC9D,OAAO,EACL,mBAAm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