MCPcopy Index your code
hub / github.com/cli/cli / ViewerLoginName

Method ViewerLoginName

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

ViewerLoginName returns the login name of the viewer.

()

Source from the content-addressed store, hash-verified

1187
1188// ViewerLoginName returns the login name of the viewer.
1189func (c *Client) ViewerLoginName() (string, error) {
1190 var query viewerLogin
1191 err := c.doQueryWithProgressIndicator("Viewer", &query, map[string]interface{}{})
1192 if err != nil {
1193 return "", err
1194 }
1195 return query.Viewer.Login, nil
1196}
1197
1198// OwnerIDAndType returns the ID and OwnerType. The special login "@me" or an empty string queries the current user.
1199func (c *Client) OwnerIDAndType(login string) (string, OwnerType, error) {

Callers 1

buildURLFunction · 0.80

Calls 1

Tested by

no test coverage detected