You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rename CampaignPlan to PatchSet & ChangesetPlan to Patch (#161)
And:
- "src campaign plan create-from-patches" to "src campaign patchset create-from-patches"
- "src action exec -create-plan" to "src action exec -create-patchset"
- "src action exec -force-create-plan" to "src action exec -force-create-patchset"
Part of sourcegraph/sourcegraph#9106 and required change after https://github.com/sourcegraph/sourcegraph/pull/9196
Read and execute an action definition from standard input:
80
80
@@ -138,8 +138,8 @@ Format of the action JSON files:
138
138
keepLogsFlag=flagSet.Bool("keep-logs", false, "Do not remove execution log files when done.")
139
139
timeoutFlag=flagSet.Duration("timeout", defaultTimeout, "The maximum duration a single action run can take (excluding the building of Docker images).")
140
140
141
-
createPlanFlag=flagSet.Bool("create-plan", false, "Create a campaign plan from the produced set of patches. When the execution of the action fails in a single repository a prompt will ask to confirm or reject the campaign plan creation.")
142
-
forceCreatePlanFlag=flagSet.Bool("force-create-plan", false, "Force creation of campaign plan from the produced set of patches, without asking for confirmation even when the execution of the action failed for a subset of repositories.")
141
+
createPatchSetFlag=flagSet.Bool("create-patchset", false, "Create a patch set from the produced set of patches. When the execution of the action fails in a single repository a prompt will ask to confirm or reject the patch set creation.")
142
+
forceCreatePatchSetFlag=flagSet.Bool("force-create-patchset", false, "Force creation of patch set from the produced set of patches, without asking for confirmation even when the execution of the action failed for a subset of repositories.")
143
143
144
144
apiFlags=newAPIFlags(flagSet)
145
145
)
@@ -238,7 +238,7 @@ Format of the action JSON files:
Copy file name to clipboardExpand all lines: cmd/src/campaigns_create.go
+7-7Lines changed: 7 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -21,12 +21,12 @@ Create a campaign with the given attributes. If -name or -desc are not specified
21
21
22
22
Examples:
23
23
24
-
Create a campaign with the given name, branch, description and campaign plan:
24
+
Create a campaign with the given name, branch, description and campaign patch set:
25
25
26
26
$ src campaigns create -name="Format Go code" \
27
27
-desc="This campaign runs gofmt over all Go repositories" \
28
28
-branch=run-go-fmt \
29
-
-plan=Q2FtcGFpZ25QbGFuOjM=
29
+
-patchset=Q2FtcGFpZ25QbGFuOjM=
30
30
31
31
Create a manual campaign with the given name and description and adds two GitHub pull requests to it:
32
32
@@ -47,9 +47,9 @@ Examples:
47
47
nameFlag=flagSet.String("name", "", "Name of the campaign.")
48
48
descriptionFlag=flagSet.String("desc", "", "Description for the campaign in Markdown.")
49
49
namespaceFlag=flagSet.String("namespace", "", "ID of the namespace under which to create the campaign. The namespace can be the GraphQL ID of a Sourcegraph user or organisation. If not specified, the ID of the authenticated user is queried and used. (Required)")
50
-
planIDFlag=flagSet.String("plan", "", "ID of campaign plan the campaign should turn into changesets. If no plan is specified, a campaign is created to which changesets can be added manually.")
50
+
patchsetIDFlag=flagSet.String("patchset", "", "ID of patch set the campaign should turn into changesets. If no patch set is specified, a campaign is created to which changesets can be added manually.")
51
51
draftFlag=flagSet.Bool("draft", false, "Create the campaign as a draft (which won't create pull requests on code hosts)")
52
-
branchFlag=flagSet.String("branch", "", "Name of the branch that will be created in each repository on the code host. Required for Sourcegraph >= 3.13 when 'plan' is specified.")
52
+
branchFlag=flagSet.String("branch", "", "Name of the branch that will be created in each repository on the code host. Required for Sourcegraph >= 3.13 when 'patchset' is specified.")
53
53
54
54
changesetsFlag=flagSet.Int("changesets", 1000, "Returns the first n changesets per campaign.")
55
55
@@ -86,7 +86,7 @@ Examples:
86
86
return&usageError{errors.New("campaign description cannot be blank")}
87
87
}
88
88
89
-
if*planIDFlag!="" {
89
+
if*patchsetIDFlag!="" {
90
90
// We only need to check for -branch if the Sourcegraph version is >= 3.13
91
91
version, err:=getSourcegraphVersion()
92
92
iferr!=nil {
@@ -98,7 +98,7 @@ Examples:
98
98
}
99
99
100
100
ifneedsBranch&&*branchFlag=="" {
101
-
return&usageError{errors.New("branch cannot be blank for campaigns with a plan")}
101
+
return&usageError{errors.New("branch cannot be blank for campaigns with a patch set")}
fmt.Fprintln(&buf, color.HiGreenString("✔ Campaign plan saved."), "\n\nPreview and create this campaign on Sourcegraph using one of the following options:")
101
+
fmt.Fprintln(&buf, color.HiGreenString("✔ Patch set saved."), "\n\nPreview and create a campaign on Sourcegraph using one of the following options:")
0 commit comments