4f2d554c by David LaPalomento

Reuse the merge commit for the changelog update

Modify the accept-as-is contrib.json task to add the changelog entry to a custom merge commit.
1 parent d37dc706
...@@ -336,21 +336,22 @@ ...@@ -336,21 +336,22 @@
336 [ "git branch -D {{pr.user.login}}-{{pr.head.ref}}", "Delete the local branch used for merging" ] 336 [ "git branch -D {{pr.user.login}}-{{pr.head.ref}}", "Delete the local branch used for merging" ]
337 ] 337 ]
338 }, 338 },
339 "accept-as-is": { 339 "accept-as-is": {
340 "steps": [ 340 "steps": [
341 { "prompt": "text", "id": "prNum", "desc": "What is the the pull request number?" }, 341 { "prompt": "text", "id": "prNum", "desc": "What is the the pull request number?" },
342 { "get": "{{meta.urls.repo_api}}/pulls/{{prNum}}", "desc": "Get the PR information", "id": "pr" }, 342 { "get": "{{meta.urls.repo_api}}/pulls/{{prNum}}", "desc": "Get the PR information", "id": "pr" },
343 { "get": "{{meta.urls.repo_api}}/pulls/{{prNum}}/commits", "desc": "Get the PR commits to access author info", "id": "prCommits" }, 343 { "get": "{{meta.urls.repo_api}}/pulls/{{prNum}}/commits", "desc": "Get the PR commits to access author info", "id": "prCommits" },
344 [ "git checkout -b {{pr.user.login}}-{{pr.head.ref}} {{pr.base.ref}}", "Create a new branch for merging the changes" ], 344 [ "git checkout -b {{pr.user.login}}-{{pr.head.ref}} {{pr.base.ref}}", "Create a new branch for merging the changes" ],
345 [ "git pull --rebase {{pr.head.repo.ssh_url}}", "Merge and rebase the changes"], 345 [ "git pull {{pr.head.repo.ssh_url}} {{pr.head.ref}}", "Merge in the changes"],
346 [ "grunt test", "Run tests to make sure they still pass" ], 346 [ "git rebase {{pr.base.ref}}", "Rebase against the latest changes in the base branch"],
347 [ "git checkout {{pr.base.ref}}", "Check out the base branch" ],
348 { "prompt": "confirm", "desc": "Does everything look ok?" },
347 { "prompt": "text", "id": "line", "desc": "Describe this change in one line" }, 349 { "prompt": "text", "id": "line", "desc": "Describe this change in one line" },
350 [ "git merge --no-ff {{pr.user.login}}-{{pr.head.ref}} -m {{line}}. Closes #{{prNum}}", "Merge the changes" ],
351 [ "grunt test", "Run tests to make sure they still pass" ],
348 [ "grunt chg-add:'{{line}} ([view](https\\://github.com/{{meta.org}}/{{meta.name}}/pull/{{prNum}}))'", "Add a line to the changelog" ], 352 [ "grunt chg-add:'{{line}} ([view](https\\://github.com/{{meta.org}}/{{meta.name}}/pull/{{prNum}}))'", "Add a line to the changelog" ],
349 [ "git add CHANGELOG.md", "Add the changlelog change to be committed" ], 353 [ "git add CHANGELOG.md", "Add the changlelog change to be committed" ],
350 [ "git commit -a --author='{{prCommits.[0].commit.author.name}} <{{prCommits.[0].commit.author.email}}>' -m '{{line}}. closes #{{prNum}}'", "Commit the changes" ], 354 [ "git commit --amend", "Add the changelog change to the merge commit" ],
351 { "prompt": "confirm", "desc": "Does everything look ok?" },
352 [ "git checkout {{pr.base.ref}}", "Check out the base branch" ],
353 [ "git merge --no-ff {{pr.user.login}}-{{pr.head.ref}}", "Merge the changes" ],
354 [ "git push origin {{pr.base.ref}}", "Push the changes to your remote copy of the project" ], 355 [ "git push origin {{pr.base.ref}}", "Push the changes to your remote copy of the project" ],
355 [ "git push upstream {{pr.base.ref}}", "Push the changes to the main project" ], 356 [ "git push upstream {{pr.base.ref}}", "Push the changes to the main project" ],
356 [ "git branch -D {{pr.user.login}}-{{pr.head.ref}}", "Delete the local branch used for merging" ] 357 [ "git branch -D {{pr.user.login}}-{{pr.head.ref}}", "Delete the local branch used for merging" ]
......