prow/github/client.go
func (c *Client) getUserData() error {
	c.log("User")
	var u User
	_, err := c.request(&request{
		method:    http.MethodGet,
		path:      "/user",
		exitCodes: []int{200},
	}, &u)
	if err != nil {
		return err
	}
	c.botName = u.Login
	// email needs to be publicly accessible via the profile
	// of the current account. Read below for more info
	// https://developer.github.com/v3/users/#get-a-single-user
	c.email = u.Email
	return nil
}
func (c *Client) getUserData() error {
	c.log("User")
	var u User
	_, err := c.request(&request{
		method:    http.MethodGet,
		path:      "/user",
		exitCodes: []int{200},
	}, &u)
	if err != nil {
		return err
	}
	c.botName = u.Login
	// email needs to be publicly accessible via the profile
	// of the current account. Read below for more info
	// https://developer.github.com/v3/users/#get-a-single-user
	c.email = u.Email
	return nil
}
func ( c * Client ) getUserData ( ) error { c . log ( " " ) var u User _ , err := c . request ( & request { method : http . MethodGet , path : " " , exitCodes : [ ] int { 200 } , } , & u ) if err != nil { return err } c . botName = u . Login // email needs to be publicly accessible via the profile // of the current account. Read below for more info // https://developer.github.com/v3/users/#get-a-single-user c . email = u . Email return nil }
// Not thread-safe - callers need to hold c.mut.
Not thread - safe - callers need to hold c . mut .