Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add BitBucket Interceptor with examples and README #578

Merged
merged 1 commit into from
Jun 3, 2020

Conversation

savitaashture
Copy link
Contributor

@savitaashture savitaashture commented May 14, 2020

Changes

  1. Added BitBucket Interceptor
  2. Added examples with README
  3. Updated existing doc

Fixes: #362

Submitter Checklist

These are the criteria that every PR should meet, please check them off as you
review them:

See the contribution guide for more details.

Release Notes

- Added BitBucket Interceptors

@tekton-robot tekton-robot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label May 14, 2020
@tekton-robot
Copy link

The following is the coverage report on the affected files.
Say /test pull-tekton-triggers-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/apis/triggers/v1alpha1/event_listener_validation.go 92.9% 93.1% 0.2
pkg/interceptors/bitbucket/bitbucket.go Do not exist 85.2%
pkg/sink/sink.go 74.0% 74.3% 0.3

@tekton-robot
Copy link

The following is the coverage report on the affected files.
Say /test pull-tekton-triggers-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/apis/triggers/v1alpha1/event_listener_validation.go 92.9% 93.1% 0.2
pkg/interceptors/bitbucket/bitbucket.go Do not exist 85.2%
pkg/sink/sink.go 74.0% 74.3% 0.3

@tekton-robot
Copy link

The following is the coverage report on the affected files.
Say /test pull-tekton-triggers-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/apis/triggers/v1alpha1/event_listener_validation.go 92.9% 93.1% 0.2
pkg/interceptors/bitbucket/bitbucket.go Do not exist 85.2%
pkg/sink/sink.go 74.0% 74.3% 0.3

@tekton-robot
Copy link

The following is the coverage report on the affected files.
Say /test pull-tekton-triggers-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/apis/triggers/v1alpha1/event_listener_validation.go 92.9% 93.1% 0.2
pkg/interceptors/bitbucket/bitbucket.go Do not exist 85.2%
pkg/sink/sink.go 74.0% 74.3% 0.3

docs/eventlisteners.md Outdated Show resolved Hide resolved
docs/eventlisteners.md Outdated Show resolved Hide resolved
@tekton-robot
Copy link

The following is the coverage report on the affected files.
Say /test pull-tekton-triggers-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/apis/triggers/v1alpha1/event_listener_validation.go 92.9% 93.1% 0.2
pkg/interceptors/bitbucket/bitbucket.go Do not exist 85.2%
pkg/sink/sink.go 74.0% 74.3% 0.3

Copy link
Member

@dibyom dibyom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding this @savitaashture I have a few minor comments mostly around organizing the examples and docs. In addition, could you also squash the commits, and mention the issue in the commit message (https://github.com/tektoncd/community/blob/master/standards.md#commit-messages)

// No bitbucket validation required yet.
// if i.Bitbucket != nil {
//
// }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't think this is necessary?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, we should add validation for these 😄 (maybe in a future PR)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we remove the commented out code?

pkg/interceptors/bitbucket/bitbucket_test.go Outdated Show resolved Hide resolved
pkg/sink/sink_test.go Outdated Show resolved Hide resolved
examples/bitbucket/README.md Outdated Show resolved Hide resolved
examples/bitbucket/README.md Outdated Show resolved Hide resolved
examples/bitbucket/pipeline.yaml Outdated Show resolved Hide resolved
examples/bitbucket/secret.yaml Outdated Show resolved Hide resolved
examples/bitbucket/role.yaml Outdated Show resolved Hide resolved
@tekton-robot
Copy link

The following is the coverage report on the affected files.
Say /test pull-tekton-triggers-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/apis/triggers/v1alpha1/event_listener_validation.go 92.9% 93.1% 0.2
pkg/interceptors/bitbucket/bitbucket.go Do not exist 85.2%
pkg/sink/sink.go 74.0% 74.3% 0.3

Copy link
Member

@dibyom dibyom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Almost there, just a few small nits!

// No bitbucket validation required yet.
// if i.Bitbucket != nil {
//
// }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we remove the commented out code?

GitLab: &v1alpha1.GitLabInterceptor{},
GitHub: &v1alpha1.GitHubInterceptor{},
GitLab: &v1alpha1.GitLabInterceptor{},
Bitbucket: &v1alpha1.BitBucketInterceptor{},
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think adding it here is doing anything since this is just testing the validation fails with multiple interceptors

Copy link
Contributor Author

@savitaashture savitaashture Jun 2, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dibyom I forgot to mention that adding BitBucket here will cover this scenario
The point of adding here is to cover the unit test.
I have reverted back by adding BitBucket

Let me know on this

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm, seems ok for now but wondering if we should have a separate test for that...

pkg/interceptors/cel/cel_test.go Outdated Show resolved Hide resolved
pkg/interceptors/github/github_test.go Outdated Show resolved Hide resolved
pkg/interceptors/gitlab/gitlab_test.go Outdated Show resolved Hide resolved
@tekton-robot
Copy link

The following is the coverage report on the affected files.
Say /test pull-tekton-triggers-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/apis/triggers/v1alpha1/event_listener_validation.go 92.9% 91.4% -1.5
pkg/interceptors/bitbucket/bitbucket.go Do not exist 85.2%
pkg/sink/sink.go 74.0% 74.3% 0.3

@dibyom
Copy link
Member

dibyom commented Jun 1, 2020

Excellent. Thank you @savitaashture Could you squash up the 2 commits and we can merge!
/approve

@tekton-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dibyom

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@tekton-robot tekton-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 1, 2020
@tekton-robot
Copy link

The following is the coverage report on the affected files.
Say /test pull-tekton-triggers-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/apis/triggers/v1alpha1/event_listener_validation.go 92.9% 93.1% 0.2
pkg/interceptors/bitbucket/bitbucket.go Do not exist 85.2%
pkg/sink/sink.go 74.0% 74.3% 0.3

@dibyom
Copy link
Member

dibyom commented Jun 2, 2020

/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Jun 2, 2020
@tekton-robot tekton-robot removed the lgtm Indicates that a PR is ready to be merged. label Jun 3, 2020
@tekton-robot
Copy link

The following is the coverage report on the affected files.
Say /test pull-tekton-triggers-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/apis/triggers/v1alpha1/event_listener_validation.go 92.9% 93.1% 0.2
pkg/interceptors/bitbucket/bitbucket.go Do not exist 85.2%
pkg/sink/sink.go 74.0% 74.3% 0.3

@tekton-robot
Copy link

The following is the coverage report on the affected files.
Say /test pull-tekton-triggers-go-coverage to re-run this coverage report

File Old Coverage New Coverage Delta
pkg/apis/triggers/v1alpha1/event_listener_validation.go 92.9% 93.1% 0.2
pkg/interceptors/bitbucket/bitbucket.go Do not exist 85.2%
pkg/sink/sink.go 74.0% 74.3% 0.3

@dibyom
Copy link
Member

dibyom commented Jun 3, 2020

/lgtm

@tekton-robot tekton-robot added the lgtm Indicates that a PR is ready to be merged. label Jun 3, 2020
@tekton-robot tekton-robot merged commit dd1aff6 into tektoncd:master Jun 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants