MCPcopy Create free account
hub / github.com/cli/cli / ViewerLoginName

Method ViewerLoginName

pkg/cmd/project/shared/queries/queries.go:1236–1243  ·  view source on GitHub ↗

ViewerLoginName returns the login name of the viewer.

()

Source from the content-addressed store, hash-verified

1234
1235// ViewerLoginName returns the login name of the viewer.
1236func (c *Client) ViewerLoginName() (string, error) {
1237 var query viewerLogin
1238 err := c.doQueryWithProgressIndicator("Viewer", &query, map[string]interface{}{})
1239 if err != nil {
1240 return "", err
1241 }
1242 return query.Viewer.Login, nil
1243}
1244
1245// OwnerIDAndType returns the ID and OwnerType. The special login "@me" or an empty string queries the current user.
1246func (c *Client) OwnerIDAndType(login string) (string, OwnerType, error) {

Callers 1

buildURLFunction · 0.80

Calls 1

Tested by

no test coverage detected