support Gitlab self hosted instance (#89)#95
support Gitlab self hosted instance (#89)#95kentcdodds merged 3 commits intoall-contributors:masterfrom
Conversation
Codecov Report
@@ Coverage Diff @@
## master #95 +/- ##
==========================================
+ Coverage 57.83% 58.18% +0.34%
==========================================
Files 19 19
Lines 434 440 +6
Branches 73 77 +4
==========================================
+ Hits 251 256 +5
- Misses 152 153 +1
Partials 31 31
Continue to review full report at Codecov.
|
kentcdodds
left a comment
There was a problem hiding this comment.
Changes all look good (looks like it's been a while since prettier was run on these files, sorry about that). Please just rename private_token to privateToken.
Something to consider... Is there a security concern by including a private token committed in this file in the repository? I'm kinda thinking that we shouldn't allow that and instead should read an environment variable or something....
README.md
Outdated
| --> `all-contributors-cli`. Mandatory. | ||
| * `repoType`: Type of repository. Must be either `github` or `gitlab`. Default: `github`. | ||
| * `repoHost`: Points to the repository hostname. Change it if you use a self hosted repository. Default: `https://github.com` if `repoType` is `github`, and `https://gitlab.com` if `repoType` is `gitlab`. | ||
| * `private_token`: The personal access token to to authenticate with the GitLab API. Offer it if you use a self hosted repository. Default: `''`. |
There was a problem hiding this comment.
Could this follow the existing camel casing convention? It should be privateToken.
|
Yes, an environment variable is better considered to the security problem. I'll change it later |
|
@kentcdodds @xuchaoying I am going to be opening a PR to make this repo work with Github Enterprise. The private token code is needed! I will reference this PR in mine. |
|
really looking forward to getting this merged in... |
|
Sorry, there are a bunch of merge conflicts here that need to be resolved :-/ |
|
sorry for the belated commit. :( Private token needs to be set as an environment variable now. @kentcdodds |
README.md
Outdated
| # set private token on linux | ||
| export PRIVATE_TOKEN=your_privete_token | ||
| # set private token on windows | ||
| set PRIVATE_TOKEN=your_privete_token |
chinesedfan
left a comment
There was a problem hiding this comment.
@xuchaoying Just share some comments for you. (I am not a real maintainer) :)
| }, | ||
| "devDependencies": { | ||
| "kcd-scripts": "^0.29.0", | ||
| "kcd-scripts": "^0.30.0", |
README.md
Outdated
| * tutorial: [✅](# "Tutorials") | ||
| * video: [📹](# "Videos") | ||
|
|
||
| Please note that if you are using a self-hosted gitlab instance, before add |
| "files": ["dist"], | ||
| "files": [ | ||
| "dist" | ||
| ], |
There was a problem hiding this comment.
I don't know whether maintainers care these format changes or not. But without them, it is easy to review and track history logs.
There was a problem hiding this comment.
I believe these changes are generated by prettier automatically on commit (?), and prettier hadn't been run in awhile. So, these whitespace changes are probably the correct format.
There was a problem hiding this comment.
@chris-dura yes, maybe it's prettier. I didn't change the format at all.
What: allow user to input private_token to authenticate with the GitLab API
Why: self hosted Gitlab instance not working due to the api failing #89
How: basically add a question to ask for user private toekn, and append the private token as another param to the gitlab apis.
Checklist: