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

Function getCurrentUsername

pkg/cmd/pr/status/http.go:189–198  ·  view source on GitHub ↗
(username string, hostname string, apiClient *api.Client)

Source from the content-addressed store, hash-verified

187}
188
189func getCurrentUsername(username string, hostname string, apiClient *api.Client) (string, error) {
190 if username == "@me" && ghauth.IsEnterprise(hostname) {
191 var err error
192 username, err = api.CurrentLoginName(apiClient, hostname)
193 if err != nil {
194 return "", err
195 }
196 }
197 return username, nil
198}
199
200func pullRequestFragment(conflictStatus bool, statusCheckRollupWithCountByState bool) (string, error) {
201 fields := []string{

Callers 2

pullRequestStatusFunction · 0.85
Test_getCurrentUsernameFunction · 0.85

Calls 1

CurrentLoginNameFunction · 0.92

Tested by 1

Test_getCurrentUsernameFunction · 0.68