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

(Closed - made a PR from main) bug: dynamically parse the latest/actual release version when building docs #311

Closed
wants to merge 8 commits into from

Conversation

bobleesj
Copy link
Contributor

@bobleesj bobleesj commented Jan 1, 2025

Problem

I was wondering why the online doc never displayed the latest release notes (i.g. 3.5.0) when we push 3.5.0 tag, even though CHANGELOG.rst contains 3.5.0 information in main.

It turns outs, when we checkout the repository to build the doc, we checked out the commit of the tag, not the main repository which contains the modified CHANGELOG.rst. The reason we checked out the tag is that it always displayed the correct version number. However, the main branch contains an additional commit that modifies CHANGLEOG.rst by the CI. This is what we (I) failed to recognize for a while.

Proposed solution

Hence, we need to build docs by checking out the main branch as shown in this PR (https://github.com/Billingegroup/release-scripts/pull/120/files#r1900318116). However, it doesn't have the tag information that can be automatically detected by our git-versioning dependency. How do we still get the right tag version? We can dynamically parse the latest release from GitHub's release via requests - hence the changes in this code.

Result:

Shown below, I have tested this implementation using my dummy org/repo that does full release of 0.5.14, using a single run of git tag and push:

Screenshot 2024-12-31 at 11 34 09 PM Screenshot 2024-12-31 at 11 34 15 PM

Copy link

codecov bot commented Jan 1, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (5359054) to head (da401ee).

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #311   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            9         9           
  Lines          516       516           
=========================================
  Hits           516       516           

@bobleesj
Copy link
Contributor Author

bobleesj commented Jan 1, 2025

@sbillinge ready for review

@bobleesj bobleesj changed the title bug: dynamically parse the latest/actual release version when building docs (Closed - made a PR from main) bug: dynamically parse the latest/actual release version when building docs Jan 1, 2025
@bobleesj
Copy link
Contributor Author

bobleesj commented Jan 1, 2025

closing - made a rookie mistake - created a PR from bobleesj:main. I created another PR here: #312 with identical comments/code changes.

@bobleesj bobleesj closed this Jan 1, 2025
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.

1 participant