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

ci: improved changelog generator #2610

Closed
wants to merge 8 commits into from
Closed

Conversation

Hazer
Copy link
Member

@Hazer Hazer commented May 30, 2024

Description

Screenshot

Issues Fixed or Closed

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Dependency update (updates to dependencies)
  • Documentation update (changes to documentation)
  • Repository update (changes to repository files, e.g. .github/...)

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated the in code docstring/documentation-blocks for new or existing methods/components

Branch Updates

LizardByte requires that branches be up-to-date before merging. This means that after any PR is merged, this branch
must be updated before it can be merged. You must also
Allow edits from maintainers.

  • I want maintainers to keep my branch updated

@Hazer Hazer marked this pull request as draft May 30, 2024 10:34
Copy link

codecov bot commented May 30, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 8.04%. Comparing base (f0a00ae) to head (cd0e49d).
Report is 163 commits behind head on master.

Additional details and impacted files
@@          Coverage Diff           @@
##           master   #2610   +/-   ##
======================================
  Coverage    8.04%   8.04%           
======================================
  Files          69      69           
  Lines       13335   13335           
  Branches     6601    6601           
======================================
  Hits         1073    1073           
+ Misses      11252   11246    -6     
- Partials     1010    1016    +6     
Flag Coverage Δ
Linux 5.31% <ø> (ø)
macOS-12 8.01% <ø> (ø)
macOS-13 ?
macOS-14 8.21% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

see 5 files with indirect coverage changes

@ReenigneArcher
Copy link
Member

Thanks for this, but we're just going to use GitHub's changelog generator for now. Let's see how that goes for a few releases before adjusting.

I've been burned by these kind of actions before... becoming unmaintained and leaving me to scramble to create my own changelog parser.

This one seems popular enough where that might be less likely to happen. I guess if this were to be implemented it would need to happen in the setup-release-action.

@Hazer
Copy link
Member Author

Hazer commented May 30, 2024

@ReenigneArcher I'm mostly testing right now, the idea is to reimplement in our own actions, but I want first to test if they actually get what I want

It's not even a real PR, I'm editing in the browser each commit

.github/workflows/CI.yml Outdated Show resolved Hide resolved
@ReenigneArcher
Copy link
Member

Understood.

For reference: this is the current process to convert a release to stable.

  1. Click edit
    image

  2. Delete the existing release body, select the previous tag (last stable should be the third in the list), and select generate release notes.
    image

  3. Optionally, manually edit the generated release notes. @cgutman previously mentioned they may want to manually edit them, in order to make the generated changes more friendly to non technical users.

  4. Uncheck "pre-release" and update
    image

That's all there is.

At that point, the changelog will updated and be saved to the changelog branch in markdown format. The action that updates that, loops over all releases in the repo to create the changelog. That file is consumed by the docs, but could be used in other places as well. If a typo or mistake was made in the release body, the release can be re-edited and the changelog will update again.

Since the only thing these changes would save is #2, I don't know if it's really worth the change. But I have no issue with the experimentation.

@ReenigneArcher
Copy link
Member

This is an example of what would be generated if we released today. I really like the "New Contributors" section as it gives credit and hopefully encourages people to keep contributing.

image
...
image

@Hazer
Copy link
Member Author

Hazer commented May 30, 2024

@ReenigneArcher the automation is not exactly the main point of my experimentation, I'd like to create changelog automation for pre-release versions, but I feel that manually like you do feels better for stable releases.

My end goal is a good categorization system, to break each kind of PR/commit into it's own category, sort and merge duplicated items (same dep updated twice), and it then fork the current changelog builder to add this layer, but first I want something close enough to avoid building from scratch, I don't want a drop-in replacement.

Sorry for choking the pipeline with this, it was the easiest way to test that it would work in our constraints, in my fork I don't have the same data to see what I want.

@ReenigneArcher
Copy link
Member

ReenigneArcher commented May 30, 2024

The simplest approach is to make 2 api calls.

1 to get the latest release, and 1 to generate the release notes (passing in the latest release as the previous_tag_name)

  1. https://docs.github.com/en/rest/releases/releases?apiVersion=2022-11-28#get-the-latest-release
  2. https://docs.github.com/en/rest/releases/releases?apiVersion=2022-11-28#generate-release-notes-content-for-a-release

This will make pre-release notes mimic stable release notes.

.github/workflows/CI.yml Outdated Show resolved Hide resolved
.github/workflows/CI.yml Outdated Show resolved Hide resolved
@Hazer
Copy link
Member Author

Hazer commented May 30, 2024

If you got here, because of my ping, sorry, I made a mistake

@Hazer
Copy link
Member Author

Hazer commented May 30, 2024

