Skip to content

Commit

Permalink
fix: github pr label matching
Browse files Browse the repository at this point in the history
Fixes the GitHub pull requests label matching.
Also bump deps.

Signed-off-by: Noel Georgi <[email protected]>
  • Loading branch information
frezbo committed Nov 14, 2023
1 parent 03cced1 commit 56121e8
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT.
#
# Generated on 2023-11-13T14:26:45Z by kres c281f8f-dirty.
# Generated on 2023-11-14T14:14:16Z by kres 03cced1-dirty.

# common variables

Expand All @@ -16,13 +16,13 @@ USERNAME ?= siderolabs
REGISTRY_AND_USERNAME ?= $(REGISTRY)/$(USERNAME)
PROTOBUF_GO_VERSION ?= 1.31.0
GRPC_GO_VERSION ?= 1.3.0
GRPC_GATEWAY_VERSION ?= 2.18.0
GRPC_GATEWAY_VERSION ?= 2.18.1
VTPROTOBUF_VERSION ?= 0.5.0
DEEPCOPY_VERSION ?= v0.5.5
GOLANGCILINT_VERSION ?= v1.55.2
GOFUMPT_VERSION ?= v0.5.0
GO_VERSION ?= 1.21.4
GOIMPORTS_VERSION ?= v0.14.0
GOIMPORTS_VERSION ?= v0.15.0
GO_BUILDFLAGS ?=
GO_LDFLAGS ?=
CGO_ENABLED ?= 0
Expand Down
4 changes: 2 additions & 2 deletions internal/config/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ const (
GoFmtVersion = "v0.5.0"
// GoImportsVersion is the version of goimports.
// renovate: datasource=go depName=golang.org/x/tools
GoImportsVersion = "v0.14.0"
GoImportsVersion = "v0.15.0"
// GolangCIlintVersion is the version of golangci-lint.
// renovate: datasource=go depName=github.com/golangci/golangci-lint
GolangCIlintVersion = "v1.55.2"
Expand All @@ -57,7 +57,7 @@ const (
GoVersion = "1.21.4"
// GrpcGatewayVersion is the version of grpc-gateway.
// renovate: datasource=go depName=github.com/grpc-ecosystem/grpc-gateway
GrpcGatewayVersion = "v2.18.0"
GrpcGatewayVersion = "v2.18.1"
// GrpcGoVersion is the version of grpc.
// renovate: datasource=go depName=google.golang.org/grpc/cmd/protoc-gen-go-grpc
GrpcGoVersion = "v1.3.0"
Expand Down
2 changes: 1 addition & 1 deletion internal/output/ghworkflow/gh_workflow.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const resp = await github.rest.issues.get({
repo: context.repo.repo,
})
return resp.data.labels
return resp.data.labels.map(label => label.name)
`

workflowDir = ".github/workflows"
Expand Down
2 changes: 1 addition & 1 deletion internal/project/custom/custom.go
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ func (step *Step) CompileGitHubWorkflow(output *ghworkflow.Output) error {

for _, job := range step.GHAction.Jobs {
conditions := xslices.Map(job.TriggerLabels, func(label string) string {
return fmt.Sprintf("contains(needs.default.outputs.labels, '%s')", label)
return fmt.Sprintf("contains(fromJSON(needs.default.outputs.labels), '%s')", label)
})

artifactSteps := []*ghworkflow.Step{}
Expand Down
2 changes: 1 addition & 1 deletion internal/project/pkgfile/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ func (pkgfile *Build) CompileGitHubWorkflow(output *ghworkflow.Output) error {

output.AddJob("reproducibility", &ghworkflow.Job{
RunsOn: runnerLabels,
If: "contains(needs.default.outputs.labels, 'integration/reproducibility')",
If: "contains(fromJSON(needs.default.outputs.labels), 'integration/reproducibility')",
Needs: []string{"default"},
Services: ghworkflow.DefaultServices(),
Steps: ghworkflow.DefaultPkgsSteps(),
Expand Down

0 comments on commit 56121e8

Please sign in to comment.