-
Notifications
You must be signed in to change notification settings - Fork 302
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
internal/ci: split base into separate files
Until we establish a clear requirement for better package boundaries, base is the one place where we put common definitions (gerrithub is folded into this package in a later CL). Split the package into different files to help separate the different aspects of the package. This is a purely mechanical change. This change should not result in any .github/workflows changes. Signed-off-by: Paul Jolly <paul@myitcv.io> Change-Id: Icc1bb92f77a709ea0d6410a42b9eab78ceacbeea Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/551630 Unity-Result: CUEcueckoo <cueckoo@cuelang.org> TryBot-Result: CUEcueckoo <cueckoo@cuelang.org> Reviewed-by: Daniel Martí <mvdan@mvdan.cc>
- Loading branch information
Showing
4 changed files
with
291 additions
and
291 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package base | ||
|
||
// This file contains aspects principally related to git-codereview | ||
// configuration. | ||
|
||
import ( | ||
"strings" | ||
) | ||
|
||
// #codeReview defines the schema of a codereview.cfg file that | ||
// sits at the root of a repository. codereview.cfg is the configuration | ||
// file that drives golang.org/x/review/git-codereview. This config | ||
// file is also used by github.com/cue-sh/tools/cmd/cueckoo. | ||
#codeReview: { | ||
gerrit?: string | ||
github?: string | ||
"cue-unity"?: string | ||
} | ||
|
||
// #toCodeReviewCfg converts a #codeReview instance to | ||
// the key: value | ||
#toCodeReviewCfg: { | ||
#input: #codeReview | ||
let parts = [ for k, v in #input {k + ": " + v}] | ||
|
||
// Per https://pkg.go.dev/golang.org/x/review/git-codereview#hdr-Configuration | ||
strings.Join(parts, "\n") | ||
} |
Oops, something went wrong.