@@ -19,15 +19,21 @@ def cli():
1919 "--changelog" ,
2020 default = "CHANGELOG.md" ,
2121 type = click .Path (exists = True , file_okay = True , dir_okay = False ),
22+ show_default = True ,
2223)
23- @click .option ("--tag-prefix" , default = "v" )
24- @click .option ("--repo" , default = lambda : os .environ .get ("GITHUB_REPOSITORY" , "" ))
24+ @click .option ("--tag-prefix" , default = "v" , show_default = True )
25+ @click .option ("--no-tag-prefix" , default = False , is_flag = True )
26+ @click .option ("--repo" , envvar = "GITHUB_REPOSITORY" , required = True )
2527@click .option (
2628 "--api-url" ,
27- default = lambda : os .environ .get ("GITHUB_API_URL" , "https://api.github.com" ),
29+ envvar = "GITHUB_API_URL" ,
30+ default = "https://api.github.com" ,
2831)
29- @click .option ("--token" , default = lambda : os .environ .get ("GITHUB_TOKEN" , "" ))
30- def sync (changelog , tag_prefix , repo , api_url , token ):
32+ @click .option ("--token" , envvar = "GITHUB_TOKEN" , required = True )
33+ def sync (changelog , tag_prefix , no_tag_prefix , repo , api_url , token ):
34+ if no_tag_prefix :
35+ tag_prefix = ""
36+
3137 requests_session = APISession (base_url = api_url )
3238 requests_session .headers .update (
3339 {
0 commit comments