-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Stop running hooks on pr merge #6963
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
Stop running hooks on pr merge #6963
Conversation
Codecov Report
@@ Coverage Diff @@
## master #6963 +/- ##
==========================================
- Coverage 41.47% 41.43% -0.05%
==========================================
Files 441 441
Lines 59666 59667 +1
==========================================
- Hits 24748 24723 -25
- Misses 31696 31726 +30
+ Partials 3222 3218 -4
Continue to review full report at Codecov.
|
Hmm... the new unit test failure is very interesting. It doesn't appear to have anything to do with my changes. |
In particular the failure is at:
Has there been a change of the docker environment? |
models/pull.go
Outdated
@@ -556,6 +556,8 @@ func (pr *PullRequest) Merge(doer *User, baseGitRepo *git.Repository, mergeStyle | |||
} | |||
|
|||
env := PushingEnvironment(doer, pr.BaseRepo) | |||
// FIXME: #6946 requires protected branches to be ignored | |||
env = env[:len(env)-1] |
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 will assume that env is the last one. It's danger. I would like to traverse all the envs and remove the extract one.
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.
It's not a longstanding fix it's just meant to last until I get #6961 fixed.
OK I've just removed the SSH_ORIGINAL_COMMAND from the pushing environment as I suspect that it's not working correctly in any case. |
But |
Yeah, any comprehensive fix will need that - could add it now if preferred. |
* Stop running hooks on pr merge * Remove SSH_ORIGINAL_COMMAND from the pushing environment
Alternative fix for #6946
This just removes the final SSH_ORIGINAL_COMMAND preventing the hooks from being run whilst I figure out how to fix the issues in #6961