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 Github Enterprise #106

Merged
merged 1 commit into from
Oct 11, 2012
Merged

support Github Enterprise #106

merged 1 commit into from
Oct 11, 2012

Conversation

superbrothers
Copy link
Contributor

I want to use gist-vim on Github Enterprise.

let g:github_api_url = 'http://your-github-enterprise-domain/api/v3'

let g:github_api_url = 'http://your-github-enterprise-domain/api/v3'
@mattn
Copy link
Owner

mattn commented Oct 11, 2012

Great! I'll check into it. (But I don't have ghe, hehe)

@okuryu
Copy link

okuryu commented Oct 11, 2012

LGTM.

@mattn
Copy link
Owner

mattn commented Oct 11, 2012

@okuryu Thank you!

mattn added a commit that referenced this pull request Oct 11, 2012
@mattn mattn merged commit f94abc6 into mattn:master Oct 11, 2012
@gkatsev
Copy link

gkatsev commented Jan 21, 2013

Seems like with this option, you can only use either Github Enterprise or public github at a time, possibly requiring a restart of vim in between. Would be awesome to be able to use both at the same time.

@okuryu
Copy link

okuryu commented Jan 21, 2013

@gkatsev I have no need at present. I think that might be useful for improvement, because there are a lot of things that if you are using GitHub Enterprise is dealing with limited information-house, and there are concerns that lead to information disclosure.

@gkatsev
Copy link

gkatsev commented Jan 22, 2013

Yeah, just felt that at this time it would be better to comment on this thread rather than open a new issue. I might work on it since I am definitely using both enterprise and public github at the same time.

@mattn
Copy link
Owner

mattn commented Jan 22, 2013

How about this?

let g:gist_get_github_api_url_from_git_config = 1

This mean, If you set 1 to above, gist.vim get API endpoint from git config each times.

@gkatsev
Copy link

gkatsev commented Jan 22, 2013

So, it'll check the current git config of the pwd that vim is currently in? And then it will default to the github-api-url if it can't find anything?
I was thinking maybe having :Gist use public github only and a :GistE which uses github enterprise. Though, maybe this isn't the best choice.

@mattn
Copy link
Owner

mattn commented Jan 22, 2013

So, it'll check the current git config of the pwd that vim is currently in?

Yes, only if the flags = 1.

And then it will default to the github-api-url if it can't find anything?

Yes.

I was thinking maybe having :Gist use public github only and a :GistE which uses github enterprise. Though, maybe this isn't the best choice.

Do you hope that it should be separated functional?

@gkatsev
Copy link

gkatsev commented Jan 23, 2013

Having one command is fine. But I think having the ability to specify the api end-point directly on a case-by-case basis would be useful.

@longlostnick
Copy link

That would be cool. Maybe make let g:github_api_url = 'http://your-github-enterprise-domain/api/v3' a .gist-vim setting instead... and allow creating a .gist-vim per directory or something (similar to .gitconfig). Then when vim is loaded you could have gist-vim search up the tree until it find it's first .gist-vim config file, or default to the global one.

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

Successfully merging this pull request may close these issues.

5 participants