jenkinsci / gogs-webhook-plugin

Jenkins Gogs Webhook
https://plugins.jenkins.io/gogs-webhook/
MIT License
78 stars 42 forks source link

How can filter branch #30

Open CritasWang opened 6 years ago

CritasWang commented 6 years ago

How can filter branch。 like devProject only excute by push develop branch

s-mokrushin commented 6 years ago

Yep, I didn't find this feature too :(

sanderv32 commented 6 years ago

At the moment there is no filter function like this. I only don't know the ETA for this as there are also other issues which need to be fixed and i'm the only contributor at the moment and my spare time is precious.

geco82 commented 6 years ago

+1

sanderv32 commented 6 years ago

Version 1.0.11 has this feature.

geco82 commented 6 years ago

Could you please explain me the usage? Thanks!

sanderv32 commented 6 years ago

Just put '[IGNORE]' in front of your commit to ignore the push.

sanderv32 commented 6 years ago

See: https://github.com/jenkinsci/gogs-webhook-plugin/commit/1c1abd578fd90f7b4f5815e8968d20be6f9bb844

urusha commented 6 years ago

@sanderv32 , I believe IGNORE feature - is not what @CritasWang has described. Imagine gogs repository with 10 branches, and I want to trigger builds only for 3 of them. IGNORE will not help. See https://github.com/jenkinsci/gitlab-plugin#branch-filtering I think the issue should be reopened.

fancyboynet commented 5 years ago

Is it fixed now?

sanderv32 commented 5 years ago

Seems like PR #52 is @CritasWang was talking about. Will merge this soon.

sanderv32 commented 5 years ago

Just merged #61 and will be in the next release

urusha commented 5 years ago

@sanderv32 I see Branch Filter is here. Thanks! But I didn't find a way to specify multiple branches. Is it possible? Should I file new report?

sanderv32 commented 5 years ago

Branch filter currently only works for one branch. If you want to specify multiple branches we need to think on how to do this

urusha commented 5 years ago

Well, this is how it's in gitlab plugin: image We could start with regex or comma separation (with wildcards maybe)?

CritasWang commented 5 years ago

Well, this is how it's in gitlab plugin: image We could start with regex or comma separation (with wildcards maybe)?

https://github.com/CritasWang/gogs-webhook-plugin/tree/master/bin

Here is me forked from jenkinsci/gogs-webhook-plugin

But I did not submit PR.Because I don't think it's good enough.just for temporary use。

image image

Code: image