Skip to content

refactor: changelog ci scripts - #47

Merged
yCodeTech merged 7 commits into
masterfrom
refactor/update-changelog-ci-script
Aug 20, 2026
Merged

refactor: changelog ci scripts#47
yCodeTech merged 7 commits into
masterfrom
refactor/update-changelog-ci-script

Conversation

@yCodeTech

@yCodeTech yCodeTech commented Aug 17, 2026

Copy link
Copy Markdown
Owner

This PR refactors various things in the changelog CI scripts: updates docblocks, changes various functions to async, adds new params derived from the workflow itself, and reorders the functions for readability.

Styling enhancements:

  • Updated docblocks.
  • Re-ordered functions to be in a logical and readable order (order of usage from top-bottom).
  • Added prettier and prettier-plugin-multiline-arrays dependencies, and added new option to the prettier config file to allow the vscode prettier extension to force wrapping of arrays onto multiple lines, for readability. This prevents prettier from defaulting to formatting all array elements on to 1 long single line.

Function improvements:

  • Changed formatPRDescription and buildEntry functions to be async, and their function calls now await them.
  • Added new params (context and github) to updateChangelog, buildEntry, and formatPRDescription functions, so we can access the context of the workflow, and use the GitHub API via Octokit. The params are passed from the function call in the "Update Changelog" CI step.
  • Split the return statement in the buildEntry function into multiple variables for ease and readability.

- Added `context` and `github` params to:
    - The main `updateChangelog` function passing them from it's call in the CI step.
     - `buildEntry` function
    - `formatPRDescription` function.
    - The corresponding docblocks.

- Refactored `buildEntry` function so the return statement isn't one long string. Split multiple sections into variables for ease.

- Changed `formatPRDescription` and `buildEntry` functions to be `async`, and their function calls now `await` them.
- Remove the `-` in the params description because it's rendered as a bullet point in vscode intellisense.
- Updated the return type of `findOrCreateUnreleased` function.
…ulti-lines.

- Added the `prettier-plugin-multiline-arrays` dev dependency to force prettier to wrap arrays onto muliple lines.

- Added the prettier dev dependency because the prettier vscode extension only supports prettier plugins when installed locally in a project.

- Specified the prettier plugin and it's `multilineArraysWrapThreshold` option in the prettierrc.json file to enable the usage of the plugin.
@yCodeTech yCodeTech added the enhancement New feature or quality of life enhancement label Aug 19, 2026
@yCodeTech
yCodeTech merged commit c1eae0a into master Aug 20, 2026
1 check passed
@yCodeTech
yCodeTech deleted the refactor/update-changelog-ci-script branch August 20, 2026 17:49
github-actions Bot added a commit that referenced this pull request Aug 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or quality of life enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant