Webhooks not triggered when git_ref_pattern is empty space
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Launchpad itself |
Triaged
|
Low
|
Unassigned |
Bug Description
Context:
Launchpad added a feature where when a `git_ref_pattern` is added to a webhook, then that webhook only triggers when the pattern matches the git refs/branches associated with what event triggered the webhook.
Bug description:
When a user sets the `git_ref_pattern` to an empty white space, the webhook will not trigger because the pattern doesn't match. This is quite confusing for a user, because they won't even see a message warning them.
To reproduce:
- Create a new webhook for a git repository that has a `git_ref_pattern=" "` with scope "Git push"
- Push a change to a branch in that repository
- The webhook is not triggered
Possible solutions:
1) Add validation to the input - we shouldn't allow a white-space as a git-ref-pattern
2) Or, allow white-spaces, but sanitize the pattern on input by removing white spaces around on submit
tags: | added: trivial |
Changed in launchpad: | |
importance: | Undecided → Low |
status: | New → Triaged |
I am all for 1) - do not allow invalid data to enter our systems.