Make github credentials compulsory to avoid bad deployments #284
Conversation
if cred.ClientID == "" || cred.ClientSecret == "" { | ||
log.Fatal("secret.json needs to define ClientID and ClientSecret") | ||
} | ||
return fmt.Sprintf("client_id=%s&client_secret=%s", cred.ClientID, cred.ClientSecret) |
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.
Do the values need to be escaped via url.QueryEscape
, or are they guaranteed to never use any symbols that might need escaping?
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.
it should not make a difference if the value is escaped or not
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.
You should probably use url.Values
and then its Encode
method to create this string.
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.
Done
I think this PR should remove the |
PTAL |
LGTM. |
@@ -33,7 +33,7 @@ func init() { | |||
} | |||
|
|||
var ( | |||
contactEmail = "golang-dev@googlegroups.com" | |||
contactEmail = "unknown@example.com" |
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.
why this change?
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.
changed by mistake - removed now
Make github credentials compulsory to avoid bad deployments
Last time I deployed I forgot to set the github credentials causing random failures (403).
I don't want this happening again.