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

Support create-pr option #4042

Open
FezVrasta opened this issue Mar 11, 2021 · 6 comments
Open

Support create-pr option #4042

FezVrasta opened this issue Mar 11, 2021 · 6 comments
Labels
cli Related to CLI tool

Comments

@FezVrasta
Copy link
Contributor

Do you want to request a feature or report a bug?
Feature

What is the current behavior?
Right now, to send a PR with new types, I need to manually create a PR, which involves forking the repository, create a branch, make the changes, commit, push, and send the PR.

If the current behavior is a bug, please provide the steps to reproduce.

Following an approach similar to patch-package --create-issue flag, we could have a create--pr flag that will automatically create a PR with the type definitions that the user created or modified locally.

What is the expected behavior?

$ flow-typed create-pr <package>@<version>
Please insert a valid GitHub access token with repo:write permissions:
*************
A new Pull Request with your contribution has been created and it's available at https://github.com/flow-typed/flow-typed/pulls/xxxx

If this is a feature request, what is motivation or use case for changing the behavior?
The current approach can limit the amount of contributions to this project.

Local Environment Information
If this issue is specific to the CLI, provide the results of running npx envinfo from the command line in a GitHub gist.

@FezVrasta FezVrasta changed the title Support --create-pr flag Support create-pr option Mar 11, 2021
@pascalduez
Copy link
Member

Hi @FezVrasta,

could be nice.
How would that work with tests files? 😅

@pascalduez pascalduez added the cli Related to CLI tool label Mar 11, 2021
@FezVrasta
Copy link
Contributor Author

One can add them to the same local directory and the script would match them (prepend test_ to the file name)?

@Brianzchen
Copy link
Member

Didn't know these things existed, is there any project that does something similar to this?

Updating existing defs is simple, but creating a new one need some finesse to make all the types with the correct naming scheme. Even if we don't do what you're suggesting, some cli command that automates initial file creation would be great.

@AndrewSouthpaw
Copy link
Contributor

Yeah never heard of patch-package and it'd be cool to see something like that in the CLI.

@Brianzchen
Copy link
Member

@FezVrasta Wondering do you have ideas of any additional features you'd like here or is the ./create-def.sh enough which has been good enough for my usage.

@FezVrasta
Copy link
Contributor Author

@Brianzchen I didn't have time to test it yet, I'm sorry.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli Related to CLI tool
Projects
None yet
Development

No branches or pull requests

4 participants