diff --git a/.gitignore b/.gitignore index 43f1f59..dfbf6ad 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,6 @@ release/ # microplane init creates files in the mp/ dir # let's ignore this so we don't accidentally commit debug runs to the mp repo mp/ + +# text editor files +./vscode diff --git a/.vscode/launch.json b/.vscode/launch.json deleted file mode 100644 index dbdc0aa..0000000 --- a/.vscode/launch.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - // Use IntelliSense to learn about possible attributes. - // Hover to view descriptions of existing attributes. - // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 - "version": "0.2.0", - "configurations": [ - { - "name": "Launch", - "type": "go", - "request": "launch", - "mode": "debug", - "program": "${workspaceRoot}", - "buildFlags": "-ldflags=-X=main.version=0.0.28", - "env": { - "GITHUB_API_TOKEN":"x" - }, - "cwd": "x", - "args": [ - "sync" - ], - "port": 8080, - "host": "127.0.0.1" - } - ] -} \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 68b0db0..91a1027 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # changelog +2021-05-14 - v0.0.30 + +- Fixes - `mp sync` bug in Gitlab, due to ID vs IID + 2021-05-14 - v0.0.29 - Adds - Command `mp sync` to sync local status with remote status [#81](https://github.com/Clever/microplane/pull/81) diff --git a/VERSION b/VERSION index 369bd4c..f092e2b 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.0.29 +0.0.30 diff --git a/integration_test.sh b/integration_test.sh index 4a5a291..e14be9c 100755 --- a/integration_test.sh +++ b/integration_test.sh @@ -52,17 +52,29 @@ echo "$owner/2" >> $tmpfile ./bin/mp init --provider $provider -f $tmpfile rm $tmpfile +echo "" echo "[Clone]" ./bin/mp clone ts=`date +"%T"` +./bin/mp status +./bin/mp sync +echo "" echo "[Plan]" ./bin/mp plan -b plan -m "plan" -- sh -c "echo $ts >> README.md" +./bin/mp status +./bin/mp sync + +echo "" echo "[Push]" ./bin/mp push --throttle 2s -a nathanleiby +./bin/mp status +./bin/mp sync + +echo "" echo "[Merge]" cmd='./bin/mp merge --throttle 2s --ignore-build-status --ignore-review-approval' duration=10 @@ -71,3 +83,6 @@ until $cmd; do sleep $duration done +echo "" +./bin/mp status +./bin/mp sync diff --git a/push/pushGitlab.go b/push/pushGitlab.go index b915538..a16bf08 100644 --- a/push/pushGitlab.go +++ b/push/pushGitlab.go @@ -79,7 +79,7 @@ func GitlabPush(ctx context.Context, input Input, repoLimiter *time.Ticker, push return Output{ Success: true, CommitSHA: pr.SHA, - PullRequestNumber: pr.ID, + PullRequestNumber: pr.IID, PullRequestURL: pr.WebURL, PullRequestCombinedStatus: pipelineStatus, PullRequestAssignee: input.PRAssignee,