-
Notifications
You must be signed in to change notification settings - Fork 426
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 event type filtering to the gitlab interceptor. #235
Conversation
This mirrors the event type fltering that exists for Github.
The following is the coverage report on pkg/.
|
if subtle.ConstantTimeCompare([]byte(header), secretToken) == 0 { | ||
return nil, errors.New("Invalid X-Gitlab-Token") | ||
// Make sure to use a constant time comparison here. | ||
if subtle.ConstantTimeCompare([]byte(header), secretToken) == 0 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!!
@@ -7517,4 +7517,3 @@ Import: github.com/tektoncd/triggers/vendor/knative.dev/pkg | |||
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. | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if this was intentional?
[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 |
/lgtm LGTM, though once we have expression filtering (#49), we may want to consider removing this event filtering from the interceptor. I think it might be clearer / more consistent to have all "if field matches foo" logic to live in the expression, since it will be a more general and flexible location for that to be done. Since it doesn't exist yet, this is fine for now! ^_^ |
Changes
This mirrors the event type fltering that exists for Github.
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