Skip to content

Commit

Permalink
fixed bug where createPR option was ignored in AbstractRepairStep (#785)
Browse files Browse the repository at this point in the history
Fix #767
  • Loading branch information
btellstrom authored and bloriot97 committed Nov 6, 2018
1 parent 65fb9ae commit c68eaaf
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 14 deletions.
Expand Up @@ -101,18 +101,17 @@ protected void recordPatches(List<RepairPatch> patchList) {
} catch (IOException e) {
this.addStepError("Error while serializing patches", e);
}

if (serializedPatches != null) {
try {
this.createPullRequest(serializedPatches, MAX_PATCH_PER_TOOL);
} catch (IOException|GitAPIException|URISyntaxException e) {
this.addStepError("Error while creating the PR", e);
if (this.getConfig().isCreatePR()) {
if (serializedPatches != null) {
try {
this.createPullRequest(serializedPatches, MAX_PATCH_PER_TOOL);
} catch (IOException | GitAPIException | URISyntaxException e) {
this.addStepError("Error while creating the PR", e);
}
} else {
this.addStepError("No file has been serialized, so no PR will be created");
}
} else {
this.addStepError("No file has been serialized, so no PR will be created");
}


this.notify(patchList);
}
}
Expand Down
6 changes: 2 additions & 4 deletions repairnator/scripts/repair_buggy_build.sh
Expand Up @@ -68,10 +68,8 @@ DOCKER_ARGS="$DOCKER_ARGS `ca \"--env SMTP_PASSWORD\" $SMTP_PASSWORD`"
DOCKER_ARGS="$DOCKER_ARGS `ca \"--env NOTIFY_TO\" $NOTIFY_TO`"
DOCKER_ARGS="$DOCKER_ARGS `ca \"--env MONGODB_HOST\" $MONGODB_HOST`"
DOCKER_ARGS="$DOCKER_ARGS `ca \"--env MONGODB_NAME\" $MONGODB_NAME`"

if [ "$SMTP_TLS" -eq 1 ]; then
DOCKER_ARGS="$DOCKER_ARGS `ca \"--env SMTP_TLS\" $SMTP_TLS`"
fi
DOCKER_ARGS="$DOCKER_ARGS `ca \"--env CREATE_PR\" $CREATE_PR`"
DOCKER_ARGS="$DOCKER_ARGS `ca \"--env SMTP_TLS\" $SMTP_TLS`"

DOCKER_COMMAND="docker run -d $DOCKER_ARGS -v $LOG_DIR:/var/log $DOCKER_TAG"
echo "Launch docker container with the following command: $DOCKER_COMMAND"
Expand Down

0 comments on commit c68eaaf

Please sign in to comment.