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

feat: add the ability to create a PR with the incoming changelog #110

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Barbapapazes
Copy link
Member

@Barbapapazes Barbapapazes commented May 8, 2023

Hello,

This PR follows nuxt/nuxt#20675.

It's a first draft because I'm not sure on how we must handle the PR. In fact, have we to reuse code from the release, create a new condition or a new command?

Also, we need to:

  • Add the base branch into the config file (or maybe there is already a base branch and I don't see it)
  • Add a way for the user to provide a template for the changelog header
  • Add a way to customize the branch name
  • Add a way to change the user that create the commit (name and email)

Support for workspace will coming after #18 is finished.

@Barbapapazes Barbapapazes changed the title feat: add the ability to create a PR with the changelog feat: add the ability to create a PR with the incoming changelog May 8, 2023
@pi0
Copy link
Member

pi0 commented May 8, 2023

I think for first step, we can introduce a updateGithubIssue utility, it can search for github issues and update first with v{x.y.z} title or create a new one. Dealing with branches for PR can be next step :)

// Push the branch to the origin
await execa("git", ["push", "-u", "origin", "v" + config.newVersion], { cwd });
}
// Maybe we can create a new command to do this? (we don't want to create a release an a pull request at the same time but I don't know if this must be managed from the config or from the CLI)
Copy link
Member

Choose a reason for hiding this comment

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

Yes, we can support changelogen github pull-request|issue (inside commands/github.ts)

@Barbapapazes
Copy link
Member Author

Barbapapazes commented May 9, 2023

I think for first step, we can introduce a updateGithubIssue utility, it can search for github issues and update first with v{x.y.z} title or create a new one. Dealing with branches for PR can be next step :)

Ok, if I understand well, you can to have a command to add changelog to an issue and another one to add changelog to a PR which also update package version?

@Barbapapazes Barbapapazes requested a review from pi0 May 9, 2023 12:46
@Barbapapazes
Copy link
Member Author

@pi0 can you tell me if direction is correct before I continue to create code?

Still wip but I want to be sure that I'm not doing something wrong!

@Barbapapazes
Copy link
Member Author

Hello @danielroe, could you please review this PR when you have a bit of time? Thanks a lot!

Copy link
Member

@danielroe danielroe left a comment

Choose a reason for hiding this comment

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

Hey @Barbapapazes - so sorry for the very long delay on this one! I'm sorry.

If you're happy to take a bit more on this to rebase/merge it with current changelogen, I'll review. Let me know any particular areas that you think need attention. 🙏

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.

None yet

3 participants