-
Notifications
You must be signed in to change notification settings - Fork 402
Ignorable pusher #58
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
base: master
Are you sure you want to change the base?
Ignorable pusher #58
Conversation
|
This should work and be configured in GIT scm configuration. |
|
How would you do this? The only possibility I have found would be something like "Polling ignores commits from certain users". But this would involve committers but not pushers. |
|
Wrong. You are confusing this with the existing featue of ignoring a commit-author. The pusher is not necessarily the committer! |
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.
this breaks backward compatibility
|
Thank you for a pull request! Please check this document for how the Jenkins project handles pull requests |
… of an ignorable pusher
+ typo fix in word malformed
as of it makes fail to boot jenkins after installation of plugin which depends on this class. Also remove migration to another package for this class and use it directly (cherry picked from commit 061d849)
|
When this should be merged? |
|
This will be never merged it current state, because of it provides only one case of filtering push (there is same for branches, committers, titles). But it still open because of its a good idea and not bad implementation. But we beed some more common implementation of filtering feature. You can use hpi from the jenkins build to use this custom implementation (thanks @aderigs for rebasing) |
|
What about using the Run Condition Plugin to support all kinds of filtering? |
|
You can solve this issue by using intermediate @lanwen on other hand this 'hook -> gitscm poll' trigger wouldn't fit in any good APIs so probably such feature may be added to this trigger. But everything should be localised somewhere in code unique to this trigger. |
|
Keeping in mind that gh utilises git polling log i can suggest try set exclusions using git configuration features (i.e. user exclusions). It wouldn't use gh names, but should work fine if people setting right names in git commits. |
|
When I install the plugin with this change I don't see where to configure the new configuration! |
|
Yes. The last version has introduced src/main/resources/com/cloudbees/jenkins/GitHubPushTrigger/config.groovy which hides src/main/resources/com/cloudbees/jenkins/GitHubPushTrigger/config.jelly. I think the clean way would be to migrate config.jelly into the new config.groovy. But I do not know how to do this. |
|
the groovy file should be: package com.cisco.jenkins.GitHubPushTrigger
import com.cisco.jenkins.GitHubPushTrigger
def f = namespace(lib.FormTagLib);
tr {
td(colspan: 4) {
f.entry(title: _("Ignorable Pusher"), field: "ignorablePusher") {
f.textbox()
}
}
}
script(src: "${rootURL}${h.getResourcePath()}/plugin/github/js/warning.js")
script {
text("""
InlineWarning.setup({
id: 'gh-hooks-warn',
url: ${descriptor.getCheckMethod('hookRegistered').toCheckUrl()},
input: 'input[name="${GitHubPushTrigger.class.getName().replace(".", "-")}"]'
}).start();
""")
} |
Codecov Report
@@ Coverage Diff @@
## master #58 +/- ##
==========================================
+ Coverage 75.07% 75.08% +0.01%
==========================================
Files 64 64
Lines 1412 1425 +13
Branches 146 149 +3
==========================================
+ Hits 1060 1070 +10
+ Misses 307 306 -1
- Partials 45 49 +4
Continue to review full report at Codecov.
|
|
Please rebase and not merge |
|
@KostyaSha, it's why I did
But don't know why, sounds not working, maybe missing some settings ? |
|
That message to @aderigs who owns this PR |
|
Does this support ignoring specific commit messages as well? |
|
No. It ignores the pusher by name or email. If you want to ignore by specific commit messages you could use the git-plugin. |
|
I have not been able to find a solution for this using the github folder plugin, which manages webhooks, and I believe uses this plugin. It automatically sets up the job and doesn't give you anywhere to configure the SCM that was setup. I just need a way to ignore webhook triggers if a specific commit message exists. I was hoping this would solve the issue :( |
This defines a regular expression to which the name or email of an ignorable pusher is to be matched. Such a push will be ignored. Normally a preceding push of Jenkins him self could be prevented that way.