Skip to content

have a built-in option to create/check existing github issue #294

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

Closed
capaj opened this issue Feb 26, 2021 · 5 comments
Closed

have a built-in option to create/check existing github issue #294

capaj opened this issue Feb 26, 2021 · 5 comments

Comments

@capaj
Copy link

capaj commented Feb 26, 2021

As a package author I would love to see when people feel the need to use this tool on my packages.
Ideally just a simple github API call that would create a github issue when a new patch is created.

The link to an issue could be reported in the output, so it would print out

patch-package 6.2.2
• Creating temporary folder
• Installing @lingui/[email protected] with npm
• Diffing your files with clean files
✔ Created file patches/@lingui+cli+3.6.0.patch
✔ Created a new GH issue for this patch: https://github.com/lingui/js-lingui/issues/1234

When run again with the same patch it would output

patch-package 6.2.2
• Creating temporary folder
• Installing @lingui/[email protected] with npm
• Diffing your files with clean files
✔ Created file patches/@lingui+cli+3.6.0.patch
✔ GH issue for this patch already exists at: https://github.com/lingui/js-lingui/issues/1234

Obviously you could skip this with a flag like --noGithubReport or something like this.
Would this be an acceptable functionality @ds300 ?

@capaj capaj changed the title would be awesome to have a built-in option to create a github issue have a built-in option to create/check existing github issue Feb 26, 2021
@ds300
Copy link
Owner

ds300 commented Feb 28, 2021

I really like the idea of giving extra feedback to package authors.

Automatically creating issues could potentially be quite spammy tho 🤔. Also it would rely on the user having GitHub creds in their env.

How about an opt-in thing like

patch-package 6.2.2
• Creating temporary folder
• Installing @lingui/[email protected] with npm
• Diffing your files with clean files
✔ Created file patches/@lingui+cli+3.6.0.patch

💡 @lingui/cli is on GitHub! To draft an issue based on your patch, run:
   
    npx patch-package @lingui/cli --create-issue

And running that command would open a browser tab with the issue body pre-filled? Then we could let the users worry about auth, and it would be less likely to result in spam.

@capaj
Copy link
Author

capaj commented Feb 28, 2021

Better than nothing. Only problem is most people will never use the flag. It will still be worth to add this as it could persuade people to create GH issues even for things they might be too lazy to report.
I'll try to prototype the flag if I get some time in March.

@ds300
Copy link
Owner

ds300 commented Feb 28, 2021

I really appreciate your offer to prototype this 🙌 Your idea made me too excited to wait though 😅 and I pushed up a PR here #295 — let me know if there's anything you think could be improved! Thanks again for the suggestion.

@capaj
Copy link
Author

capaj commented Feb 28, 2021

No probs, thanks for the speedy implementation. It looks good. I will give this a whirl the next time I am using patch-package for sure!

@ds300
Copy link
Owner

ds300 commented Mar 1, 2021

This was released in 6.4.0 🎉

@ds300 ds300 closed this as completed Mar 1, 2021
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

No branches or pull requests

2 participants