-
Notifications
You must be signed in to change notification settings - Fork 1
Add self-signed option to allow configure with private gitlab instances #32
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
base: master
Are you sure you want to change the base?
Changes from 5 commits
b4ffada
d48649c
2b19b2a
1ac4ac3
aef29ed
e45afa6
28a1440
64da3d0
44f309e
89fdc01
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,7 +8,7 @@ const chalk = require('chalk'); | |
|
|
||
| const configure = async() => { | ||
| if(await checkConfigExists()){ | ||
| logger.log(chalk.red.bold('⚠️ Mergify is already configured. Configuring again will override the existing file.')); | ||
| logger.warn('⚠️ Mergify is already configured. Configuring again will override the existing file.'); | ||
|
||
| } | ||
|
|
||
| try { | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| const {logger} = require('../../utils/logger'); | ||
|
|
||
| const disableCertificateVerification = async() => { | ||
| logger.warn('⚠️ Disabling certificate verification. This is unsafe and should only be used as last resort.'); | ||
| process.env.NODE_TLS_REJECT_UNAUTHORIZED = "0"; | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Doesn't this need to be set every time the user calls mergify?
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. On second glance, after reviewing the command refactoring. This flag will need to available on each command.
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I do kinda agree with the comment. Thinking about #11 for example, some of the options should definitely be part of the config. I think that this first version of the implementation is probably good enough for now though. Let's see what happens |
||
| return; | ||
| }; | ||
|
|
||
| module.exports = { | ||
| disableCertificateVerification | ||
| }; | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,19 @@ | ||
| const chalk = require('chalk'); | ||
|
|
||
| var Logger = function(){}; | ||
|
||
|
|
||
| Logger.prototype.log = function(...args) { | ||
| console.log(...args); | ||
| } | ||
|
|
||
| Logger.prototype.warn = function(...args) { | ||
| console.log(chalk.yellow.bold(...args)); | ||
| } | ||
|
|
||
| Logger.prototype.err = function(...args) { | ||
| console.log(chalk.red.bold(...args)); | ||
| } | ||
|
|
||
| module.exports = { | ||
| logger: console | ||
| }; | ||
| logger: new Logger() | ||
|
||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we put whitespace around deconstruction arguments?