chrome-github-jira icon indicating copy to clipboard operation
chrome-github-jira copied to clipboard

Prevent PR template insertion when the textarea is already populated

Open blakegearin opened this issue 1 year ago • 1 comments

Steps to Reproduce

  1. Go to a "Open a pull request" page
  2. The extension will fill in the PR template
  3. Type some information to prepare the PR for review
  4. Reload the page
  5. The information will show in the textarea for a brief moment
  6. The extension will fill in the PR template, erasing previous work & effort 🙁

blakegearin avatar Jul 12 '23 19:07 blakegearin

oof, that sounds nasty! Good suggestion. Will see if I have time to implement this, probably shouldn't be too hard!

RobQuistNL avatar Jul 13 '23 11:07 RobQuistNL

Fixed in v1.3.0

RobQuistNL avatar Aug 23 '24 08:08 RobQuistNL

@RobQuistNL @blakegearin, this was the exact feature that has been working for me for the last 2 years. Now, the template doesn't even show up while creating a new PR :(

Is there any workaround?

rishabh-sagar-20 avatar Aug 30 '24 07:08 rishabh-sagar-20

hmm, can you make me some reproduction steps @rishabh-sagar-20 ?

RobQuistNL avatar Sep 08 '24 20:09 RobQuistNL

@RobQuistNL, when creating a new PR, GitHub automatically fills in the Title and Description fields using one of the initial commits from the branch. However, since we are now checking for empty values before applying the default template, this causes an issue because GitHub has already populated these fields. I recommend adding an option to control this behavior, which would help resolve the problem.

rishabh-sagar-20 avatar Sep 09 '24 06:09 rishabh-sagar-20

@rishabh-sagar-20 Ctrl + A to select all of the description, then delete and refresh.

blakegearin avatar Sep 10 '24 01:09 blakegearin

You mean there's a "PR Template" in the .github folder in the repo and thats not being overwritten by this extension?

In my opinion thats by design - I don't want to overwrite any repo specific PR templates.

Or are you talking about something else? If its the first case, maybe we can add a button to "force" the Github-Jira PR template.

RobQuistNL avatar Sep 10 '24 10:09 RobQuistNL

You mean there's a "PR Template" in the .github folder in the repo and thats not being overwritten by this extension?

In my opinion thats by design - I don't want to overwrite any repo specific PR templates.

Or are you talking about something else? If its the first case, maybe we can add a button to "force" the Github-Jira PR template.

@RobQuistNL, It's not a repository-specific template; GitHub fills it in during the initial page load. The "force" button should work.

rishabh-sagar-20 avatar Sep 10 '24 10:09 rishabh-sagar-20

@rishabh-sagar-20 Ctrl + A to select all of the description, then delete and refresh.

@blakegearin, it was not working in my case somehow. I will give it a try again.

rishabh-sagar-20 avatar Sep 10 '24 10:09 rishabh-sagar-20

Is this repository you talk about public, so I can check it out? Because if what you're saying is happening it means it shouldn't work at all for any PR. :thinking:

RobQuistNL avatar Sep 10 '24 14:09 RobQuistNL