Skip to content

Commit 05f5a9c

Browse files
chore(release): 5.0.3 (#1676)
1 parent 28b3165 commit 05f5a9c

File tree

4 files changed

+32
-6
lines changed

4 files changed

+32
-6
lines changed

CHANGELOG.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
## v5.0.3
2+
### What's Changed
3+
* fix: update OIDC audience by @thomasrockhu-codecov in https://github.com/codecov/codecov-action/pull/1675
4+
* fix: use double-quotes for OIDC by @thomasrockhu-codecov in https://github.com/codecov/codecov-action/pull/1669
5+
* fix: prevent always setting tokenless to be true by @thomasrockhu-codecov in https://github.com/codecov/codecov-action/pull/1673
6+
* fix: update CHANGELOG and automate by @thomasrockhu-codecov in https://github.com/codecov/codecov-action/pull/1674
7+
* fix: bump to v5 and update README by @thomasrockhu-codecov in https://github.com/codecov/codecov-action/pull/1655
8+
* build(deps): bump github/codeql-action from 3.27.0 to 3.27.4 by @app/dependabot in https://github.com/codecov/codecov-action/pull/1665
9+
* fix: typo in `inputs.disable_safe_directory` by @mkroening in https://github.com/codecov/codecov-action/pull/1666
10+
11+
12+
**Full Changelog**: https://github.com/codecov/codecov-action/compare/v5.0.2..v5.0.3
13+
114
## v5.0.2
215
### What's Changed
316
* fix: override commit and pr values for PR cases by @thomasrockhu-codecov in https://github.com/codecov/codecov-action/pull/1657
@@ -935,4 +948,4 @@ for the full list.
935948
### Dependencies and Misc
936949
- #166 Bump requestretry from 4.1.1 to 4.1.2
937950
- #169 Bump typescript from 4.0.5 to 4.1.2
938-
- #178 Bump @types/jest from 26.0.15 to 26.0.19
951+
- #178 Bump @types/jest from 26.0.15 to 26.0.19

changelog.py

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@ def update_changelog():
1515
if previous == version:
1616
print(f"No changes to version {version}")
1717
return
18-
print(f"Adding logs from {previous}..{version}")
18+
print(f"Adding logs from {previous}..v{version}")
1919

2020
raw_current_branch = subprocess.run([
2121
"git",
2222
"branch",
2323
"--show-current",
2424
], capture_output=True)
25-
current_branch = raw_current_branch.stdout.decode('utf-8')
25+
current_branch = raw_current_branch.stdout.decode('utf-8').strip()
2626

2727
raw_commits = subprocess.run([
2828
"git",
@@ -31,9 +31,12 @@ def update_changelog():
3131
"--oneline",
3232
], capture_output=True)
3333
commits = [line[:7] for line in raw_commits.stdout.decode('utf-8').split('\n')]
34+
print(commits)
3435

3536
prs = set()
3637
for commit in commits:
38+
if not commit:
39+
continue
3740
commit_output = subprocess.run([
3841
'gh',
3942
'pr',
@@ -42,8 +45,16 @@ def update_changelog():
4245
'author,number,title,url',
4346
'--search',
4447
f'"{commit}"',
48+
'--state',
49+
'merged',
4550
], capture_output=True)
46-
commit_details = json.loads(commit_output.stdout.decode('utf-8'))[0]
51+
52+
commit_details = commit_output.stdout.decode('utf-8')
53+
if not commit_details or not json.loads(commit_details):
54+
continue
55+
commit_details = json.loads(commit_details)[0]
56+
57+
4758
if not commit_details['number']:
4859
continue
4960
if commit_details['number'] in prs:
@@ -52,7 +63,7 @@ def update_changelog():
5263
changelog.append(f"* {commit_details['title']} by @{commit_details['author']['login']} in {commit_details['url']}")
5364

5465
changelog.append('\n')
55-
changelog.append(f"**Full Changelog**: https://github.com/codecov/codecov-action/compare/{previous}..{version}\n")
66+
changelog.append(f"**Full Changelog**: https://github.com/codecov/codecov-action/compare/{previous}..v{version}\n")
5667

5768
with open('CHANGELOG.md', 'r') as f:
5869
for line in f:

hooks/pre-commit

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,5 @@ git diff --cached --name-only | if grep --quiet "src/version"
99
then
1010
python changelog.py
1111
fi
12+
13+
git add CHANGELOG.md

src/version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
CODECOV_ACTION_VERSION="5.0.2"
1+
CODECOV_ACTION_VERSION="5.0.3"

0 commit comments

Comments
 (0)