gitbutler icon indicating copy to clipboard operation
gitbutler copied to clipboard

'Create pull request' should use PR template from Github if present

Open Hainesy opened this issue 1 year ago • 1 comments

When creating a pull request, GitButler doesn't use the Github PR template.

Hainesy avatar Mar 25 '24 10:03 Hainesy

Background information on PR templates is available at: https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/creating-a-pull-request-template-for-your-repository - Unfortunately, there is no screenshot of the user-experience.

What I would expect from gitbutler that it offers "Create PR using a description". On click, there is a popup asking for the description. That is pre-filled with the template. The user can then change it. Either click on button "Create" or the button "Cancel" (to cancel it). -- If possible, the current contents of the text field should be kept if the user comes back to that dialog (for the same virutal branch) at a later point in time after Canceling.

koppor avatar Aug 04 '24 09:08 koppor

Hey folks, I've put up a PR adding this feature.

I'm merging it now, so it'll be available tomorrow in the nightly builds at the latest.

We'd be happy about any feedback!

ndom91 avatar Aug 26 '24 15:08 ndom91

Does not work in 0.12.21

Path .github/PULL_REQUEST_TEMPLATE.md not recognized.

Repository: https://github.com/adr/e-adr

koppor avatar Aug 29 '24 07:08 koppor

@koppor did you receive any particular error messages? I've been using this with our repository here the last few days and ours is at .github/PULL_REQUEST_TEMPLATE.md as well

ndom91 avatar Aug 29 '24 08:08 ndom91

EDIT: If you encounter this problem, check that you don't get any OAuth problems where GitButler has permission from your user but not your organization.

~I also have this problem. I started using it a week ago, so I don't know if it never worked in my case or it stopped working in a previous version.~

CleanShot 2024-09-10 at 11 27 55 CleanShot 2024-09-10 at 11 27 37 CleanShot 2024-09-10 at 11 26 42 CleanShot 2024-09-10 at 11 27 19

lucastraba avatar Sep 10 '24 09:09 lucastraba

Hmm interesting. I've been using it successfully for the last few nightlies in our repository, but there's clearly something still wrong.

I'm actually getting ready to ship a refactor of this feature to offer a dropdown of available pr templates, instead of asking for a path in a text input, here.

I'll post back here once it's available to get your feedback 🙏

ndom91 avatar Sep 10 '24 09:09 ndom91

@ndom91 Sorry, sorry, sorry, this was 100% my fault. My Org wasn't giving the full OAuth permissions, so GitButler was not able to get it. I granted the permissions and now it works.

Sorry for the confusion!

lucastraba avatar Sep 10 '24 09:09 lucastraba