Skip to content

Commit

Permalink
chore(release): 5.0.3 (#1676)
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasrockhu-codecov authored Nov 19, 2024
1 parent 28b3165 commit 05f5a9c
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 6 deletions.
15 changes: 14 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
## v5.0.3
### What's Changed
* fix: update OIDC audience by @thomasrockhu-codecov in https://github.com/codecov/codecov-action/pull/1675
* fix: use double-quotes for OIDC by @thomasrockhu-codecov in https://github.com/codecov/codecov-action/pull/1669
* fix: prevent always setting tokenless to be true by @thomasrockhu-codecov in https://github.com/codecov/codecov-action/pull/1673
* fix: update CHANGELOG and automate by @thomasrockhu-codecov in https://github.com/codecov/codecov-action/pull/1674
* fix: bump to v5 and update README by @thomasrockhu-codecov in https://github.com/codecov/codecov-action/pull/1655
* 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
* fix: typo in `inputs.disable_safe_directory` by @mkroening in https://github.com/codecov/codecov-action/pull/1666


**Full Changelog**: https://github.com/codecov/codecov-action/compare/v5.0.2..v5.0.3

## v5.0.2
### What's Changed
* fix: override commit and pr values for PR cases by @thomasrockhu-codecov in https://github.com/codecov/codecov-action/pull/1657
Expand Down Expand Up @@ -935,4 +948,4 @@ for the full list.
### Dependencies and Misc
- #166 Bump requestretry from 4.1.1 to 4.1.2
- #169 Bump typescript from 4.0.5 to 4.1.2
- #178 Bump @types/jest from 26.0.15 to 26.0.19
- #178 Bump @types/jest from 26.0.15 to 26.0.19
19 changes: 15 additions & 4 deletions changelog.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ def update_changelog():
if previous == version:
print(f"No changes to version {version}")
return
print(f"Adding logs from {previous}..{version}")
print(f"Adding logs from {previous}..v{version}")

raw_current_branch = subprocess.run([
"git",
"branch",
"--show-current",
], capture_output=True)
current_branch = raw_current_branch.stdout.decode('utf-8')
current_branch = raw_current_branch.stdout.decode('utf-8').strip()

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

prs = set()
for commit in commits:
if not commit:
continue
commit_output = subprocess.run([
'gh',
'pr',
Expand All @@ -42,8 +45,16 @@ def update_changelog():
'author,number,title,url',
'--search',
f'"{commit}"',
'--state',
'merged',
], capture_output=True)
commit_details = json.loads(commit_output.stdout.decode('utf-8'))[0]

commit_details = commit_output.stdout.decode('utf-8')
if not commit_details or not json.loads(commit_details):
continue
commit_details = json.loads(commit_details)[0]


if not commit_details['number']:
continue
if commit_details['number'] in prs:
Expand All @@ -52,7 +63,7 @@ def update_changelog():
changelog.append(f"* {commit_details['title']} by @{commit_details['author']['login']} in {commit_details['url']}")

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

with open('CHANGELOG.md', 'r') as f:
for line in f:
Expand Down
2 changes: 2 additions & 0 deletions hooks/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,5 @@ git diff --cached --name-only | if grep --quiet "src/version"
then
python changelog.py
fi

git add CHANGELOG.md
2 changes: 1 addition & 1 deletion src/version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
CODECOV_ACTION_VERSION="5.0.2"
CODECOV_ACTION_VERSION="5.0.3"

0 comments on commit 05f5a9c

Please sign in to comment.