Skip to content

Commit 56cf629

Browse files
committed
Update comment on repo-level config for branch list on dangerous workflow policy.
Signed-off-by: Jeff Mendoza <jlm@jlm.name>
1 parent f7afb49 commit 56cf629

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

pkg/policies/workflow/workflow.go

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@ type OrgConfig struct {
4444
// Action defines which action to take, default log, other: issue...
4545
Action string `json:"action"`
4646

47-
// Comma-separated branch list to scan for Dangerous Workflows.
48-
// Blank to scan all branches. The string "default" will be replaced with the git default branch.
49-
// Must use format "refs/remotes/origin/branch_name".
47+
// Comma-separated branch list to scan for Dangerous Workflows. Blank to
48+
// scan all branches. The string "default" will be replaced with the git
49+
// default branch. Must use format "refs/remotes/origin/branch_name".
5050
BranchList string `json:"branchList"`
5151
}
5252

@@ -58,9 +58,11 @@ type RepoConfig struct {
5858
// Action overrides the same setting in org-level, only if present.
5959
Action *string `json:"action"`
6060

61-
// Comma-separated branch list to scan for Dangerous Workflows.
62-
// Blank to scan all branches. The string "default" will be replaced with the git default branch.
63-
// Must use format "refs/remotes/origin/branch_name".
61+
// Comma-separated branch list to scan for Dangerous Workflows. Blank to
62+
// scan all branches. The string "default" will be replaced with the git
63+
// default branch. Must use format
64+
// "refs/remotes/origin/branch_name". Repo-level list is additive to
65+
// org-level list, it does not replace org-level list.
6466
BranchList string `json:"branchList"`
6567
}
6668

@@ -356,7 +358,7 @@ func configParseBranches(oc string, orc string, rc string) []string {
356358
if orc != "" {
357359
ret = append(ret, strings.Split(orc, ",")...)
358360
}
359-
if rc !="" {
361+
if rc != "" {
360362
ret = append(ret, strings.Split(rc, ",")...)
361363
}
362364
return ret

0 commit comments

Comments
 (0)