Skip to content
This repository has been archived by the owner on Nov 4, 2022. It is now read-only.

Improve automation #357

Closed
tomzx opened this issue Feb 16, 2015 · 3 comments
Closed

Improve automation #357

tomzx opened this issue Feb 16, 2015 · 3 comments

Comments

@tomzx
Copy link
Contributor

tomzx commented Feb 16, 2015

I'd like to be able to use gh to highly automate tasks. For instance, I'd like to be able to get the list of all repositories from a user and be able to fork them to a specific organization and have them all cloned to my machine. Then, I'd run some sort of automated modification on all the code I cloned, create a new branch for each repository, push the changes back to my github repository and create a PR. Finally, I'd like to be able to delete all those repos I just synced, either using some sort of rollback feature, by using a regex or by specifying the initial repository list.

I don't know if this goal aligns with gh or not. if it does, let me know, so that I may suggest other ideas as such.

The main point of this issue though is to discuss improvement to the base of gh. That is, if I am to pipe gh repo --list, I get an unusable list of repositories (I cannot pipe this list back into gh to do something for example). I think making piping viable will greatly increase gh value.

@henvic
Copy link
Member

henvic commented Feb 16, 2015

This is the Unix philosophy: Write programs that do one thing and do it well. Write programs to work together. Write programs to handle text streams, because that is a universal interface.
Doug McIlroy, inventor of the Unix pipe.

You may have noticed we recently dropped the gh prefix. This was exactly in order to move in this direction you're talking about.

Also, we currently output warnings / errors to stdout instead of stderr, and this will be fixed pretty soon. #352

@protoEvangelion
Copy link
Member

@tomzx I know it's been a while since you brought this up but I strongly agree with the idea that this tool should be easy to use in an automation pipeline.

Were you envisioning running commands directly or requiring the gh lib in a node file and calling the apis directly?

@protoEvangelion
Copy link
Member

Closing due to inactivity.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants