-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support multiple projects per change #572
Conversation
648c72e
to
d0b3eb5
Compare
d0b3eb5
to
2574553
Compare
So far I managed to update the Scenario:
Expected behavior: the change should remain unreleased on the second project Actual behavior: the change is dropped from unreleased as soon as it is released by the first project |
04f96e5
to
70587a5
Compare
70587a5
to
c6ffa4e
Compare
@miniscruff, I fixed the side effect on the batch command with the following behavior: when running the batch command for a project, the project entry will be removed from unreleased files. If the unreleased entry contains only one project, the unreleased file will be removed (because the change will be released for all the projects on it). Because of this, I had to increase the complexity lint rule from 16 to 17, is that ok? |
647dead
to
d91956d
Compare
Oh, yea I wouldn't change the change struct, I would create a separate file for each project. That should have the least issues with batching. |
I prefer the implemented way for some reasons:
If you still prefer producing a change for each project, let me know, and then I can update the pull request. |
While I do agree with you, by keeping one file to one change per project it allows us to keep the only two operations as read the whole file and deleting it, no edits. Yes, it is maybe a little weird creating multiple files, but by keeping each project separate we can release them using PRs that for sure won't conflict. If we had to edit a file that would create an issue that changie aims to solve via files. The internal yaml files, although can be changed, they should sort of be treated as hidden system files, so whether or not we create many or one file shouldn't be an issue. |
Yep, I agree with the importance of having changes as atomic as possible. Conceptually, the For me, it's not clear how the It seems to me that the unreleased file should have only one project, but I would keep a project list on the |
To implement this, we should move the Do you see another way around this? |
46fbf5e
to
2e0cc61
Compare
2e0cc61
to
64fc448
Compare
I just managed a way to move the prompt to another structure that accepts multiple projects, so far called PS.: some tests are still broken, I'll be able to fix them on Monday. |
@@ -1,6 +1,7 @@ | |||
package cmd |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code in this PR doesn't seem wrong, I will have to try it out myself to be sure. But it is quite a bit of changes and I just want to give it a try myself before merging. I will try and get to it this weekend, I may create my own PR or edit this one, not sure yet.
One thing is your change from change to prompt.go is a fairly large change and I want to make sure I fully understand it. Thanks for the work though this is a big help for sure.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, besides being a big change, I don't think that the "prompt change" is the correct abstraction, btw it's hard to find the proper naming for the layer between the new
command and the atomic change itself.
Personally I would try to avoid moving all of it to the cmd
package.
Definitely, feel free to update this PR or open a new one, I'm still here if any help is needed!
Thank you!!
@miniscruff any news on this? |
Sorry I am away on a trip this week, still on my list of todos. |
Ok, going to tackle this today, finally able to get time to figure this out. |
Closes #571
Check the following
Additional context
Converting the
project
flag fromStringVarP
toStringSliceVarP
on thenew
cmd kept the backward compatibility