Merged
Conversation
joris-burgers
approved these changes
Feb 8, 2024
Comment on lines
+83
to
+97
| it "allows a specific subproject to be deployed" $ | ||
| dummyParse "@bot merge and deploy aaa to production" `shouldBe` | ||
| Success (Approve $ MergeAndDeploy (OnlySubprojects ["aaa"]) (DeployEnvironment "production"), AnyDay) | ||
|
|
||
| it "allows many specific subprojects to be deployed" $ | ||
| dummyParse "@bot merge and deploy aaa, bbb to production" `shouldBe` | ||
| Success (Approve $ MergeAndDeploy (OnlySubprojects ["aaa", "bbb"]) (DeployEnvironment "production"), AnyDay) | ||
|
|
||
| it "fails when an unknown subproject is specified" $ | ||
| dummyParse "@bot merge and deploy ccc to production" `shouldBe` | ||
| -- I'm not super happy with this error message, it _should_ say that we expect to see | ||
| -- either 'to', or the name of a known subproject. | ||
| ParseError | ||
| "comment:1:23:\n |\n1 | @bot merge and deploy ccc to production\n\ | ||
| \ | ^^\nunexpected \"cc\"\nexpecting \"to\" or white space\n" |
There was a problem hiding this comment.
Can you add a test for @bot merge and deploy aaa without the environment, to see what it does.
Author
There was a problem hiding this comment.
Two tests added:
- That we can use subprojects with an implicit environment (
@bot merge and deploy aaa) - That we can do the above with a merge window (
@bot merge and deploy aaa on friday)
|
Taking over the deployment from @alex-mckenna |
|
Pull request approved for merge by @Riscky, rebasing now. |
Approved-by: Riscky Auto-deploy: false
|
Rebased as ae9446b, waiting for CI … |
|
CI job 🟡 started. |
8184fa6 to
ae9446b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds the ability to specify specific subprojects to deploy. This makes it possible to write things like
merge and deploy foo
merge and deploy foo, bar
merge and deploy foo, bar to environment
merge and deploy foo, bar on friday
Merge commits will include an additional line Deploy-Subprojects: with a value of either all, or a comma-separated list of the subprojects to deploy.
CC: @Riscky, the PR for this has changed to this new one