@ReenigneArcher it's quite polluted and have some issues, but it was auto generated and organized, so I can use this as a base to rewrite something like that:

  ### :boom: BREAKING CHANGES
  - due to [`4e49db9`](https://github.com/LizardByte/Sunshine/commit/4e49db9fd58013720f6d7b3574e5033ec182b6f3) - add fedora 40 and remove fedora 38 *(PR #2525 by @ReenigneArcher)*:
  
    add fedora 40 and remove fedora 38 (#2525)
  
  
  ### :sparkles: New Features
  - [`9288775`](https://github.com/LizardByte/Sunshine/commit/9288775351dc04c1b3b09d6fe432096e7571396f) - **macos/capture**: support for capture display other than main display *(PR #2449 by @TimmyOVO)*
  - [`4a91301`](https://github.com/LizardByte/Sunshine/commit/4a9130126c1fd4cba4b580b7885709cd142bf848) - **ui**: Dark Mode *(PR #2493 by @Hazer)*
  - [`287ac4c`](https://github.com/LizardByte/Sunshine/commit/287ac4c0fbb0df96cd7d83f1c16cf84070eb50d1) - **win**: new capture method, Windows.Graphics.Capture  *(PR #2580 by @tez011)*
    - :arrow_lower_right: *addresses issue #832 opened by @mxrsoon*
  
  ### :bug: Bug Fixes
  - [`9d5ee2f`](https://github.com/LizardByte/Sunshine/commit/9d5ee2f57d2c582b5b0f0c7eb67a8b86daffd9a9) - **macos/input**: incorrect mouse input for non-main display *(PR #2461 by @TimmyOVO)*
  - [`659a426`](https://github.com/LizardByte/Sunshine/commit/659a426b03aaacd14793292c9b0771311ba8c995) - **file_handler**: avoid writing extra newline character *(PR #2335 by @ReenigneArcher)*
  - [`0a595dc`](https://github.com/LizardByte/Sunshine/commit/0a595dc7d2d86092b500e7afeb619c8e0dc1bfef) - **linux**: add frame processing latency and logging improvements *(PR #2502 by @gschintgen)*
  - [`ff54ab2`](https://github.com/LizardByte/Sunshine/commit/ff54ab2852e13e25ecdeaaab8f66639b795b5c33) - **macos**: fix broken streaming on MacOS *(PR #2485 by @Hazer)*
    - :arrow_lower_right: *fixes issue #2272 opened by @VasylBaran*
    - :arrow_lower_right: *fixes issue #2347 opened by @wbrione*
  - [`2b18e4c`](https://github.com/LizardByte/Sunshine/commit/2b18e4c73dfccda7452106a6fe1d1b629c350763) - **ui**: ensure pre-releases are properly checked *(PR #2564 by @ReenigneArcher)*
  
  ### :recycle: Refactors
  - [`4b6ff37`](https://github.com/LizardByte/Sunshine/commit/4b6ff3797e405c05b49c3a4d9580fd3a06f28ff9) - **ui**: break down config.html into smaller pieces *(PR #2491 by @Hazer)*
  
  ### :wrench: Chores
  - [`26ceec5`](https://github.com/LizardByte/Sunshine/commit/26ceec5f3c97b0130b82cb28ba53c3b4dafc8419) - update global workflows *(PR #2547 by @LizardByte-bot)*
  - [`c204b2c`](https://github.com/LizardByte/Sunshine/commit/c204b2cf5d65601403e880687f3ac62f27195b10) - update global workflows *(PR #2559 by @LizardByte-bot)*
  - [`8a0762d`](https://github.com/LizardByte/Sunshine/commit/8a0762d9f16d6edda9e723fae1f05fb66a291e47) - update global workflows *(PR #2581 by @LizardByte-bot)*
  - [`f0a00ae`](https://github.com/LizardByte/Sunshine/commit/f0a00ae35683dfd5742952fb4cf99edf268b57fd) - update global workflows *(PR #2597 by @LizardByte-bot)*

@Hazer
Copy link
Member Author

Hazer commented Jun 5, 2024

Experiment done for now, I'll continue with something next month or so, writing from scratch using the findings I got here.

@Hazer Hazer closed this Jun 5, 2024
@ReenigneArcher
Copy link
Member

Thanks, I'm also planning to improve the pre-release initial change body in the next week or so.

@ReenigneArcher
Copy link
Member

Thanks, I'm also planning to improve the pre-release initial change body in the next week or so.

This is implemented now. If you'd still like to work on categories, that would be cool. We can accomplish it via labels. https://docs.github.com/en/repositories/releasing-projects-on-github/automatically-generated-release-notes

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.

2 participants