File tree 2 files changed +7
-2
lines changed
2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change 246
246
JIRA_USER_NAME = os .environ .get ("JIRA_USER_NAME" , None )
247
247
JIRA_API_TOKEN = os .environ .get ("JIRA_API_TOKEN" , None )
248
248
JIRA_URL = os .environ .get ("JIRA_URL" , None )
249
+
250
+ MERGE_CONFLICT_RESOLUTION_STRATEGY = os .environ .get ("MERGE_CONFLICT_RESOLUTION_STRATEGY" , "merge" )
Original file line number Diff line number Diff line change 5
5
from github .PullRequest import PullRequest
6
6
from loguru import logger
7
7
8
- from sweepai .config .server import PROGRESS_BASE_URL
8
+ from sweepai .config .server import MERGE_CONFLICT_RESOLUTION_STRATEGY , PROGRESS_BASE_URL
9
9
from sweepai .core import entities
10
10
from sweepai .core .entities import FileChangeRequest
11
11
from sweepai .core .sweep_bot import SweepBot
@@ -186,7 +186,10 @@ def edit_comment(body):
186
186
git_repo .config_writer ().set_value (
187
187
"user" ,
"email" ,
"[email protected] "
188
188
).release ()
189
- git_repo .git .merge ("origin/" + pr .base .ref )
189
+ if MERGE_CONFLICT_RESOLUTION_STRATEGY == "rebase" :
190
+ git_repo .git .rebase ("origin/" + pr .base .ref )
191
+ else :
192
+ git_repo .git .merge ("origin/" + pr .base .ref )
190
193
except GitCommandError :
191
194
# Assume there are merge conflicts
192
195
pass
You can’t perform that action at this time.
0 commit comments