Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve release workflow #2438

Open
wants to merge 10 commits into
base: release/current
Choose a base branch
from

Conversation

Dimfacion
Copy link
Member

Creation of a new release workflow with each repo being owner of their release process

Copy link

codecov bot commented Feb 11, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 39.07%. Comparing base (558ff6c) to head (6efff2f).
Report is 4 commits behind head on release/current.

Additional details and impacted files
@@                  Coverage Diff                  @@
##             release/current    #2438      +/-   ##
=====================================================
+ Coverage              38.27%   39.07%   +0.79%     
- Complexity              1809     1877      +68     
=====================================================
  Files                    598      600       +2     
  Lines                  18410    18812     +402     
  Branches                1232     1275      +43     
=====================================================
+ Hits                    7047     7351     +304     
- Misses                 10978    11065      +87     
- Partials                 385      396      +11     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@RomuDeuxfois
Copy link
Member

There are some files unrelated to the release changes.

@Dimfacion Dimfacion force-pushed the improvement/new-release-workflow branch from d286a2c to 2dccf4f Compare February 12, 2025 08:57
@Dimfacion
Copy link
Member Author

@RomuDeuxfois My bad, forgot to do a fetch before creating the branch. It's better now :)

Copy link
Contributor

@antoinemzs antoinemzs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks ok as it is, a few suggestions to reduce the amount of repetition in strings and dicts that are similar

# Modify the release note
logging.info("[platform] Getting the current release note")
release = requests.get(
"https://api.github.com/repos/OpenBAS-Platform/openbas/releases/latest",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Most URLs in the script would benefit from being built from a set of constants in this script.
A better but more involved chage would be to pass variables from the build environment (e.g. ${{ github.server_url }}/${{ github.repository }}/) but that's perhaps overkill for this first version.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Totally valid criticism but this code come from splitting the existing python script into several smaller scripts and we intend to move away from them soon so while it would make sense, I feel we should direct our energy toward removing these scripts rather than make them better. wdyt ?

Comment on lines +190 to +197
headers={
"Accept": "application/vnd.github+json",
"Authorization": "Bearer " + github_token,
"X-GitHub-Api-Version": "2022-11-28",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Headers are always the same: constant ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as #2438 (comment)

@Dimfacion Dimfacion force-pushed the improvement/new-release-workflow branch from adae8cc to 6efff2f Compare February 17, 2025 08:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants