gto icon indicating copy to clipboard operation
gto copied to clipboard

`assign` should fail when `--stage` is not provided

Open aguschin opened this issue 3 years ago • 2 comments

If you don't provide --stage arg, this should fail but produce the incorrect tag:

$ gto assign bugfixed --auto-push
Created git tag '[email protected]' that registers version
Running `git push origin [email protected]`
Successfully pushed git tag [email protected] to the remote.
Created git tag 'bugfixed#None#1' that assigns stage to version 'v0.0.1'
Running `git push origin bugfixed#None#1`
Successfully pushed git tag bugfixed#None#1 to the remote.
❌ Cannot parse tag name 'bugfixed#None#1'

aguschin avatar Oct 10 '22 05:10 aguschin

Hey @aguschin i would like to work on this pls assign it to me

rexdivakar avatar Oct 11 '22 04:10 rexdivakar

Sure! Please ping me in case you need any details :) In the nutshell, it should be something like this:

$ gto assign bugfixed --auto-push
❌ `stage` must be provided
>>> gto.api.assign(..., stage=None)
WrongArgs: `stage` can't be None

We can just raise WrongArgs("stage can't be None"), and running the CLI command would issue the same message. It is fine, I assume.

aguschin avatar Oct 11 '22 05:10 aguschin