Compare commits

...
3 Commits
Author SHA1 Message Date
Hadi c460e5c24f API Url to HTML Url
Signed-off-by: Hadi <[email protected]>
2025-09-22 18:59:04 +02:00
Hadi e572d1326a early return if user not found
Signed-off-by: Hadi <[email protected]>
2025-09-17 21:39:32 +02:00
Hadi 0017d649d3 return nil instead of error
Signed-off-by: Hadi <[email protected]>
2025-09-17 21:31:02 +02:00
4 changed files with 6 additions and 3 deletions
+1 -1
View File
@@ -82,7 +82,7 @@ func DeepScan(s github_recon_settings.Settings) (response DeepScanResult) {
} }
repositories = append(repositories, Repositorie{ repositories = append(repositories, Repositorie{
Repository: repo.GetCloneURL(), Repository: repo.GetHTMLURL(),
Owner: repo.GetOwner().GetLogin(), Owner: repo.GetOwner().GetLogin(),
Name: repo.GetName(), Name: repo.GetName(),
Size: repo.GetSize(), Size: repo.GetSize(),
+3
View File
@@ -39,6 +39,9 @@ func Username(settings github_recon_settings.Settings) (result UsernameResult, e
if err != nil { if err != nil {
return return
} }
if result.User == (UserResult{}) {
return
}
utils.PrintAvatar(settings, result.User.AvatarURL) utils.PrintAvatar(settings, result.User.AvatarURL)
utils.PrintStruct(settings, result.User, 0) utils.PrintStruct(settings, result.User, 0)
+1 -1
View File
@@ -23,7 +23,7 @@ func Orgs(s github_recon_settings.Settings) (response OrgsResult) {
for _, org := range orgs { for _, org := range orgs {
o := OrgResult{ o := OrgResult{
Name: org.GetLogin(), Name: org.GetLogin(),
URL: org.GetURL(), URL: org.GetHTMLURL(),
Description: org.GetDescription(), Description: org.GetDescription(),
} }
response = append(response, o) response = append(response, o)
+1 -1
View File
@@ -34,7 +34,7 @@ type UserResult struct {
func User(s github_recon_settings.Settings) (response UserResult, err error) { func User(s github_recon_settings.Settings) (response UserResult, err error) {
user, resp, err := s.Client.Users.Get(s.Ctx, s.Target) user, resp, err := s.Client.Users.Get(s.Ctx, s.Target)
if resp.StatusCode == 404 { if resp.StatusCode == 404 {
return UserResult{}, fmt.Errorf("user not found with username: %s", s.Target) return UserResult{}, nil
} }
if err != nil { if err != nil {
return UserResult{}, fmt.Errorf("failed to fetch user's information") return UserResult{}, fmt.Errorf("failed to fetch user's information")