You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by kl...@apache.org on 2024/05/29 06:42:23 UTC
(incubator-devlake) branch kw-github-userorgs-may-report-404 created (now ec44d6a22)
This is an automated email from the ASF dual-hosted git repository.
klesh pushed a change to branch kw-github-userorgs-may-report-404
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git
at ec44d6a22 fix: github users org api may report 404
This branch includes the following new commits:
new ec44d6a22 fix: github users org api may report 404
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
(incubator-devlake) 01/01: fix: github users org api may report 404
Posted by kl...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
klesh pushed a commit to branch kw-github-userorgs-may-report-404
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git
commit ec44d6a22f28bd1631885546612c39024c4d628c
Author: Klesh Wong <zh...@merico.dev>
AuthorDate: Wed May 29 14:42:04 2024 +0800
fix: github users org api may report 404
---
backend/plugins/github/tasks/account_org_collector.go | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/backend/plugins/github/tasks/account_org_collector.go b/backend/plugins/github/tasks/account_org_collector.go
index 5f9cf5a29..9127b60d7 100644
--- a/backend/plugins/github/tasks/account_org_collector.go
+++ b/backend/plugins/github/tasks/account_org_collector.go
@@ -98,6 +98,12 @@ func CollectAccountOrg(taskCtx plugin.SubTaskContext) errors.Error {
res.Body.Close()
return []json.RawMessage{body}, nil
},
+ AfterResponse: func(res *http.Response) errors.Error {
+ if res.StatusCode == http.StatusNotFound {
+ return api.ErrIgnoreAndContinue
+ }
+ return nil
+ },
})
if err != nil {