Skip to content

Commit

Permalink
First stab at expanding tep-notifier work for tektoncd/community#594
Browse files Browse the repository at this point in the history
Signed-off-by: Andrew Bayer <[email protected]>
  • Loading branch information
abayer committed Jan 9, 2022
1 parent c2a4b23 commit ccfafcf
Show file tree
Hide file tree
Showing 39 changed files with 3,731 additions and 1,674 deletions.
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions tep-notifier/Makefile → bots/tep-automation/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
BINARY_NAME = tep-notifier
BINARY_NAME = tep-automation

GO = go
BIN = $(CURDIR)/.bin
Expand Down Expand Up @@ -56,7 +56,7 @@ test: test-unit ## run all tests
.PHONY: test-unit
test-unit: ## run unit tests
@echo "Running unit tests..."
@$(GO) test -failfast -v -cover ./...
@$(GO) test -short -cover ./...

.PHONY: clean
clean: ## clean build artifacts
Expand Down Expand Up @@ -84,7 +84,7 @@ $(BIN)/goimports: PACKAGE=golang.org/x/tools/cmd/goimports
.PHONY: goimports
goimports: $(GOIMPORTS)
@echo "Running goimports..."
@$(GOIMPORTS) -l -e -w pkg
@$(GOIMPORTS) -l -e -w pkg cmd

.PHONY: fmt
fmt: goimports
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@ package main

import (
"flag"
"github.com/tektoncd/plumbing/tep-notifier/pkg/reconciler"
"log"

"github.com/tektoncd/plumbing/bots/tep-automation/pkg/performers"
"github.com/tektoncd/plumbing/bots/tep-automation/pkg/reconciler"
"knative.dev/pkg/injection/sharedmain"
"knative.dev/pkg/signals"
"log"
)

var (
Expand All @@ -18,5 +20,6 @@ func main() {
if ghToken == nil {
log.Fatal("no github-token specified")
}
sharedmain.MainWithContext(signals.NewContext(), reconciler.ControllerName, reconciler.NewController(*ghToken))

sharedmain.MainWithContext(signals.NewContext(), reconciler.ControllerName, reconciler.NewController(*ghToken, performers.NewPRNotifierAsPerformer))
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
10 changes: 6 additions & 4 deletions tep-notifier/go.mod → bots/tep-automation/go.mod
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
module github.com/tektoncd/plumbing/tep-notifier
module github.com/tektoncd/plumbing/bots/tep-automation

go 1.17

require (
github.com/google/go-cmp v0.5.6
github.com/google/go-github/v41 v41.0.0
github.com/hashicorp/go-multierror v1.1.1
github.com/pkg/errors v0.9.1
github.com/stretchr/testify v1.7.0
github.com/tektoncd/pipeline v0.31.0
github.com/yuin/goldmark v1.4.4
github.com/yuin/goldmark-meta v1.0.0
golang.org/x/oauth2 v0.0.0-20211005180243-6b3c2da341f1
k8s.io/api v0.21.4
k8s.io/apimachinery v0.21.4
k8s.io/client-go v0.21.4
knative.dev/pkg v0.0.0-20211101212339-96c0204a70dc
)
Expand Down Expand Up @@ -44,7 +49,6 @@ require (
github.com/googleapis/gnostic v0.5.3 // indirect
github.com/grpc-ecosystem/grpc-gateway v1.16.0 // indirect
github.com/hashicorp/errwrap v1.0.0 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
github.com/hashicorp/golang-lru v0.5.4 // indirect
github.com/imdario/mergo v0.3.11 // indirect
github.com/josharian/intern v1.0.0 // indirect
Expand Down Expand Up @@ -82,9 +86,7 @@ require (
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
k8s.io/api v0.21.4 // indirect
k8s.io/apiextensions-apiserver v0.21.4 // indirect
k8s.io/apimachinery v0.21.4 // indirect
k8s.io/klog v1.0.0 // indirect
k8s.io/klog/v2 v2.8.0 // indirect
k8s.io/kube-openapi v0.0.0-20210305001622-591a79e4bda7 // indirect
Expand Down
4 changes: 4 additions & 0 deletions tep-notifier/go.sum → bots/tep-automation/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -910,6 +910,10 @@ github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9de
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
github.com/yuin/goldmark v1.4.0/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
github.com/yuin/goldmark v1.4.4 h1:zNWRjYUW32G9KirMXYHQHVNFkXvMI7LpgNW2AgYAoIs=
github.com/yuin/goldmark v1.4.4/go.mod h1:rmuwmfZ0+bvzB24eSC//bk1R1Zp3hM0OXYv/G2LIilg=
github.com/yuin/goldmark-meta v1.0.0 h1:ScsatUIT2gFS6azqzLGUjgOnELsBOxMXerM3ogdJhAM=
github.com/yuin/goldmark-meta v1.0.0/go.mod h1:zsNNOrZ4nLuyHAJeLQEZcQat8dm70SmB2kHbls092Gc=
github.com/yvasiyarov/go-metrics v0.0.0-20140926110328-57bccd1ccd43/go.mod h1:aX5oPXxHm3bOH+xeAttToC8pqch2ScQN/JoXYupl6xs=
github.com/yvasiyarov/gorelic v0.0.0-20141212073537-a9bba5b9ab50/go.mod h1:NUSPSUX/bi6SeDMUh6brw0nXpxHnc96TguQh0+r/ssA=
github.com/yvasiyarov/newrelic_platform_go v0.0.0-20140908184405-b21fdbd4370f/go.mod h1:GlGEuHIJweS1mbCqG+7vt2nvWLzLLnRHbXz5JKd/Qbg=
Expand Down
Loading

0 comments on commit ccfafcf

Please sign in to comment.