We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0503430 commit 593cbd0Copy full SHA for 593cbd0
coverage_comment/settings.py
@@ -125,14 +125,14 @@ def clean_github_output(cls, value: str) -> pathlib.Path:
125
@property
126
def GITHUB_PR_NUMBER(self) -> int | None:
127
# "refs/pull/2/merge"
128
- if "pull" in self.GITHUB_REF:
+ if self.GITHUB_REF.startswith("refs/pull"):
129
return int(self.GITHUB_REF.split("/")[2])
130
return None
131
132
133
def GITHUB_BRANCH_NAME(self) -> str | None:
134
# "refs/heads/my_branch_name"
135
- if "heads" in self.GITHUB_REF:
+ if self.GITHUB_REF.startswith("refs/heads"):
136
return self.GITHUB_REF.split("/", 2)[2]
137
138
0 commit comments