-
Notifications
You must be signed in to change notification settings - Fork 86
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
processing the DELETE BRANCH message from GH after the GH Branch is deleted #245
base: master
Are you sure you want to change the base?
Conversation
fix the line to long errors caught by the travis-ci.org unit testing
Codecov Report
@@ Coverage Diff @@
## master #245 +/- ##
============================================
- Coverage 56.24% 55.77% -0.47%
+ Complexity 639 635 -4
============================================
Files 117 117
Lines 3060 3071 +11
Branches 253 255 +2
============================================
- Hits 1721 1713 -8
- Misses 1244 1263 +19
Partials 95 95
Continue to review full report at Codecov.
|
@@ -1,15 +0,0 @@ | |||
<?xml version="1.0" encoding="UTF-8"?> |
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.
please restore idea settings
github-pullrequest-plugin/pom.xml
Outdated
@@ -10,7 +10,7 @@ | |||
|
|||
<!-- historical name --> | |||
<artifactId>github-pullrequest</artifactId> | |||
<version>0.1.0-SNAPSHOT</version> | |||
<version>0.1.2-SNAPSHOT</version> |
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.
please remove version change
@@ -82,6 +82,12 @@ public String getUrlName() { | |||
} | |||
|
|||
|
|||
public synchronized void removeBranch(String branchName) { | |||
if (nonNull(branches)) { |
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.
you can just getBranches().remove(branchName)
and i guess @Nonnull String branchName
argument
Found related issue https://issues.jenkins-ci.org/browse/JENKINS-40606 |
i changed locally... |
#248 |
ahhh I don't know how this got removed ... did my idea nuke it and then i committed ? I apologize.
typo on Nonnull
Im stuck I don't understand the build failure ... [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.3:compile (default-compile) on project github-pullrequest: Compilation failure but when I look at the code I don't see how it's undefined ... :( Line 236 is within a method that clearly identifies the variable "branch" on the method signature :
|
oops ... i synce with the fork ... and now I see it ... |
master has bit refactored code, it should help to handle delete case. Master contains skeleton of multibranch implementation. Unfortuantely multibranch (scm-api & branch-api) can't support delete events, has conflict on FS when branch name matches to pr-xxx name. New multibranch API is broken by design.... |
Arriving late to the party... This plugin works well when branches are created (I'm using cron polling not webhook), but not detecting deleted branches is a hindrance for my use case, automated creation and destruction of staging server instances. For this reason, I need to manually stop and remove containers. As soon as you have a preliminary fix let me know to give it a try. |
ok so the idea here is ... I'm in Github and I press "Delete Branch" and the message makes it to Jenkins BUT because the Github branch is already gone nothing interesting happens (rightly so the branch is gone ... it was just deleted) ---> BUT !!!! there's nothing saying I can't invoke a pipeline on a DIFFERENT BRANCH that contains clean up code.
Where I'm going with all this is I have a branch (call it INFRASTRUCTURE_CLEANUP) and that branch NEVER goes away (well it better not) as it contains pipeline code to cleanup infrastructure. When I delete ANY OTHER BRANCH of the same project I want my INFRASTRUCTURE_CLEANUP branch called.
As a side note ... I'm on the fence about "synchronizing" the doRun(String branch) method (cause synchronizing an entire method IS BAD !). Anyways I put a big comment in front of the method ... and I apologize if my coding is less than par. Trust me I'm trying my best so guidance is appreciated !
This change is