Repository: openshift-pipelines/pipelines-as-code
Pull request #110 (2021-06-02 15:41:57)

Add manual push script


Patch:
diff --git a/.tekton/pull-request.yaml b/.tekton/pull-request.yaml
index 57d4772e..dcf5e85c 100644
--- a/.tekton/pull-request.yaml
+++ b/.tekton/pull-request.yaml
@@ -125,7 +125,7 @@ spec:
           steps:
             - name: save-cache
               # Has everything we need in there and we already fetched it!
-              image: public.ecr.aws/bitnami/python:latest
+              image: public.ecr.aws/bitnami/golang:latest
               workingDir: $(workspaces.source.path)
               script: |
                 #!/usr/bin/env bash
diff --git a/hack/manual-push.sh b/hack/manual-push.sh
new file mode 100644
index 00000000..a93404c9
--- /dev/null
+++ b/hack/manual-push.sh
@@ -0,0 +1,7 @@
+#!/usr/bin/env bash
+set -eux
+
+cd $(dirname $0)
+cd $(dirname $(pwd -P))
+
+echo go run cmd/tknresolve/main.go  -f .tekton/push.yaml --generateName=true -p revision=main -p repo_url=https://github.com/openshift-pipelines/pipelines-as-code | kubectl create -f- -n pipelines-as-code-ci
diff --git a/pkg/config/annotation_matcher.go b/pkg/config/annotation_matcher.go
index 79311340..044527ad 100644
--- a/pkg/config/annotation_matcher.go
+++ b/pkg/config/annotation_matcher.go
@@ -49,7 +49,7 @@ func MatchPipelinerunByAnnotation(pruns []*v1beta1.PipelineRun, cs *cli.Clients,
 
 		if targetEvent, ok := prun.GetObjectMeta().GetAnnotations()[pipelinesascode.
 			GroupName+"/"+onEventAnnotation]; ok {
-			matched, err := matchOnAnnotation(targetEvent, runinfo.EventType, false)
+			matched, err := matchOnAnnotation(targetEvent, runinfo.EventType)
 			if err != nil {
 				return nil, err
 			}
@@ -60,7 +60,7 @@ func MatchPipelinerunByAnnotation(pruns []*v1beta1.PipelineRun, cs *cli.Clients,
 
 		if targetBranch, ok := prun.GetObjectMeta().GetAnnotations()[pipelinesascode.
 			GroupName+"/"+onTargetBranchAnnotation]; ok {
-			matched, err := matchOnAnnotation(targetBranch, runinfo.BaseBranch, true)
+			matched, err := matchOnAnnotation(targetBranch, runinfo.BaseBranch)
 			if err != nil {
 				return nil, err
 			}
@@ -75,18 +75,15 @@ func MatchPipelinerunByAnnotation(pruns []*v1beta1.PipelineRun, cs *cli.Clients,
 	return nil, fmt.Errorf("cannot match any pipeline on EventType: %s, TargetBranch: %s", runinfo.EventType, runinfo.BaseBranch)
 }
 
-func matchOnAnnotation(annotations string, runinfoValue string, branchMatching bool) (bool, error) {
-	targets, err := getAnnotationValues(annotations)
+func matchOnAnnotation(targetBranchAnnotation string, match string) (bool, error) {
+	targets, err := getAnnotationValues(targetBranchAnnotation)
 	if err != nil {
 		return false, err
 	}
 
 	var gotit string
 	for _, v := range targets {
-		if v == runinfoValue {
-			gotit = v
-		}
-		if branchMatching && branchMatch(v, runinfoValue) {
+		if v == match {
 			gotit = v
 		}
 	}
diff --git a/pkg/config/repo_runinfo_matcher.go b/pkg/pipelineascode/matcher.go
similarity index 94%
rename from pkg/config/repo_runinfo_matcher.go
rename to pkg/pipelineascode/matcher.go
index c57f7061..05a3fe24 100644
--- a/pkg/config/repo_runinfo_matcher.go
+++ b/pkg/pipelineascode/matcher.go
@@ -1,4 +1,4 @@
-package config
+package pipelineascode
 
 import (
 	"context"
@@ -24,7 +24,7 @@ func branchMatch(prunBranch, baseBranch string) bool {
 	return g.Match(baseBranch)
 }
 
-func GetRepoByCR(ctx context.Context, cs *cli.Clients, runinfo *webvcs.RunInfo) (apipac.Repository, error) {
+func getRepoByCR(ctx context.Context, cs *cli.Clients, runinfo *webvcs.RunInfo) (apipac.Repository, error) {
 	var repository apipac.Repository
 
 	repositories, err := cs.PipelineAsCode.PipelinesascodeV1alpha1().Repositories("").List(
diff --git a/pkg/pipelineascode/pipelineascode.go b/pkg/pipelineascode/pipelineascode.go
index 75ed2d8c..7211fe8f 100644
--- a/pkg/pipelineascode/pipelineascode.go
+++ b/pkg/pipelineascode/pipelineascode.go
@@ -71,7 +71,7 @@ func Run(ctx context.Context, cs *cli.Clients, k8int cli.KubeInteractionIntf, ru
 
 	// Match the Event to a Repository Resource,
 	// TODO: we need to be able to force a Namespace from the configuration as annotation as an extra layer of security for // hijacking
-	repo, err := config.GetRepoByCR(ctx, cs, runinfo)
+	repo, err := getRepoByCR(ctx, cs, runinfo)
 	if err != nil {
 		return err
 	}


Test patch:
diff --git a/pkg/config/annotation_matcher_test.go b/pkg/config/annotation_matcher_test.go
index f9f3e381..60f568ab 100644
--- a/pkg/config/annotation_matcher_test.go
+++ b/pkg/config/annotation_matcher_test.go
@@ -156,62 +156,7 @@ func TestMatchPipelinerunByAnnotation(t *testing.T) {
 			},
 			wantErr: true,
 		},
-		{
-			name: "match-branch-matching",
-			args: args{
-				runinfo: &webvcs.RunInfo{EventType: "push", BaseBranch: "refs/heads/main"},
-				pruns: []*tektonv1beta1.PipelineRun{
-					{
-						ObjectMeta: metav1.ObjectMeta{
-							Name: "branch-matching",
-							Annotations: map[string]string{
-								pipelinesascode.GroupName + "/" + onEventAnnotation:        "[push]",
-								pipelinesascode.GroupName + "/" + onTargetBranchAnnotation: "[main]",
-							},
-						},
-					},
-				},
-			},
-			wantErr: false,
-		},
-		{
-			name: "base-does-not-compare",
-			args: args{
-				runinfo: &webvcs.RunInfo{EventType: "push", BaseBranch: "refs/heads/main/foobar"},
-				pruns: []*tektonv1beta1.PipelineRun{
-					{
-						ObjectMeta: metav1.ObjectMeta{
-							Name: "branch-base-matching-not-compare",
-							Annotations: map[string]string{
-								pipelinesascode.GroupName + "/" + onEventAnnotation:        "[push]",
-								pipelinesascode.GroupName + "/" + onTargetBranchAnnotation: "[main]",
-							},
-						},
-					},
-				},
-			},
-			wantErr: true,
-		},
-		{
-			name: "branch-glob-matching",
-			args: args{
-				runinfo: &webvcs.RunInfo{EventType: "push", BaseBranch: "refs/heads/main"},
-				pruns: []*tektonv1beta1.PipelineRun{
-					{
-						ObjectMeta: metav1.ObjectMeta{
-							Name: "branch-base-matching-not-compare",
-							Annotations: map[string]string{
-								pipelinesascode.GroupName + "/" + onEventAnnotation:        "[push]",
-								pipelinesascode.GroupName + "/" + onTargetBranchAnnotation: "[refs/heads/*]",
-							},
-						},
-					},
-				},
-			},
-			wantErr: false,
-		},
 	}
-
 	for _, tt := range tests {
 		t.Run(tt.name, func(t *testing.T) {
 			got, err := MatchPipelinerunByAnnotation(tt.args.pruns, cs, tt.args.runinfo)
diff --git a/pkg/config/repo_runinfo_matcher_test.go b/pkg/pipelineascode/matcher_test.go
similarity index 67%
rename from pkg/config/repo_runinfo_matcher_test.go
rename to pkg/pipelineascode/matcher_test.go
index e9b50aec..20c06f1e 100644
--- a/pkg/config/repo_runinfo_matcher_test.go
+++ b/pkg/pipelineascode/matcher_test.go
@@ -1,4 +1,4 @@
-package config
+package pipelineascode
 
 import (
 	"testing"
@@ -6,18 +6,11 @@ import (
 	"github.com/openshift-pipelines/pipelines-as-code/pkg/apis/pipelinesascode/v1alpha1"
 	"github.com/openshift-pipelines/pipelines-as-code/pkg/cli"
 	testclient "github.com/openshift-pipelines/pipelines-as-code/pkg/test/clients"
-	testnewrepo "github.com/openshift-pipelines/pipelines-as-code/pkg/test/repository"
 	"github.com/openshift-pipelines/pipelines-as-code/pkg/webvcs"
 	"gotest.tools/v3/assert"
 	rtesting "knative.dev/pkg/reconciler/testing"
 )
 
-const (
-	mainBranch      = "mainBranch"
-	targetNamespace = "targetNamespace"
-	targetURL       = "https//nowhere.togo"
-)
-
 func Test_getRepoByCR(t *testing.T) {
 	type args struct {
 		data    testclient.Data
@@ -34,7 +27,7 @@ func Test_getRepoByCR(t *testing.T) {
 			args: args{
 				data: testclient.Data{
 					Repositories: []*v1alpha1.Repository{
-						testnewrepo.NewRepo("test-good", targetURL, mainBranch, targetNamespace, targetNamespace, "pull_request"),
+						newRepo("test-good", targetURL, mainBranch, targetNamespace, targetNamespace, "pull_request"),
 					},
 				},
 				runinfo: &webvcs.RunInfo{URL: targetURL, BaseBranch: mainBranch, EventType: "pull_request"},
@@ -42,25 +35,12 @@ func Test_getRepoByCR(t *testing.T) {
 			wantTargetNS: targetNamespace,
 			wantErr:      false,
 		},
-		{
-			name: "test-repo-not-installed-where-it-should",
-			args: args{
-				data: testclient.Data{
-					Repositories: []*v1alpha1.Repository{
-						testnewrepo.NewRepo("test-good", targetURL, mainBranch, "paslebonns", targetNamespace, "pull_request"),
-					},
-				},
-				runinfo: &webvcs.RunInfo{URL: targetURL, BaseBranch: mainBranch, EventType: "pull_request"},
-			},
-			wantTargetNS: "",
-			wantErr:      true,
-		},
 		{
 			name: "test-nomatch-event-type",
 			args: args{
 				data: testclient.Data{
 					Repositories: []*v1alpha1.Repository{
-						testnewrepo.NewRepo("test-good", targetURL, mainBranch, targetNamespace, targetNamespace, "pull_request"),
+						newRepo("test-good", targetURL, mainBranch, targetNamespace, targetNamespace, "pull_request"),
 					},
 				},
 				runinfo: &webvcs.RunInfo{URL: targetURL, BaseBranch: mainBranch, EventType: "push"},
@@ -73,7 +53,7 @@ func Test_getRepoByCR(t *testing.T) {
 			args: args{
 				data: testclient.Data{
 					Repositories: []*v1alpha1.Repository{
-						testnewrepo.NewRepo("test-good", targetURL, mainBranch, targetNamespace, targetNamespace, "pull_request"),
+						newRepo("test-good", targetURL, mainBranch, targetNamespace, targetNamespace, "pull_request"),
 					},
 				},
 				runinfo: &webvcs.RunInfo{URL: targetURL, BaseBranch: "anotherBaseBranch", EventType: "pull_request"},
@@ -86,7 +66,7 @@ func Test_getRepoByCR(t *testing.T) {
 			args: args{
 				data: testclient.Data{
 					Repositories: []*v1alpha1.Repository{
-						testnewrepo.NewRepo("test-good", "http://nottarget.url", mainBranch,
+						newRepo("test-good", "http://nottarget.url", mainBranch,
 							targetNamespace, targetNamespace, "pull_request"),
 					},
 				},
@@ -100,7 +80,7 @@ func Test_getRepoByCR(t *testing.T) {
 			args: args{
 				data: testclient.Data{
 					Repositories: []*v1alpha1.Repository{
-						testnewrepo.NewRepo("test-good", targetURL, mainBranch,
+						newRepo("test-good", targetURL, mainBranch,
 							targetNamespace, targetNamespace, "pull_request"),
 					},
 				},
@@ -117,7 +97,7 @@ func Test_getRepoByCR(t *testing.T) {
 			args: args{
 				data: testclient.Data{
 					Repositories: []*v1alpha1.Repository{
-						testnewrepo.NewRepo("test-good", targetURL, "refs/tags/*",
+						newRepo("test-good", targetURL, "refs/tags/*",
 							targetNamespace, targetNamespace, "pull_request"),
 					},
 				},
@@ -136,15 +116,15 @@ func Test_getRepoByCR(t *testing.T) {
 			ctx, _ := rtesting.SetupFakeContext(t)
 			cs, _ := testclient.SeedTestData(t, ctx, tt.args.data)
 			client := &cli.Clients{PipelineAsCode: cs.PipelineAsCode}
-			got, err := GetRepoByCR(ctx, client, tt.args.runinfo)
-			if err == nil && tt.wantErr {
-				assert.NilError(t, err, "GetRepoByCR() error = %v, wantErr %v", err, tt.wantErr)
+			got, err := getRepoByCR(ctx, client, tt.args.runinfo)
+			if tt.wantErr {
+				assert.NilError(t, err, "getRepoByCR() error = %v, wantErr %v", err, tt.wantErr)
 			}
 			if tt.wantTargetNS == "" && got.Spec.Namespace != "" {
-				t.Errorf("GetRepoByCR() got = '%v', want '%v'", got.Spec.Namespace, tt.wantTargetNS)
+				t.Errorf("getRepoByCR() got = '%v', want '%v'", got.Spec.Namespace, tt.wantTargetNS)
 			}
 			if tt.wantTargetNS != "" && tt.wantTargetNS != got.Spec.Namespace {
-				t.Errorf("GetRepoByCR() got = '%v', want '%v'", got.Spec.Namespace, tt.wantTargetNS)
+				t.Errorf("getRepoByCR() got = '%v', want '%v'", got.Spec.Namespace, tt.wantTargetNS)
 			}
 		})
 	}
diff --git a/pkg/pipelineascode/pipelineascode_test.go b/pkg/pipelineascode/pipelineascode_test.go
index 3ffe2bdc..df7feea6 100644
--- a/pkg/pipelineascode/pipelineascode_test.go
+++ b/pkg/pipelineascode/pipelineascode_test.go
@@ -10,11 +10,12 @@ import (
 	"path/filepath"
 	"strings"
 	"testing"
+	"time"
 
-	"github.com/openshift-pipelines/pipelines-as-code/pkg/test/repository"
 	testDynamic "github.com/tektoncd/cli/pkg/test/dynamic"
 
 	"github.com/google/go-github/v34/github"
+	"github.com/jonboulle/clockwork"
 	"github.com/openshift-pipelines/pipelines-as-code/pkg/apis/pipelinesascode/v1alpha1"
 	"github.com/openshift-pipelines/pipelines-as-code/pkg/cli"
 	testclient "github.com/openshift-pipelines/pipelines-as-code/pkg/test/clients"
@@ -26,9 +27,65 @@ import (
 	"gotest.tools/v3/assert"
 	corev1 "k8s.io/api/core/v1"
 	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+	"knative.dev/pkg/apis/duck/v1beta1"
 	rtesting "knative.dev/pkg/reconciler/testing"
 )
 
+const (
+	mainBranch      = "mainBranch"
+	targetNamespace = "targetNamespace"
+	targetURL       = "http://nowhere.togo"
+)
+
+func newRepo(name, url, branch, installNamespace, namespace, eventtype string) *v1alpha1.Repository {
+	cw := clockwork.NewFakeClock()
+	return &v1alpha1.Repository{
+		TypeMeta: metav1.TypeMeta{},
+		ObjectMeta: metav1.ObjectMeta{
+			Name:      name,
+			Namespace: installNamespace,
+		},
+		Spec: v1alpha1.RepositorySpec{
+			Namespace: namespace,
+			URL:       url,
+			Branch:    branch,
+			EventType: eventtype,
+		},
+		Status: []v1alpha1.RepositoryRunStatus{
+			{
+				Status:          v1beta1.Status{},
+				PipelineRunName: "pipelinerun5",
+				StartTime:       &metav1.Time{Time: cw.Now().Add(-56 * time.Minute)},
+				CompletionTime:  &metav1.Time{Time: cw.Now().Add(-55 * time.Minute)},
+			},
+			{
+				Status:          v1beta1.Status{},
+				PipelineRunName: "pipelinerun4",
+				StartTime:       &metav1.Time{Time: cw.Now().Add(-46 * time.Minute)},
+				CompletionTime:  &metav1.Time{Time: cw.Now().Add(-45 * time.Minute)},
+			},
+			{
+				Status:          v1beta1.Status{},
+				PipelineRunName: "pipelinerun3",
+				StartTime:       &metav1.Time{Time: cw.Now().Add(-36 * time.Minute)},
+				CompletionTime:  &metav1.Time{Time: cw.Now().Add(-35 * time.Minute)},
+			},
+			{
+				Status:          v1beta1.Status{},
+				PipelineRunName: "pipelinerun2",
+				StartTime:       &metav1.Time{Time: cw.Now().Add(-26 * time.Minute)},
+				CompletionTime:  &metav1.Time{Time: cw.Now().Add(-25 * time.Minute)},
+			},
+			{
+				Status:          v1beta1.Status{},
+				PipelineRunName: "pipelinerun1",
+				StartTime:       &metav1.Time{Time: cw.Now().Add(-16 * time.Minute)},
+				CompletionTime:  &metav1.Time{Time: cw.Now().Add(-15 * time.Minute)},
+			},
+		},
+	}
+}
+
 func replyString(mux *http.ServeMux, url, body string) {
 	mux.HandleFunc(url, func(w http.ResponseWriter, r *http.Request) {
 		fmt.Fprint(w, body)
@@ -81,7 +138,7 @@ func TestRunDeniedFromForcedNamespace(t *testing.T) {
 	}
 	datas := testclient.Data{
 		Repositories: []*v1alpha1.Repository{
-			repository.NewRepo("repo", runinfo.URL, runinfo.BaseBranch, installedNamespace, installedNamespace, "pull_request"),
+			newRepo("repo", runinfo.URL, runinfo.BaseBranch, installedNamespace, installedNamespace, "pull_request"),
 		},
 	}
 	stdata, _ := testclient.SeedTestData(t, ctx, datas)
@@ -127,7 +184,7 @@ func testSetupTektonDir(mux *http.ServeMux, runinfo *webvcs.RunInfo, directory s
 
 func testSetupCommonGhReplies(t *testing.T, mux *http.ServeMux, runinfo *webvcs.RunInfo, finalStatus, finalStatusText string,
 	noReplyOrgPublicMembers bool) {
-	// Take a directory and generate replies as Github for it
+	// Take a directory and geneate replies as Github for it
 	replyString(mux,
 		fmt.Sprintf("/repos/%s/%s/contents/internal/task", runinfo.Owner, runinfo.Repository),
 		`{"sha": "internaltasksha"}`)
@@ -266,7 +323,7 @@ func TestRun(t *testing.T) {
 			finalStatus:  "skipped",
 			finalLogText: "Skipping creating status check",
 			repositories: []*v1alpha1.Repository{
-				repository.NewRepo("test-run", "https://service/documentation",
+				newRepo("test-run", "https://service/documentation",
 					"a branch", "namespace", "namespace", "pull_request"),
 			},
 		},
@@ -287,7 +344,7 @@ func TestRun(t *testing.T) {
 			finalStatus:  "skipped",
 			finalLogText: "not find a namespace match",
 			repositories: []*v1alpha1.Repository{
-				repository.NewRepo("test-run", "https://nowhere.com",
+				newRepo("test-run", "https://nowhere.com",
 					"a branch", "namespace", "namespace", "pull_request"),
 			},
 		},
@@ -315,7 +372,7 @@ func TestRun(t *testing.T) {
 			ctx, _ := rtesting.SetupFakeContext(t)
 			if tt.repositories == nil {
 				tt.repositories = []*v1alpha1.Repository{
-					repository.NewRepo("test-run", tt.runinfo.URL, tt.runinfo.BaseBranch, "namespace", "namespace", tt.runinfo.EventType),
+					newRepo("test-run", tt.runinfo.URL, tt.runinfo.BaseBranch, "namespace", "namespace", tt.runinfo.EventType),
 				}
 			}
 			tdata := testclient.Data{
diff --git a/pkg/test/repository/repository.go b/pkg/test/repository/repository.go
deleted file mode 100644
index 7a7984ba..00000000
--- a/pkg/test/repository/repository.go
+++ /dev/null
@@ -1,59 +0,0 @@
-package repository
-
-import (
-	"time"
-
-	"github.com/jonboulle/clockwork"
-	"github.com/openshift-pipelines/pipelines-as-code/pkg/apis/pipelinesascode/v1alpha1"
-	v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
-	"knative.dev/pkg/apis/duck/v1beta1"
-)
-
-func NewRepo(name, url, branch, installNamespace, namespace, eventtype string) *v1alpha1.Repository {
-	cw := clockwork.NewFakeClock()
-	return &v1alpha1.Repository{
-		TypeMeta: v1.TypeMeta{},
-		ObjectMeta: v1.ObjectMeta{
-			Name:      name,
-			Namespace: installNamespace,
-		},
-		Spec: v1alpha1.RepositorySpec{
-			Namespace: namespace,
-			URL:       url,
-			Branch:    branch,
-			EventType: eventtype,
-		},
-		Status: []v1alpha1.RepositoryRunStatus{
-			{
-				Status:          v1beta1.Status{},
-				PipelineRunName: "pipelinerun5",
-				StartTime:       &v1.Time{Time: cw.Now().Add(-56 * time.Minute)},
-				CompletionTime:  &v1.Time{Time: cw.Now().Add(-55 * time.Minute)},
-			},
-			{
-				Status:          v1beta1.Status{},
-				PipelineRunName: "pipelinerun4",
-				StartTime:       &v1.Time{Time: cw.Now().Add(-46 * time.Minute)},
-				CompletionTime:  &v1.Time{Time: cw.Now().Add(-45 * time.Minute)},
-			},
-			{
-				Status:          v1beta1.Status{},
-				PipelineRunName: "pipelinerun3",
-				StartTime:       &v1.Time{Time: cw.Now().Add(-36 * time.Minute)},
-				CompletionTime:  &v1.Time{Time: cw.Now().Add(-35 * time.Minute)},
-			},
-			{
-				Status:          v1beta1.Status{},
-				PipelineRunName: "pipelinerun2",
-				StartTime:       &v1.Time{Time: cw.Now().Add(-26 * time.Minute)},
-				CompletionTime:  &v1.Time{Time: cw.Now().Add(-25 * time.Minute)},
-			},
-			{
-				Status:          v1beta1.Status{},
-				PipelineRunName: "pipelinerun1",
-				StartTime:       &v1.Time{Time: cw.Now().Add(-16 * time.Minute)},
-				CompletionTime:  &v1.Time{Time: cw.Now().Add(-15 * time.Minute)},
-			},
-		},
-	}
-}
diff --git a/test/fixtures/push.json b/test/fixtures/push.json
index c2ae420b..7b7a65c6 100644
--- a/test/fixtures/push.json
+++ b/test/fixtures/push.json
@@ -1,7 +1,7 @@
-{
+ {
   "ref": "refs/heads/main",
-  "before": "711d8e2572c4b097586626a28bf0babc7a86f0ba",
-  "after": "ef75c7db8a921a8c0adaabe2e309f2f9d7ce5bd4",
+  "before": "8830a4b3335c807e18fa7595c43b670f78777a59",
+  "after": "1e6b485a4a1348d19c8943cc71c54b6ed5fde503",
   "repository": {
     "id": 355197825,
     "node_id": "MDEwOlJlcG9zaXRvcnkzNTUxOTc4MjU=",
@@ -71,16 +71,16 @@
     "releases_url": "https://api.github.com/repos/openshift-pipelines/pipelines-as-code/releases{/id}",
     "deployments_url": "https://api.github.com/repos/openshift-pipelines/pipelines-as-code/deployments",
     "created_at": 1617715561,
-    "updated_at": "2021-06-02T13:35:32Z",
-    "pushed_at": 1622641606,
+    "updated_at": "2021-05-20T14:48:24Z",
+    "pushed_at": 1621596688,
     "git_url": "git://github.com/openshift-pipelines/pipelines-as-code.git",
     "ssh_url": "git@github.com:openshift-pipelines/pipelines-as-code.git",
     "clone_url": "https://github.com/openshift-pipelines/pipelines-as-code.git",
     "svn_url": "https://github.com/openshift-pipelines/pipelines-as-code",
     "homepage": null,
-    "size": 9036,
-    "stargazers_count": 3,
-    "watchers_count": 3,
+    "size": 8472,
+    "stargazers_count": 1,
+    "watchers_count": 1,
     "language": "Go",
     "has_issues": true,
     "has_projects": false,
@@ -101,9 +101,9 @@
     },
     "forks": 4,
     "open_issues": 10,
-    "watchers": 3,
+    "watchers": 1,
     "default_branch": "main",
-    "stargazers": 3,
+    "stargazers": 1,
     "master_branch": "main",
     "organization": "openshift-pipelines"
   },
@@ -153,15 +153,15 @@
   "deleted": false,
   "forced": false,
   "base_ref": null,
-  "compare": "https://github.com/openshift-pipelines/pipelines-as-code/compare/711d8e2572c4...ef75c7db8a92",
+  "compare": "https://github.com/openshift-pipelines/pipelines-as-code/compare/8830a4b3335c...1e6b485a4a13",
   "commits": [
     {
-      "id": "ba677db1c9680f674213e76eed1dc3696d7f59a6",
-      "tree_id": "4bf257c4d62a867b78ee04d521d976634be76363",
+      "id": "acf31f1e7b1f6982b596273b2492d86e5655c7f8",
+      "tree_id": "a5acb1d8b5e412723375ef7548d47d73502027a8",
       "distinct": true,
-      "message": "Seem like you don't need the @latest to go install\n\nSigned-off-by: Chmouel Boudjnah <chmouel@redhat.com>",
-      "timestamp": "2021-06-02T15:40:02+02:00",
-      "url": "https://github.com/openshift-pipelines/pipelines-as-code/commit/ba677db1c9680f674213e76eed1dc3696d7f59a6",
+      "message": "Define our own triggertemplate for recheck\n\nSince trigger bugs out everytime when passing the whole body and when we\nhave quotes, we defines our own triggertemplates for it and regenerate\na json with the payload we need to be parsed.\n\nThis works but this is stupid :\\",
+      "timestamp": "2021-05-21T11:21:24+02:00",
+      "url": "https://github.com/openshift-pipelines/pipelines-as-code/commit/acf31f1e7b1f6982b596273b2492d86e5655c7f8",
       "author": {
         "name": "Chmouel Boudjnah",
         "email": "chmouel@redhat.com",
@@ -173,22 +173,51 @@
         "username": "chmouel"
       },
       "added": [
+        "config/401-trigger-issue-recheck.yaml"
+      ],
+      "removed": [
 
+      ],
+      "modified": [
+        "config/400-triggers.yaml",
+        "test/fixtures/check_suite_rerequest_prcheck.json"
+      ]
+    },
+    {
+      "id": "822b58e0e4171ea14a1f04a2c31c76e3e84e805b",
+      "tree_id": "95bb0e0a6c81e7a49d792370512ea31b6a91a169",
+      "distinct": true,
+      "message": "Define pull request trigger template workaround\n\nTriggers bug on comment, so we rather avoided by reconstructing our own payload\nand using jsonpath.\n\nRather clunky but works at least.\n\nSigned-off-by: Chmouel Boudjnah <chmouel@redhat.com>",
+      "timestamp": "2021-05-21T13:20:07+02:00",
+      "url": "https://github.com/openshift-pipelines/pipelines-as-code/commit/822b58e0e4171ea14a1f04a2c31c76e3e84e805b",
+      "author": {
+        "name": "Chmouel Boudjnah",
+        "email": "chmouel@redhat.com",
+        "username": "chmouel"
+      },
+      "committer": {
+        "name": "Chmouel Boudjnah",
+        "email": "chmouel@redhat.com",
+        "username": "chmouel"
+      },
+      "added": [
+        "config/402-trigger-pull-request.yaml",
+        "test/fixtures/pull-req.json"
       ],
       "removed": [
 
       ],
       "modified": [
-        "README.md"
+        "config/400-triggers.yaml"
       ]
     },
     {
-      "id": "ef75c7db8a921a8c0adaabe2e309f2f9d7ce5bd4",
-      "tree_id": "4bf257c4d62a867b78ee04d521d976634be76363",
+      "id": "1e6b485a4a1348d19c8943cc71c54b6ed5fde503",
+      "tree_id": "95bb0e0a6c81e7a49d792370512ea31b6a91a169",
       "distinct": true,
-      "message": "Merge pull request #108 from chmouel/update-readme\n\nSeem like you don't need the @latest to go install",
-      "timestamp": "2021-06-02T15:46:46+02:00",
-      "url": "https://github.com/openshift-pipelines/pipelines-as-code/commit/ef75c7db8a921a8c0adaabe2e309f2f9d7ce5bd4",
+      "message": "Merge pull request #79 from chmouel/yamls-beurk",
+      "timestamp": "2021-05-21T13:31:28+02:00",
+      "url": "https://github.com/openshift-pipelines/pipelines-as-code/commit/1e6b485a4a1348d19c8943cc71c54b6ed5fde503",
       "author": {
         "name": "Chmouel Boudjnah",
         "email": "cboudjna@redhat.com",
@@ -200,23 +229,26 @@
         "username": "web-flow"
       },
       "added": [
-
+        "config/401-trigger-issue-recheck.yaml",
+        "config/402-trigger-pull-request.yaml",
+        "test/fixtures/pull-req.json"
       ],
       "removed": [
 
       ],
       "modified": [
-        "README.md"
+        "config/400-triggers.yaml",
+        "test/fixtures/check_suite_rerequest_prcheck.json"
       ]
     }
   ],
   "head_commit": {
-    "id": "ef75c7db8a921a8c0adaabe2e309f2f9d7ce5bd4",
-    "tree_id": "4bf257c4d62a867b78ee04d521d976634be76363",
+    "id": "1e6b485a4a1348d19c8943cc71c54b6ed5fde503",
+    "tree_id": "95bb0e0a6c81e7a49d792370512ea31b6a91a169",
     "distinct": true,
-    "message": "Merge pull request #108 from chmouel/update-readme\n\nSeem like you don't need the @latest to go install",
-    "timestamp": "2021-06-02T15:46:46+02:00",
-    "url": "https://github.com/openshift-pipelines/pipelines-as-code/commit/ef75c7db8a921a8c0adaabe2e309f2f9d7ce5bd4",
+    "message": "Merge pull request #79 from chmouel/yamls-beurk",
+    "timestamp": "2021-05-21T13:31:28+02:00",
+    "url": "https://github.com/openshift-pipelines/pipelines-as-code/commit/1e6b485a4a1348d19c8943cc71c54b6ed5fde503",
     "author": {
       "name": "Chmouel Boudjnah",
       "email": "cboudjna@redhat.com",
@@ -228,13 +260,16 @@
       "username": "web-flow"
     },
     "added": [
-
+      "config/401-trigger-issue-recheck.yaml",
+      "config/402-trigger-pull-request.yaml",
+      "test/fixtures/pull-req.json"
     ],
     "removed": [
 
     ],
     "modified": [
-      "README.md"
+      "config/400-triggers.yaml",
+      "test/fixtures/check_suite_rerequest_prcheck.json"
     ]
   }
 }