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

Forcing preferred changelog format #173

Merged
merged 3 commits into from
Dec 20, 2024
Merged

Forcing preferred changelog format #173

merged 3 commits into from
Dec 20, 2024

Conversation

a8trejo
Copy link

@a8trejo a8trejo commented Dec 18, 2024

Description

Forcing preferred changelog format

  • When a normal PR with a changeset file is merged changeset-release.yml will run and create a Changeset version bump PR, only the job changeset-pr-version-bump runs
  • This triggers changeset-release.yml again but now only changeset-pr-approve-merge runs but doesn't run the last Auto approve PR step, it however updates the CHANGELOG.md file with our preferred format and pushes to the Changeset version bump, and then labels it changelog-ready
  • The labeling action triggers changeset-release.yml again and runs only the Auto approve PR step
  • Upon manual review and merging of the changeset PR, marketplace-publish.yml is triggered

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Running the python script locally and printing the formatted changes on the CHANGELOG.md file

Checklist:

  • My code follows the patterns 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 made corresponding changes to the documentation

Additional context

Related Issues

Reviewers


Important

Automates changelog formatting and approval process using a Python script and GitHub Actions workflow.

  • Script Changes:
    • overwrite_changeset_changelog.py now reformats existing changelog content if no new content is provided.
    • Removes first two lines of changeset format and ensures version numbers are bracketed.
  • Workflow Changes:
    • changeset-release.yml automates changelog formatting and labeling.
    • Adds steps to get current and previous versions, update changelog, commit changes, and push updates.
    • Adds 'changelog-ready' label after formatting, enabling auto-approval and merge.
  • Changelog Config:
    • Removes getReleaseSummary function from changelog-config.js.

This description was created by Ellipsis for bbf7ba7. It will automatically update as commits are pushed.

Copy link

changeset-bot bot commented Dec 18, 2024

⚠️ No Changeset found

Latest commit: bbf7ba7

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@a8trejo a8trejo requested a review from joemanley201 December 18, 2024 23:19
@@ -1,3 +1,5 @@
// Doesn't fully work but '.github/scripts/overwrite_changeset_changelog.py' forces the changelog to be formatted in GHA

Choose a reason for hiding this comment

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

Should we just remove it if it doesn't work?

Copy link
Author

Choose a reason for hiding this comment

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

it half works, so it's already giving me an easier format to overwrite than the standard changeset format from roo-node-types

Choose a reason for hiding this comment

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

Can we remove the getReleaseSummary function then? That doesn't work right?

Copy link
Author

Choose a reason for hiding this comment

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

removed 👍

Copy link

@joemanley201 joemanley201 left a comment

Choose a reason for hiding this comment

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

Also starting to wonder if this is worth the complexity. What is our current workflow now? Do we manually edit the file?

@a8trejo
Copy link
Author

a8trejo commented Dec 20, 2024

Also starting to wonder if this is worth the complexity. What is our current workflow now? Do we manually edit the file?

I think it is, we'll need less manual edits if we just click merge

@a8trejo
Copy link
Author

a8trejo commented Dec 20, 2024

Also starting to wonder if this is worth the complexity. What is our current workflow now? Do we manually edit the file?

I think it is, we'll need less manual edits if we just click merge

also, is ready to merge and wasn't that complex

@a8trejo
Copy link
Author

a8trejo commented Dec 20, 2024

Also starting to wonder if this is worth the complexity. What is our current workflow now? Do we manually edit the file?

I think it is, we'll need less manual edits if we just click merge

also, is ready to merge and wasn't that complex

the current workfow is manually running git pull & checkout into the changeset branch, updating the CHANGELOG file with the proper format, running git add, git commit, git push, and then clicking merge,

I think is worth it to reduce all of that to just clicking merge

Copy link

@joemanley201 joemanley201 left a comment

Choose a reason for hiding this comment

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

Left 1 comment about removing the things that are not working in .changeset/changelog-config.js - mainly to make it super obvious about what is working and what is not working.

Looks good otherwise 🙌

@mrubens
Copy link
Collaborator

mrubens commented Dec 20, 2024

Also starting to wonder if this is worth the complexity. What is our current workflow now? Do we manually edit the file?

I think it is, we'll need less manual edits if we just click merge

also, is ready to merge and wasn't that complex

the current workfow is manually running git pull & checkout into the changeset branch, updating the CHANGELOG file with the proper format, running git add, git commit, git push, and then clicking merge,

I think is worth it to reduce all of that to just clicking merge

For what it's worth I just do an edit to add a new commit to the changeset PR using the github website editing tool, but it's annoying to do that and then wait for CI to run again before merging.

@a8trejo a8trejo merged commit 6ad6949 into main Dec 20, 2024
4 checks passed
@a8trejo a8trejo deleted the chores/changelog-format branch December 20, 2024 18:33
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.

3 participants