Skip to content

Commit

Permalink
internal/ci: import repo package once in github package
Browse files Browse the repository at this point in the history
Per the comment in github/repo.cue this keeps the noise in diffs between
the configurations in this and other CUE repos down to a minimum, when
applying the same configuration pattern in those other repos.

Signed-off-by: Paul Jolly <[email protected]>
Change-Id: I2df9116867b6534a4010894a37e338c8b2e0454b
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/551822
Reviewed-by: Daniel Martí <[email protected]>
Unity-Result: CUEcueckoo <[email protected]>
TryBot-Result: CUEcueckoo <[email protected]>
  • Loading branch information
myitcv committed Mar 28, 2023
1 parent 6318def commit 7aec30c
Show file tree
Hide file tree
Showing 8 changed files with 28 additions and 19 deletions.
2 changes: 0 additions & 2 deletions internal/ci/github/evict_caches.cue
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ package github
import (
"strings"

"cuelang.org/go/internal/ci/repo"

"github.com/SchemaStore/schemastore/src/schemas/json"
)

Expand Down
4 changes: 0 additions & 4 deletions internal/ci/github/push_tip_to_trybot.cue
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,6 @@

package github

import (
"cuelang.org/go/internal/ci/repo"
)

// push_tip_to_trybot "syncs" active branches to the trybot repo.
// Since the workflow is triggered by a push to any of the branches,
// the step only needs to sync the pushed branch.
Expand Down
1 change: 0 additions & 1 deletion internal/ci/github/release.cue
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ package github
import (
"list"

"cuelang.org/go/internal/ci/repo"
"github.com/SchemaStore/schemastore/src/schemas/json"
)

Expand Down
28 changes: 28 additions & 0 deletions internal/ci/github/repo.cue
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// Copyright 2022 The CUE Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package github

// This file exists to provide a single point of importing
// the repo package. The pattern of using base and repo
// is replicated across a number of CUE repos, and as such
// the import path of repo varies between them. This makes
// spotting differences and applying changes between the
// github/*.cue files noisy. Instead, import the repo package
// in a single file, and that keeps the different in import
// path down to a single file.

import _repo "cuelang.org/go/internal/ci/repo"

repo: _repo
4 changes: 0 additions & 4 deletions internal/ci/github/tip_triggers.cue
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,6 @@

package github

import (
"cuelang.org/go/internal/ci/repo"
)

// The tip_triggers workflow. This fires for each new commit that hits the
// default branch.
workflows: tip_triggers: repo.bashWorkflow & {
Expand Down
2 changes: 0 additions & 2 deletions internal/ci/github/trybot.cue
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ package github
import (
"list"

"cuelang.org/go/internal/ci/repo"

"github.com/SchemaStore/schemastore/src/schemas/json"
)

Expand Down
4 changes: 0 additions & 4 deletions internal/ci/github/trybot_dispatch.cue
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,5 @@

package github

import (
"cuelang.org/go/internal/ci/repo"
)

// The trybot_dispatch workflow.
workflows: trybot_dispatch: repo.bashWorkflow & repo.trybotDispatchWorkflow
2 changes: 0 additions & 2 deletions internal/ci/github/workflows.cue
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
package github

import (
"cuelang.org/go/internal/ci/repo"

"github.com/SchemaStore/schemastore/src/schemas/json"
)

Expand Down

0 comments on commit 7aec30c

Please sign in to comment.