gr2m / octokit-plugin-create-pull-request

Octokit plugin to create a pull request with multiple file changes
MIT License
104 stars 28 forks source link

Update branch if it exists #72

Open simenandre opened 3 years ago

simenandre commented 3 years ago

Hello 👋

Thank you for this awesome library! I am building a utility to improve the developer experience for those with many repositories, much like your Octoherd. Kopier is designed with templating in mind with using Github Actions, like in Tabetalt where we distribute some standardized files.

I recently started a full refactor of Kopier, and testing out this library for the pushing of files and creating pull request. One feature that I've been asked for a lot internally is being able to update a pull request with new changes. Imagine that there's one repository where we have an open pull request, (maybe because we're not ready for the changes yet in that repo), but we've pushed yet another update to the origin repository (in Tabetalt, it's named workflows). We don't want yet another pull request for those changes.

To track this, I opened bjerkio/kopier#31. I imagine we could take parts of this library, and implement this behaviour in Kopier. Or, better yet, maybe this is something that this library should support? Or is it supported?

gr2m commented 3 years ago

I wanted to create another plugin solely for creating the commits with multiple changes, and then use it as dependency in this PR. With the multi-file-update-per-commit plugin you'd be able to do that by checking if the branch already exists. You'd install both plugins, but it would deduplicate it internally so that shouldn't be a big problem

@mheap created such a plugin but I never got around to check it out and to see if I can use it, or if I have to create a separate one: https://github.com/mheap/octokit-commit-multiple-files

would that approach work for you?

swain commented 2 years ago

+1 for this feature :)

saqimtiaz commented 2 years ago

I would find this very helpful as well.