1313
1414@click .command ()
1515@click .option (
16+ "-C" ,
17+ "--sha" ,
1618 "--commit-sha" ,
19+ "commit_sha" ,
1720 help = "Commit SHA (with 40 chars)" ,
1821 cls = CodecovOption ,
1922 fallback_field = FallbackFieldEnum .commit_sha ,
2427 help = "SHA (with 40 chars) of what should be the parent of this commit" ,
2528)
2629@click .option (
30+ "-P" ,
2731 "--pr" ,
28- help = "Pull Request id to associate commit with" ,
32+ "--pull-request-number" ,
33+ "pull_request_number" ,
34+ help = "Specify the pull request number mannually. Used to override pre-existing CI environment variables" ,
2935 cls = CodecovOption ,
3036 fallback_field = FallbackFieldEnum .pull_request_number ,
3137)
3743 fallback_field = FallbackFieldEnum .branch ,
3844)
3945@click .option (
46+ "-r" ,
4047 "--slug" ,
48+ "slug" ,
4149 cls = CodecovOption ,
4250 fallback_field = FallbackFieldEnum .slug ,
4351 help = "owner/repo slug used instead of the private repo token in Self-hosted" ,
@@ -61,7 +69,7 @@ def create_commit(
6169 ctx ,
6270 commit_sha : str ,
6371 parent_sha : typing .Optional [str ],
64- pr : typing .Optional [int ],
72+ pull_request_number : typing .Optional [int ],
6573 branch : typing .Optional [str ],
6674 slug : typing .Optional [str ],
6775 token : typing .Optional [uuid .UUID ],
@@ -73,12 +81,14 @@ def create_commit(
7381 extra_log_attributes = dict (
7482 commit_sha = commit_sha ,
7583 parent_sha = parent_sha ,
76- pr = pr ,
84+ pr = pull_request_number ,
7785 branch = branch ,
7886 slug = slug ,
7987 token = token ,
8088 service = git_service ,
8189 )
8290 ),
8391 )
84- create_commit_logic (commit_sha , parent_sha , pr , branch , slug , token , git_service )
92+ create_commit_logic (
93+ commit_sha , parent_sha , pull_request_number , branch , slug , token , git_service
94+ )
0 commit comments