Comments (3)
Oh, I see. Marge is actually trying to merge onto your 3.10
branch. It is when cleaning up that we try to remove the source branch from the local repo and for that we need to first checkout something else and for that we assume a branched called master
to exist.
from marge-bot.
I don't think we are hard-coding master
anywhere. You indicate the target branch on GitLab when you create the merge-request (which by default will be master
). Will that work for you?
from marge-bot.
Yes, there are two places where master
is hardcoded:
.git.py
def remove_branch(self, branch):
assert branch != 'master'
self.git('checkout', 'master', '--')
self.git('branch', '-D', branch)
job.py
if source_branch != 'master':
repo.remove_branch(source_branch)
else:
assert source_repo_url is not None
How to reproduce
Create MR in GitLab. Target branch is not master
, e.g. 3.10
.
Then assign MR to Marge Bot.
Expected result
Marge Bot merges source branch into target branch 3.10
.
Current result
Exception occured:
2018-03-02 18:17:25,096 INFO Running git clone --origin=origin git@gitlab/MessagesTransceiver.git 'C:\Users\ADMINI~1\AppData\Local\Temp\tmp81lxjhwu\tmp59d9phm1'
2018-03-02 18:18:31,330 INFO Running git -C 'C:\Users\ADMINI~1\AppData\Local\Temp\tmp81lxjhwu\tmp59d9phm1' config user.email [email protected]
2018-03-02 18:18:31,957 INFO Running git -C 'C:\Users\ADMINI~1\AppData\Local\Temp\tmp81lxjhwu\tmp59d9phm1' config user.name 'Marge Bot'
2018-03-02 18:18:31,981 INFO Processing !8 - 'Remove using namespace'
2018-03-02 18:18:32,188 INFO Running git -C 'C:\Users\ADMINI~1\AppData\Local\Temp\tmp81lxjhwu\tmp59d9phm1' fetch --prune origin
2018-03-02 18:18:35,721 INFO Running git -C 'C:\Users\ADMINI~1\AppData\Local\Temp\tmp81lxjhwu\tmp59d9phm1' checkout -B refactor/removeUsingNamespace origin/refactor/removeUsingNamespace --
2018-03-02 18:18:35,892 INFO Running git -C 'C:\Users\ADMINI~1\AppData\Local\Temp\tmp81lxjhwu\tmp59d9phm1' rebase origin/3.10
2018-03-02 18:18:43,460 INFO Running git -C 'C:\Users\ADMINI~1\AppData\Local\Temp\tmp81lxjhwu\tmp59d9phm1' rev-parse HEAD
2018-03-02 18:18:43,568 INFO Running git -C 'C:\Users\ADMINI~1\AppData\Local\Temp\tmp81lxjhwu\tmp59d9phm1' checkout refactor/removeUsingNamespace --
2018-03-02 18:18:43,596 INFO Running git -C 'C:\Users\ADMINI~1\AppData\Local\Temp\tmp81lxjhwu\tmp59d9phm1' diff-index --quiet HEAD
2018-03-02 18:18:43,628 INFO Running git -C 'C:\Users\ADMINI~1\AppData\Local\Temp\tmp81lxjhwu\tmp59d9phm1' ls-files --others
2018-03-02 18:18:43,740 INFO Running git -C 'C:\Users\ADMINI~1\AppData\Local\Temp\tmp81lxjhwu\tmp59d9phm1' push --force origin refactor/removeUsingNamespace
2018-03-02 18:18:45,010 INFO Running git -C 'C:\Users\ADMINI~1\AppData\Local\Temp\tmp81lxjhwu\tmp59d9phm1' rev-parse origin/3.10
2018-03-02 18:18:45,032 INFO Running git -C 'C:\Users\ADMINI~1\AppData\Local\Temp\tmp81lxjhwu\tmp59d9phm1' checkout master --
2018-03-02 18:18:45,071 WARNING git returned 128
2018-03-02 18:18:45,071 WARNING stdout: b''
2018-03-02 18:18:45,071 WARNING stderr: b'fatal: invalid reference: master\n'
2018-03-02 18:18:45,071 ERROR Unexpected Git error
Traceback (most recent call last):
File "C:\marge-bot\marge\git.py", line 163, in git
return _run(*command, env=env, check=True, timeout=timeout_seconds)
File "C:\marge-bot\marge\git.py", line 189, in _run
retcode, process.args, output=stdout, stderr=stderr,
subprocess.CalledProcessError: Command '('git', '-C', 'C:\\Users\\ADMINI~1\\AppData\\Local\\Temp
from marge-bot.
Related Issues (20)
- Kubernetes set-up without impersonate doesn't work HOT 1
- Feature request: Make it possible to use marge-bot with Encourage/Require squash commits when merging HOT 1
- feature request: allow disabling merges for certain repos
- Marge-bot logs "Someone skipped the queue! Will have to try again..." even though she merged an MR
- Guarantee final pipeline when assigned to marge-bot
- Bot cannot receive pipeline status with no-ff-merge HOT 10
- feature request: rebase without pushing
- Feature request: let marge bot leave a comment when she notices that an MR was assigned to her
- SSO User Support
- Bug: `--guarantee-final-pipeline` does not work with Gitlab CI
- "Branch cannot be merged" still happening HOT 1
- Source branches are not deleted when using batch mode HOT 4
- LetsEncrypt cert from the included CA Bundle is expired
- Marge Bot is logging PAT while fetching the repository
- Document group access tokens HOT 2
- Marge uses SSH even if I configure it to use HTTPS
- Marge ignores /etc/hosts
- Hard-to-interpret messages when discussions are unresolved
- Feature Request: Configure who to assign if merge doesn't work HOT 1
- Marge-bot container keeps restarting
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from marge-bot.