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

Implement new plugin for node-gh #8

Closed
mikelax opened this issue Mar 27, 2017 · 21 comments
Closed

Implement new plugin for node-gh #8

mikelax opened this issue Mar 27, 2017 · 21 comments

Comments

@mikelax
Copy link

mikelax commented Mar 27, 2017

As a user, I would like to use meta commands that wrap the node-gh app.

The main use case is interacting with pull requests, mainly list, merge, and rebase.

@mateodelnorte
Copy link
Owner

Love it. I can imagine typing meta gh issues list and having a well delineated list of issues for each repo in the meta repo printed out. meta gh pr would be great as well.

Interested in helping contribute? Happy to go over the simple patterns involved in making a plugin, and equally happy to split up the work.

@mikelax
Copy link
Author

mikelax commented Mar 28, 2017

yeah, that sounds good to me. Maybe we could split the work between you working on issues list and me working on gh pr.

@mateodelnorte
Copy link
Owner

mateodelnorte commented Mar 29, 2017

went ahead and created a new repo to house the plugin here and added you as a collaborate. the initial skeleton is there, just need to fill in the commands.

@mateodelnorte
Copy link
Owner

the best way to get started is to do the following:

  • meta git clone git@github.com:mateodelnorte/meta.git
  • cd ./meta
  • meta npm install
  • meta npm link --all

you can then write your command and test using ./bin/meta git gh [subcommand]. happy to make you a contributor on any project you wanna help out with.

@mikelax
Copy link
Author

mikelax commented Mar 29, 2017

thanks, I'll poke around this repo to get started and see how I make out.

@mateodelnorte
Copy link
Owner

You might have to do a npm install meta-npm once your in the meta dir, above. That will add the meta npm subcommands, since they're context enabled (meaning the commands appear when you've installed the plugins locally).

@mikelax
Copy link
Author

mikelax commented Mar 31, 2017

I am having trouble getting the meta command to work.
So far I have done the following:

git clone git@github.com:mateodelnorte/meta.git
cd meta
npm i

I am confused on what to do next. How do I get the meta command to be installed on my path?
Also, I see all the projects listed in the .looprc file, do I have to manually check those out or will one of the meta commands take care of that?

Output from npm list:

Mike@Michaels-MBP:meta (master) $ npm list --depth=0
meta@1.0.17 /Users/Mike/git/meta/meta
├── commander@2.9.0 (git://github.com/mateodelnorte/commander.js.git#fc6c36465fde78f64a55c2ead53fe049838fdfdb)
├── cross-env@3.2.4
├── debug@2.6.3
├── lodash.union@4.6.0
├── meta-exec@0.0.2
├── meta-git@0.0.16
├── meta-init@0.0.1
├── meta-npm@0.0.13
├── meta-project@0.0.1
├── meta-yarn@0.0.0
└── tabtab@2.2.2

@mateodelnorte
Copy link
Owner

So, you're developing it locally. You've got a couple options.

You can reference your modified version of the code directly, [path to meta]/bin/meta.
You can install your current version globally meta> npm i -g ..
You can npm link your local version globally meta> npm link.

You probably just want to npm link it.

@mateodelnorte
Copy link
Owner

mateodelnorte commented Mar 31, 2017

Btw, the best way to get all of meta on your system is not with git, it's with meta itself.

meta git clone git@github.com:mateodelnorte/meta.git # will clone meta and all child repos
cd ./meta 
npm i # install top level repo # will populate meta with plugin commands, like npm
meta npm install # will npm install top level and all child repos
meta npm link --all # will determine which projects use each other, then npm link them
npm link # will npm link meta globally, installing its bin files globally as well

meta git clone will get all the plugin repos as well.

@mateodelnorte
Copy link
Owner

Actually this may do it for you entirely:

meta git clone git@github.com:mateodelnorte/meta.git && cd ./meta && npm i && meta npm install && meta npm link --all && npm link

After that you should have all of meta's repos, they should all be installed and linked, and meta, itself, should be linked for global usage.

@mikelax
Copy link
Author

mikelax commented Mar 31, 2017

I get that I want to use meta to get everything initialized, but I feel like I have a chicken and egg situation.

ie. I want to run this command to bootstrap everything but I don't yet have a meta command installed

meta git clone git@github.com:mateodelnorte/meta.git && cd ./meta && npm i && meta npm install && meta npm link --all && npm link

@mateodelnorte
Copy link
Owner

mateodelnorte commented Mar 31, 2017

It's ok to do it with meta installed globally before. You'll just end up in a situation where your global meta bin will be replaced with a symlink to your local install's bin.

When you're done developing locally, you just npm i -g meta again and everything is back to normal.

May need to npm unlink in the meta dir first.

@mikelax
Copy link
Author

mikelax commented Mar 31, 2017

nice, all good! 👍
I just had to remove this one plugin from the .meta file as it appears to be a stub project with no code so the meta npm link --all failed until I removed it.

"plugins/meta-gitbook": "git@github.com:mateodelnorte/meta-gitbook.git"

@mateodelnorte
Copy link
Owner

ah! yup. sorry. didn't mean to push that one. thanks!

@mateodelnorte
Copy link
Owner

This is done over here: https://www.npmjs.com/package/meta-gh

@mateodelnorte
Copy link
Owner

Added in commit 8b34186

@oscarpeterson
Copy link

Hi, As a user trying to install meta, I'm struggeling to get the meta commands to work. I get:
"command not found: meta" - whenever I try to run something. What am I missing? :)

@mateodelnorte
Copy link
Owner

mateodelnorte commented Mar 25, 2020 via email

@oscarpeterson
Copy link

Thanks for the reply. Yes I'm able to run 'npm i -g meta' and it seems to work. But when I'm for example trying to run 'meta' or 'meta git clone...' I get : "command not found: meta"

@mateodelnorte
Copy link
Owner

mateodelnorte commented Mar 25, 2020 via email

@oscarpeterson
Copy link

Thanks! I'll look into that.

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

3 participants