Branch filter on group level push event webhook not applied
Summary
Push events on group level webhook are triggered for all push events regardless of the branch set in branch filter setting.
Steps to reproduce
- Configure a webhook for push event only, set branch filter to master on a Group. (SSL Check enabled for us)
- Push a commit to a non-master branch
- Webhook is received in our internal build system. As a work around we setup the build system to check the ref field of the webhook for "master" before triggering any builds.
What is the current bug behavior?
Webhooks are received for all pushes regardless of branch
What is the expected correct behavior?
Webhooks should only be sent for master branch (or branch name set in filter)
Relevant logs and/or screenshots
Output of checks
(If you are reporting a bug on GitLab.com, write: This bug happens on GitLab.com)
Results of GitLab environment info
Expand for output related to GitLab environment info
System information System: Ubuntu 18.04 Proxy: no Current User: git Using RVM: no Ruby Version: 2.5.3p105 Gem Version: 2.7.9 Bundler Version:1.17.3 Rake Version: 12.3.2 Redis Version: 3.2.12 Git Version: 2.21.0 Sidekiq Version:5.2.7 Go Version: unknown
GitLab information Version: 11.11.2-ee Revision: cfdecb7c5de Directory: /opt/gitlab/embedded/service/gitlab-rails DB Adapter: PostgreSQL DB Version: 10.6 URL: https://gitlab.mycompany.com HTTP Clone URL: https://gitlab.mycompany.com/some-group/some-project.git SSH Clone URL: git@gitlab.mycompany.com:some-group/some-project.git Elasticsearch: yes Geo: no Using LDAP: no Using Omniauth: yes Omniauth Providers: saml, gitlab
GitLab Shell Version: 9.1.0 Repository storage paths:
- default: /mnt/gitlab-efs/git-data/repositories GitLab Shell path: /opt/gitlab/embedded/service/gitlab-shell Git: /opt/gitlab/embedded/bin/git
Results of GitLab application Check
Expand for output related to the GitLab application check
Checking GitLab subtasks ...
Checking GitLab Shell ...
GitLab Shell: ... GitLab Shell version >= 9.1.0 ? ... OK (9.1.0) Running /opt/gitlab/embedded/service/gitlab-shell/bin/check Check GitLab API access: OK Redis available via internal API: OK
Access to /mnt/gitlab-efs/home/.ssh/authorized_keys: OK gitlab-shell self-check successful
Checking GitLab Shell ... Finished
Checking Gitaly ...
Gitaly: ... default ... OK
Checking Gitaly ... Finished
Checking Sidekiq ...
Sidekiq: ... Running? ... yes Number of Sidekiq processes ... 1
Checking Sidekiq ... Finished
Checking Incoming Email ...
Incoming Email: ... Reply by email is disabled in config/gitlab.yml
Checking Incoming Email ... Finished
Checking LDAP ...
LDAP: ... LDAP is disabled in config/gitlab.yml
Checking LDAP ... Finished
Checking GitLab App ...
Git configured correctly? ... yes Database config exists? ... yes All migrations up? ... yes Database contains orphaned GroupMembers? ... no GitLab config exists? ... yes GitLab config up to date? ... yes Log directory writable? ... yes Tmp directory writable? ... yes Uploads directory exists? ... yes Uploads directory has correct permissions? ... yes Uploads directory tmp has correct permissions? ... yes Init script exists? ... skipped (omnibus-gitlab has no init script) Init script up-to-date? ... skipped (omnibus-gitlab has no init script) Projects have namespace: ... 11/5 ... yes 3/6 ... yes 13/7 ... yes 13/8 ... yes 13/9 ... yes 13/10 ... yes 13/11 ... yes 13/12 ... yes 13/13 ... yes 13/14 ... yes 13/15 ... yes 13/16 ... yes 13/17 ... yes 13/18 ... yes 13/19 ... yes 13/20 ... yes 13/21 ... yes 5/22 ... yes 25/23 ... yes 13/25 ... yes 5/26 ... yes 5/27 ... yes 2/29 ... yes 32/33 ... yes 5/34 ... yes 37/36 ... yes 55/37 ... yes 7/38 ... yes 32/39 ... yes 3/40 ... yes 7/41 ... yes 35/42 ... yes 38/43 ... yes 34/44 ... yes 36/45 ... yes 7/46 ... yes 32/47 ... yes 32/48 ... yes 32/49 ... yes 37/50 ... yes 106/52 ... yes 55/53 ... yes 28/54 ... yes 35/55 ... yes 58/56 ... yes 63/57 ... yes 66/58 ... yes 7/60 ... yes 7/61 ... yes 41/62 ... yes 7/63 ... yes 32/64 ... yes 5/65 ... yes 5/68 ... yes 5/70 ... yes 38/71 ... yes 3/72 ... yes 25/73 ... yes 25/74 ... yes 69/75 ... yes 7/76 ... yes 7/77 ... yes 10/78 ... yes 7/79 ... yes 34/80 ... yes 81/81 ... yes 82/82 ... yes 7/83 ... yes 28/84 ... yes 31/85 ... yes 31/86 ... yes 31/87 ... yes 31/88 ... yes 31/89 ... yes 31/90 ... yes 31/91 ... yes 31/92 ... yes 31/93 ... yes 77/95 ... yes 85/96 ... yes 38/97 ... yes 7/98 ... yes 85/99 ... yes 32/100 ... yes 32/101 ... yes 36/102 ... yes 37/103 ... yes 86/104 ... yes 63/105 ... yes 82/106 ... yes 63/107 ... yes 38/108 ... yes 7/109 ... yes 92/110 ... yes 35/111 ... yes 25/113 ... yes 74/114 ... yes 7/115 ... yes 95/116 ... yes 95/117 ... yes 96/118 ... yes 36/119 ... yes 28/125 ... yes 89/126 ... yes 99/127 ... yes 66/128 ... yes 34/129 ... yes 66/130 ... yes 7/131 ... yes 28/133 ... yes 66/134 ... yes 97/136 ... yes 7/137 ... yes 35/138 ... yes 97/142 ... yes 63/143 ... yes 25/144 ... yes 81/145 ... yes 7/146 ... yes 96/148 ... yes 13/149 ... yes 13/150 ... yes 13/151 ... yes 38/152 ... yes 55/153 ... yes 55/154 ... yes 121/155 ... yes 13/156 ... yes 66/157 ... yes 110/158 ... yes 38/159 ... yes 152/162 ... yes 2/164 ... yes 13/165 ... yes 13/166 ... yes 13/167 ... yes 111/168 ... yes 46/169 ... yes 112/170 ... yes 110/171 ... yes 110/172 ... yes 63/173 ... yes 13/174 ... yes 110/175 ... yes 46/176 ... yes 83/177 ... yes 113/178 ... yes 118/179 ... yes 118/180 ... yes 114/181 ... yes 99/182 ... yes 99/183 ... yes 99/184 ... yes 13/185 ... yes 81/186 ... yes 119/188 ... yes 7/189 ... yes 96/190 ... yes 107/192 ... yes 3/193 ... yes 106/194 ... yes 25/195 ... yes 119/196 ... yes 119/197 ... yes 119/198 ... yes 96/199 ... yes 126/200 ... yes 126/201 ... yes 124/202 ... yes 124/203 ... yes 107/204 ... yes 104/207 ... yes 104/208 ... yes 112/209 ... yes 112/210 ... yes 107/211 ... yes 107/212 ... yes 2/213 ... yes 63/214 ... yes 2/215 ... yes 129/216 ... yes 41/217 ... yes 63/218 ... yes 55/220 ... yes 113/221 ... yes 13/222 ... yes 119/225 ... yes 97/227 ... yes 81/229 ... yes 112/230 ... yes 112/232 ... yes 50/235 ... yes 136/236 ... yes 126/237 ... yes 97/241 ... yes 63/242 ... yes 20/243 ... yes 96/244 ... yes 66/245 ... yes 136/246 ... yes 101/247 ... yes 113/249 ... yes 101/250 ... yes 138/251 ... yes 12/252 ... yes 13/253 ... yes 55/254 ... yes 55/255 ... yes 96/256 ... yes 96/257 ... yes 55/258 ... yes 113/259 ... yes 139/260 ... yes 114/262 ... yes 114/263 ... yes 114/264 ... yes 114/265 ... yes 114/266 ... yes 114/267 ... yes 114/268 ... yes 114/269 ... yes 114/270 ... yes 114/271 ... yes 114/272 ... yes 96/273 ... yes 96/274 ... yes 97/275 ... yes 139/276 ... yes 3/277 ... yes 114/278 ... yes 105/279 ... yes 28/280 ... yes 119/281 ... yes 139/282 ... yes 114/283 ... yes 119/284 ... yes 25/285 ... yes 139/286 ... yes 114/287 ... yes 139/288 ... yes 110/289 ... yes 139/290 ... yes 113/291 ... yes 99/292 ... yes 114/293 ... yes 25/294 ... yes 114/295 ... yes 3/296 ... yes 114/297 ... yes 114/298 ... yes 28/299 ... yes 110/301 ... yes 97/304 ... yes 96/305 ... yes 3/309 ... yes 114/310 ... yes 97/311 ... yes 105/314 ... yes 66/315 ... yes 114/316 ... yes 3/317 ... yes 119/318 ... yes 114/319 ... yes 25/320 ... yes 112/321 ... yes 66/322 ... yes 66/323 ... yes 25/324 ... yes 25/325 ... yes 99/326 ... yes 119/327 ... yes 55/328 ... yes 63/329 ... yes 105/330 ... yes 25/331 ... yes 96/332 ... yes 2/333 ... yes 112/334 ... yes 112/335 ... yes 97/336 ... yes Redis version >= 2.8.0? ... yes Ruby version >= 2.5.3 ? ... yes (2.5.3) Git version >= 2.21.0 ? ... yes (2.21.0) Git user has default SSH configuration? ... yes Active users: ... 111 Elasticsearch version 5.6 - 6.x? ... yes (6.7.0)
Checking GitLab App ... Finished
Checking GitLab subtasks ... Finished
Possible fixes
(If you can, link to the line of code that might be responsible for the problem)