@salesforce/plugin-devops-center 1.2.28 → 1.4.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 +184 -89
- package/bin/dev.js +0 -0
- package/bin/run.js +0 -0
- package/lib/commands/devops/pipeline/activate.js +5 -0
- package/lib/commands/devops/pipeline/activate.js.map +1 -1
- package/lib/commands/devops/pipeline/create.d.ts +2 -1
- package/lib/commands/devops/pipeline/create.js +37 -7
- package/lib/commands/devops/pipeline/create.js.map +1 -1
- package/lib/commands/devops/pipeline/{attach-project.d.ts → project/add.d.ts} +2 -2
- package/lib/commands/devops/pipeline/{attach-project.js → project/add.js} +5 -5
- package/lib/commands/devops/pipeline/project/add.js.map +1 -0
- package/lib/commands/devops/pull-request/create.d.ts +0 -2
- package/lib/commands/devops/pull-request/create.js +8 -40
- package/lib/commands/devops/pull-request/create.js.map +1 -1
- package/lib/commands/devops/stage/branch/add.d.ts +17 -0
- package/lib/commands/devops/stage/branch/add.js +110 -0
- package/lib/commands/devops/stage/branch/add.js.map +1 -0
- package/lib/commands/devops/stage/environment/add.d.ts +18 -0
- package/lib/commands/devops/stage/environment/add.js +141 -0
- package/lib/commands/devops/stage/environment/add.js.map +1 -0
- package/lib/commands/devops/work-item/{status/update.d.ts → update.d.ts} +6 -4
- package/lib/commands/devops/work-item/{status/update.js → update.js} +30 -9
- package/lib/commands/devops/work-item/update.js.map +1 -0
- package/lib/utils/addStageBranch.d.ts +22 -0
- package/lib/utils/addStageBranch.js +48 -0
- package/lib/utils/addStageBranch.js.map +1 -0
- package/lib/utils/addStageEnvironment.d.ts +92 -0
- package/lib/utils/addStageEnvironment.js +120 -0
- package/lib/utils/addStageEnvironment.js.map +1 -0
- package/lib/utils/createPipeline.d.ts +14 -1
- package/lib/utils/createPipeline.js +52 -6
- package/lib/utils/createPipeline.js.map +1 -1
- package/lib/utils/createProject.js +1 -0
- package/lib/utils/createProject.js.map +1 -1
- package/lib/utils/createPullRequest.d.ts +7 -19
- package/lib/utils/createPullRequest.js +49 -121
- package/lib/utils/createPullRequest.js.map +1 -1
- package/lib/utils/{updateWorkItemStatus.d.ts → updateWorkItem.d.ts} +12 -14
- package/lib/utils/{updateWorkItemStatus.js → updateWorkItem.js} +28 -26
- package/lib/utils/updateWorkItem.js.map +1 -0
- package/messages/devops.pipeline.create.md +26 -6
- package/messages/devops.pull-request.create.md +6 -30
- package/messages/devops.stage.branch.add.md +46 -0
- package/messages/devops.stage.environment.add.md +65 -0
- package/messages/devops.work-item.update.md +45 -0
- package/npm-shrinkwrap.json +2 -2
- package/oclif.manifest.json +470 -267
- package/package.json +3 -3
- package/schemas/devops-pull__request-create.json +0 -3
- package/schemas/devops-stage-branch-add.json +34 -0
- package/schemas/devops-stage-environment-add.json +47 -0
- package/schemas/{devops-work__item-status-update.json → devops-work__item-update.json} +8 -2
- package/lib/commands/devops/pipeline/attach-project.js.map +0 -1
- package/lib/commands/devops/work-item/status/update.js.map +0 -1
- package/lib/utils/updateWorkItemStatus.js.map +0 -1
- package/messages/devops.work-item.status.update.md +0 -29
- /package/messages/{devops.pipeline.attach-project.md → devops.pipeline.project.add.md} +0 -0
- /package/schemas/{devops-pipeline-attach__project.json → devops-pipeline-project-add.json} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createPullRequest.js","sourceRoot":"","sources":["../../src/utils/createPullRequest.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;
|
|
1
|
+
{"version":3,"file":"createPullRequest.js","sourceRoot":"","sources":["../../src/utils/createPullRequest.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAE9C,OAAO,EACL,uBAAuB,EACvB,mBAAmB,EACnB,mBAAmB,EACnB,aAAa,EACb,sBAAsB,EACtB,oBAAoB,GACrB,MAAM,oBAAoB,CAAC;AA+B5B,SAAS,iBAAiB,CAAC,Q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AAO,CAAC,GAAG,CAAC,YAAY,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC;IAClE,IAAI,QAAQ;QAAE,OAAO,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;IAE/C,IAAI,CAAC;QACH,kEAAkE;QAClE,MAAM,KAAK,GAAG,QAAQ,CAAC,eAAe,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;QACvG,IAAI,KAAK;YAAE,OAAO,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IAC3C,CAAC;IAAC,MAAM,CAAC;QACP,4CAA4C;IAC9C,CAAC;IACD,OAAO,OAAO,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;AACpC,CAAC"}
|
|
@@ -3,32 +3,30 @@ export type WorkItemContext = {
|
|
|
3
3
|
workItemId: string;
|
|
4
4
|
projectId: string;
|
|
5
5
|
};
|
|
6
|
-
export type
|
|
6
|
+
export type UpdateWorkItemParams = {
|
|
7
7
|
connection: Connection;
|
|
8
8
|
workItemId: string;
|
|
9
9
|
projectId: string;
|
|
10
|
-
status
|
|
10
|
+
status?: string;
|
|
11
|
+
subject?: string;
|
|
12
|
+
description?: string;
|
|
11
13
|
};
|
|
12
|
-
export type
|
|
14
|
+
export type UpdateWorkItemResult = {
|
|
13
15
|
success: boolean;
|
|
14
16
|
workItemId: string;
|
|
15
17
|
workItemName?: string;
|
|
16
18
|
status?: string;
|
|
19
|
+
subject?: string;
|
|
20
|
+
description?: string;
|
|
17
21
|
error?: string;
|
|
18
22
|
};
|
|
19
|
-
/**
|
|
20
|
-
* Resolves a work item's Salesforce ID and project ID from its Name (e.g. WI-000001) via SOQL.
|
|
21
|
-
*/
|
|
22
|
-
export declare function resolveWorkItemByName(connection: Connection, workItemName: string): Promise<WorkItemContext>;
|
|
23
|
-
/**
|
|
24
|
-
* Fetches the project ID for a given work item ID via SOQL.
|
|
25
|
-
*/
|
|
26
|
-
export declare function resolveProjectIdForWorkItem(connection: Connection, workItemId: string): Promise<string>;
|
|
27
23
|
export declare const ALLOWED_STATUSES: readonly ["In Progress", "Ready to Promote"];
|
|
28
24
|
export type AllowedStatus = (typeof ALLOWED_STATUSES)[number];
|
|
29
25
|
export declare function toApiStatus(status: string): string;
|
|
26
|
+
export declare function resolveWorkItemByName(connection: Connection, workItemName: string): Promise<WorkItemContext>;
|
|
27
|
+
export declare function resolveProjectIdForWorkItem(connection: Connection, workItemId: string): Promise<string>;
|
|
30
28
|
/**
|
|
31
|
-
* Updates
|
|
32
|
-
*
|
|
29
|
+
* Updates fields on a DevOps Center work item via the Connect API.
|
|
30
|
+
* PATCH /services/data/v{version}/connect/devops/projects/{projectId}/workitem/{workItemId}
|
|
33
31
|
*/
|
|
34
|
-
export declare function
|
|
32
|
+
export declare function updateWorkItem(params: UpdateWorkItemParams): Promise<UpdateWorkItemResult>;
|
|
@@ -13,9 +13,18 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
export const ALLOWED_STATUSES = ['In Progress', 'Ready to Promote'];
|
|
17
|
+
const STATUS_LABEL_TO_API = {
|
|
18
|
+
'in progress': 'IN_PROGRESS',
|
|
19
|
+
'ready to promote': 'READY_TO_PROMOTE',
|
|
20
|
+
};
|
|
21
|
+
export function toApiStatus(status) {
|
|
22
|
+
const apiStatus = STATUS_LABEL_TO_API[status.toLowerCase()];
|
|
23
|
+
if (!apiStatus) {
|
|
24
|
+
throw new Error(`Invalid status "${status}". Allowed values: ${ALLOWED_STATUSES.join(', ')}`);
|
|
25
|
+
}
|
|
26
|
+
return apiStatus;
|
|
27
|
+
}
|
|
19
28
|
export async function resolveWorkItemByName(connection, workItemName) {
|
|
20
29
|
const result = await connection.query(`SELECT Id, DevopsProjectId FROM WorkItem WHERE Name = '${workItemName}' LIMIT 1`);
|
|
21
30
|
const record = (result.records ?? [])[0];
|
|
@@ -24,9 +33,6 @@ export async function resolveWorkItemByName(connection, workItemName) {
|
|
|
24
33
|
}
|
|
25
34
|
return { workItemId: record.Id, projectId: record.DevopsProjectId };
|
|
26
35
|
}
|
|
27
|
-
/**
|
|
28
|
-
* Fetches the project ID for a given work item ID via SOQL.
|
|
29
|
-
*/
|
|
30
36
|
export async function resolveProjectIdForWorkItem(connection, workItemId) {
|
|
31
37
|
const result = await connection.query(`SELECT DevopsProjectId FROM WorkItem WHERE Id = '${workItemId}' LIMIT 1`);
|
|
32
38
|
const record = (result.records ?? [])[0];
|
|
@@ -35,37 +41,33 @@ export async function resolveProjectIdForWorkItem(connection, workItemId) {
|
|
|
35
41
|
}
|
|
36
42
|
return record.DevopsProjectId;
|
|
37
43
|
}
|
|
38
|
-
export const ALLOWED_STATUSES = ['In Progress', 'Ready to Promote'];
|
|
39
|
-
const STATUS_LABEL_TO_API = {
|
|
40
|
-
'in progress': 'IN_PROGRESS',
|
|
41
|
-
'ready to promote': 'READY_TO_PROMOTE',
|
|
42
|
-
};
|
|
43
|
-
export function toApiStatus(status) {
|
|
44
|
-
const apiStatus = STATUS_LABEL_TO_API[status.toLowerCase()];
|
|
45
|
-
if (!apiStatus) {
|
|
46
|
-
throw new Error(`Invalid status "${status}". Allowed values: ${ALLOWED_STATUSES.join(', ')}`);
|
|
47
|
-
}
|
|
48
|
-
return apiStatus;
|
|
49
|
-
}
|
|
50
44
|
/**
|
|
51
|
-
* Updates
|
|
52
|
-
*
|
|
45
|
+
* Updates fields on a DevOps Center work item via the Connect API.
|
|
46
|
+
* PATCH /services/data/v{version}/connect/devops/projects/{projectId}/workitem/{workItemId}
|
|
53
47
|
*/
|
|
54
|
-
export async function
|
|
55
|
-
const { connection, workItemId, projectId, status } = params;
|
|
48
|
+
export async function updateWorkItem(params) {
|
|
49
|
+
const { connection, workItemId, projectId, status, subject, description } = params;
|
|
56
50
|
const path = `/services/data/v${connection.getApiVersion()}/connect/devops/projects/${projectId}/workitem/${workItemId}`;
|
|
57
|
-
const
|
|
51
|
+
const payload = {};
|
|
52
|
+
if (status !== undefined)
|
|
53
|
+
payload.status = toApiStatus(status);
|
|
54
|
+
if (subject !== undefined)
|
|
55
|
+
payload.subject = subject;
|
|
56
|
+
if (description !== undefined)
|
|
57
|
+
payload.description = description;
|
|
58
58
|
const response = await connection.request({
|
|
59
59
|
method: 'PATCH',
|
|
60
60
|
url: path,
|
|
61
|
-
body,
|
|
61
|
+
body: JSON.stringify(payload),
|
|
62
62
|
headers: { 'Content-Type': 'application/json' },
|
|
63
63
|
});
|
|
64
64
|
const data = response ?? {};
|
|
65
65
|
return {
|
|
66
66
|
success: true,
|
|
67
67
|
workItemId,
|
|
68
|
-
status: (data.status ?? data.Status ?? status),
|
|
68
|
+
status: status !== undefined ? (data.status ?? data.Status ?? status) : undefined,
|
|
69
|
+
subject: subject !== undefined ? (data.subject ?? data.Subject ?? subject) : undefined,
|
|
70
|
+
description: description !== undefined ? (data.description ?? data.Description ?? description) : undefined,
|
|
69
71
|
};
|
|
70
72
|
}
|
|
71
|
-
//# sourceMappingURL=
|
|
73
|
+
//# sourceMappingURL=updateWorkItem.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"updateWorkItem.js","sourceRoot":"","sources":["../../src/utils/updateWorkItem.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AA4BH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,aAAa,EAAE,kBAAkB,CAAU,CAAC;AAG7E,MAAM,mBAAmB,GAA2B;IAClD,aAAa,EAAE,aAAa;IAC5B,kBAAkB,EAAE,kBAAkB;CACvC,CAAC;AAEF,MAAM,UAAU,WAAW,CAAC,MAAc;IACxC,MAAM,SAAS,GAAG,mBAAmB,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC,CAAC;IAC5D,IAAI,CAAC,SA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ization or user) of the repository. Required when creating a repository using '--create-repo'.
|
|
31
|
+
Owner (organization or user) of the GitHub repository. Required when creating a GitHub repository using '--create-repo'.
|
|
32
32
|
|
|
33
|
-
# flags.bitbucket-
|
|
33
|
+
# flags.bitbucket-workspace.summary
|
|
34
34
|
|
|
35
|
-
Bitbucket
|
|
35
|
+
Bitbucket workspace that will own the repository. Required when creating a Bitbucket repository using '--create-repo'.
|
|
36
|
+
|
|
37
|
+
# flags.bitbucket-project-key.summary
|
|
38
|
+
|
|
39
|
+
Bitbucket project key to associate with the repository. Optional when creating a Bitbucket repository using '--create-repo'.
|
|
36
40
|
|
|
37
41
|
# flags.description.summary
|
|
38
42
|
|
|
@@ -48,14 +52,26 @@ Description of the pipeline.
|
|
|
48
52
|
|
|
49
53
|
<%= config.bin %> <%= command.id %> --target-org my-devops-org --name "Release Pipeline" --repo my-new-repo --repo-type github --repo-owner myorg --create-repo
|
|
50
54
|
|
|
51
|
-
- Create a pipeline
|
|
55
|
+
- Create a pipeline and create a new Bitbucket repository.
|
|
56
|
+
|
|
57
|
+
<%= config.bin %> <%= command.id %> --target-org my-devops-org --name "Release Pipeline" --repo my-new-repo --repo-type bitbucket --bitbucket-workspace myworkspace --bitbucket-project-key PROJ --create-repo
|
|
52
58
|
|
|
53
|
-
|
|
59
|
+
- Create a pipeline with a description and associate it with an existing Bitbucket repository.
|
|
60
|
+
|
|
61
|
+
<%= config.bin %> <%= command.id %> --target-org my-devops-org --name "Release Pipeline" --repo https://bitbucket.org/myworkspace/myrepo --description "Main CI/CD pipeline for production releases"
|
|
54
62
|
|
|
55
63
|
# error.RepoTypeRequired
|
|
56
64
|
|
|
57
65
|
The --repo-type flag is required when using --create-repo. Specify --repo-type github or --repo-type bitbucket.
|
|
58
66
|
|
|
67
|
+
# error.RepoOwnerNotFound
|
|
68
|
+
|
|
69
|
+
The repository "%s" could not be initialized because the --repo-owner does not exist or is not accessible on GitHub. Verify the --repo-owner value is a valid GitHub organization or user.
|
|
70
|
+
|
|
71
|
+
# error.RepoNameAlreadyExists
|
|
72
|
+
|
|
73
|
+
A repository named "%s" already exists on this account. Choose a different name or use the existing repository URL with --repo instead of --create-repo.
|
|
74
|
+
|
|
59
75
|
# error.RepoCreationFailed
|
|
60
76
|
|
|
61
77
|
Failed to create repository "%s". Verify the --repo-owner has permission to create repositories and the repository name is available. Details: %s
|
|
@@ -70,7 +86,11 @@ Failed to validate repository "%s". When using an existing repository, provide t
|
|
|
70
86
|
|
|
71
87
|
# error.RepoOwnerRequired
|
|
72
88
|
|
|
73
|
-
The --repo-owner flag is required when
|
|
89
|
+
The --repo-owner flag is required when creating a GitHub repository with --create-repo. Specify the GitHub organization or user that will own the repository.
|
|
90
|
+
|
|
91
|
+
# error.BitbucketWorkspaceRequired
|
|
92
|
+
|
|
93
|
+
The --bitbucket-workspace flag is required when creating a Bitbucket repository with --create-repo. Specify the Bitbucket workspace that will own the repository.
|
|
74
94
|
|
|
75
95
|
# error.VcsCredentialsMissing
|
|
76
96
|
|
|
@@ -4,7 +4,7 @@ Create a pull request for a work item branch.
|
|
|
4
4
|
|
|
5
5
|
# description
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Creates a pull request via the Salesforce DevOps Center API, using the VCS credentials stored in the org. Works with GitHub and Bitbucket without requiring local VCS authentication.
|
|
8
8
|
|
|
9
9
|
# flags.work-item-name.summary
|
|
10
10
|
|
|
@@ -14,44 +14,20 @@ Name of the work item, such as WI-000001.
|
|
|
14
14
|
|
|
15
15
|
ID of the work item.
|
|
16
16
|
|
|
17
|
-
# flags.
|
|
18
|
-
|
|
19
|
-
Title of the pull request.
|
|
20
|
-
|
|
21
|
-
# flags.body.summary
|
|
17
|
+
# flags.target-org.summary
|
|
22
18
|
|
|
23
|
-
|
|
19
|
+
Username or alias of the DevOps Center org.
|
|
24
20
|
|
|
25
21
|
# examples
|
|
26
22
|
|
|
27
|
-
- Create a pull request for a work item
|
|
23
|
+
- Create a pull request for a work item.
|
|
28
24
|
|
|
29
25
|
<%= config.bin %> <%= command.id %> --target-org my-devops-org --work-item-name WI-000001
|
|
30
26
|
|
|
31
|
-
- Create a pull request
|
|
27
|
+
- Create a pull request using the work item ID.
|
|
32
28
|
|
|
33
|
-
<%= config.bin %> <%= command.id %> --target-org my-devops-org --work-item-id 0Wx000000000001
|
|
29
|
+
<%= config.bin %> <%= command.id %> --target-org my-devops-org --work-item-id 0Wx000000000001
|
|
34
30
|
|
|
35
31
|
# error.NoBranch
|
|
36
32
|
|
|
37
33
|
Work item %s doesn't have an associated branch. Mark the work item as In Progress to create a branch, then try again.
|
|
38
|
-
|
|
39
|
-
# error.NoRepo
|
|
40
|
-
|
|
41
|
-
Work item %s doesn't have an associated repository. Verify the project is connected to a source control repository and try again.
|
|
42
|
-
|
|
43
|
-
# error.NoTargetBranch
|
|
44
|
-
|
|
45
|
-
Unable to determine the target branch for work item %s. Verify the pipeline stages are configured correctly.
|
|
46
|
-
|
|
47
|
-
# error.NoProvider
|
|
48
|
-
|
|
49
|
-
Unable to determine the VCS provider for work item %s. Verify the project is connected to a supported source control provider (GitHub or Bitbucket).
|
|
50
|
-
|
|
51
|
-
# flags.target-org.summary
|
|
52
|
-
|
|
53
|
-
Username or alias of the DevOps Center org.
|
|
54
|
-
|
|
55
|
-
# error.NoToken
|
|
56
|
-
|
|
57
|
-
No authentication token found for %s. For GitHub, set the GITHUB_TOKEN environment variable or run "gh auth login". For Bitbucket, set the BITBUCKET_TOKEN environment variable.
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# summary
|
|
2
|
+
|
|
3
|
+
Add a source code repository branch to a pipeline stage.
|
|
4
|
+
|
|
5
|
+
# description
|
|
6
|
+
|
|
7
|
+
By default, the branch must exist in the repository. Use --create-vcs-branch to create a branch if it doesn't exist.
|
|
8
|
+
Each pipeline stage supports only one branch. Adding a branch replaces any existing branch linked to the pipeline stage.
|
|
9
|
+
|
|
10
|
+
# flags.pipeline-id.summary
|
|
11
|
+
|
|
12
|
+
ID of the pipeline that contains the stage.
|
|
13
|
+
|
|
14
|
+
# flags.stage-id.summary
|
|
15
|
+
|
|
16
|
+
ID of the pipeline stage to associate the branch with.
|
|
17
|
+
|
|
18
|
+
# flags.branch-name.summary
|
|
19
|
+
|
|
20
|
+
Name of the repository branch to assign to the stage.
|
|
21
|
+
|
|
22
|
+
# flags.create-vcs-branch.summary
|
|
23
|
+
|
|
24
|
+
Create the branch in the remote repository if it doesn't already exist.
|
|
25
|
+
|
|
26
|
+
# examples
|
|
27
|
+
|
|
28
|
+
- Add an existing branch to a stage:
|
|
29
|
+
|
|
30
|
+
<%= config.bin %> <%= command.id %> --target-org my-devops-org --pipeline-id 0Xo000000000001 --stage-id 0Xp000000000001 --branch-name main
|
|
31
|
+
|
|
32
|
+
- Create and add a branch to a pipeline stage:
|
|
33
|
+
|
|
34
|
+
<%= config.bin %> <%= command.id %> --target-org my-devops-org --pipeline-id 0Xo000000000001 --stage-id 0Xp000000000002 --branch-name integration --create-vcs-branch
|
|
35
|
+
|
|
36
|
+
# error.StageNotFound
|
|
37
|
+
|
|
38
|
+
Pipeline stage "%s" doesn't exist in pipeline "%s". Check the stage ID and try again.
|
|
39
|
+
|
|
40
|
+
# error.NextStageNoBranch
|
|
41
|
+
|
|
42
|
+
You must set up a branch on stage "%s" before configuring stage "%s". Branches must be configured from right to left (starting from the last stage in the pipeline).
|
|
43
|
+
|
|
44
|
+
# error.BranchAttachFailed
|
|
45
|
+
|
|
46
|
+
Failed to associate branch with stage: %s
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# summary
|
|
2
|
+
|
|
3
|
+
Add a Salesforce environment to a pipeline stage.
|
|
4
|
+
|
|
5
|
+
# description
|
|
6
|
+
|
|
7
|
+
This command triggers an OAuth flow to authenticate the environment. A browser window opens automatically for you to log in.
|
|
8
|
+
|
|
9
|
+
# flags.pipeline-id.summary
|
|
10
|
+
|
|
11
|
+
ID of the pipeline that contains the stage.
|
|
12
|
+
|
|
13
|
+
# flags.stage-id.summary
|
|
14
|
+
|
|
15
|
+
ID of the pipeline stage.
|
|
16
|
+
|
|
17
|
+
# flags.environment-name.summary
|
|
18
|
+
|
|
19
|
+
Name of the environment.
|
|
20
|
+
|
|
21
|
+
# flags.org-type.summary
|
|
22
|
+
|
|
23
|
+
Type of the Salesforce org. Valid values: Production, Sandbox.
|
|
24
|
+
|
|
25
|
+
# flags.no-browser.summary
|
|
26
|
+
|
|
27
|
+
Don't auto-open the browser for OAuth authentication. The redirect URL is printed for manual use.
|
|
28
|
+
|
|
29
|
+
# examples
|
|
30
|
+
|
|
31
|
+
- Add a production environment to a stage using its ID:
|
|
32
|
+
|
|
33
|
+
<%= config.bin %> <%= command.id %> --target-org my-devops-org --stage-id 0Xp000000000001 --environment-name Production_Org --org-type Production
|
|
34
|
+
|
|
35
|
+
# info.BrowserOpened
|
|
36
|
+
|
|
37
|
+
A browser window has been opened for authentication. Log in to the target org to complete the setup.
|
|
38
|
+
|
|
39
|
+
# info.ManualAuth
|
|
40
|
+
|
|
41
|
+
Open the following URL in your browser to authenticate the environment:\n%s
|
|
42
|
+
|
|
43
|
+
# info.WaitingForAuth
|
|
44
|
+
|
|
45
|
+
Waiting for authentication to complete...
|
|
46
|
+
|
|
47
|
+
# info.Success
|
|
48
|
+
|
|
49
|
+
Successfully added environment to the stage.
|
|
50
|
+
|
|
51
|
+
# error.PipelineAlreadyActive
|
|
52
|
+
|
|
53
|
+
Pipeline %s is already active. Environments can only be added to inactive pipelines.
|
|
54
|
+
|
|
55
|
+
# error.StageNotFound
|
|
56
|
+
|
|
57
|
+
Pipeline stage "%s" doesn't exist in pipeline "%s". Check the stage ID and try again.
|
|
58
|
+
|
|
59
|
+
# error.EnvironmentAttachFailed
|
|
60
|
+
|
|
61
|
+
Failed to create environment for stage: %s
|
|
62
|
+
|
|
63
|
+
# error.AuthTimeout
|
|
64
|
+
|
|
65
|
+
Authentication timed out. The environment was created but not yet authenticated. Re-run the command or authenticate manually via the org's DevOps Center setup.
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# summary
|
|
2
|
+
|
|
3
|
+
Update a work item in DevOps Center.
|
|
4
|
+
|
|
5
|
+
# description
|
|
6
|
+
|
|
7
|
+
Update the subject, description, or status of a work item. At least one of --subject, --description, or --status must be provided.
|
|
8
|
+
|
|
9
|
+
# flags.work-item-name.summary
|
|
10
|
+
|
|
11
|
+
Name of the work item, such as WI-000001.
|
|
12
|
+
|
|
13
|
+
# flags.work-item-id.summary
|
|
14
|
+
|
|
15
|
+
ID of the work item.
|
|
16
|
+
|
|
17
|
+
# flags.subject.summary
|
|
18
|
+
|
|
19
|
+
New subject for the work item.
|
|
20
|
+
|
|
21
|
+
# flags.description.summary
|
|
22
|
+
|
|
23
|
+
New description for the work item.
|
|
24
|
+
|
|
25
|
+
# flags.status.summary
|
|
26
|
+
|
|
27
|
+
New status for the work item. Allowed values: "In Progress", "Ready to Promote".
|
|
28
|
+
|
|
29
|
+
# examples
|
|
30
|
+
|
|
31
|
+
- Update the subject of a work item by name:
|
|
32
|
+
|
|
33
|
+
<%= config.bin %> <%= command.id %> --target-org my-devops-org --work-item-name WI-000001 --subject "Fix login bug"
|
|
34
|
+
|
|
35
|
+
- Update the status of a work item by ID:
|
|
36
|
+
|
|
37
|
+
<%= config.bin %> <%= command.id %> --target-org my-devops-org --work-item-id 0Wx000000000001 --status "In Progress"
|
|
38
|
+
|
|
39
|
+
- Update multiple fields at once:
|
|
40
|
+
|
|
41
|
+
<%= config.bin %> <%= command.id %> --target-org my-devops-org --work-item-name WI-000001 --subject "Fix login bug" --description "Users can't log in on mobile" --status "In Progress"
|
|
42
|
+
|
|
43
|
+
# error.NoFieldsProvided
|
|
44
|
+
|
|
45
|
+
Provide at least one of --subject, --description, or --status.
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/plugin-devops-center",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@salesforce/plugin-devops-center",
|
|
9
|
-
"version": "1.
|
|
9
|
+
"version": "1.4.0",
|
|
10
10
|
"license": "Apache-2.0",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@jsforce/jsforce-node": "^3",
|