提交 ed763faa 编写于 作者: J Jingwen Owen Ou

Merge pull request #543 from github/auth_fix

gh: Auth fix
......@@ -164,7 +164,7 @@ Then(/^the file "([^"]*)" should have mode "([^"]*)"$/) do |file, expected_mode|
end
end
Then /^the file "([^"]*)" should contain '(.*)'$/ do |file, partial_content|
Then(/^the file "([^"]*)" should contain '(.*)'$/) do |file, partial_content|
check_file_content(file, partial_content, true)
end
......
......@@ -388,6 +388,11 @@ func (client *Client) FindOrCreateToken(user, password, twoFactorCode string) (t
c := client.newOctokitClient(basicAuth)
authsService := c.Authorizations(client.requestURL(url))
if twoFactorCode != "" {
// dummy request to trigger a 2FA SMS since a HTTP GET won't do it
authsService.Create(nil)
}
auths, result := authsService.All()
if result.HasError() {
err = &AuthError{result.Err}
......
......@@ -33,7 +33,7 @@ else
profile="default"
fi
run cucumber -p "$profile" -t ~@wip
run cucumber -p "$profile"
check_warnings
exit $STATUS
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册