This is an automated email from the ASF dual-hosted git repository.

klesh pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git


The following commit(s) were added to refs/heads/main by this push:
     new c1aaa8b65 fix(github): Exclude Draft Releases in the ReleaseExtractor 
(#8214)
c1aaa8b65 is described below

commit c1aaa8b655622221e186c3a286424f09e928bd2a
Author: J0shSkqlq <[email protected]>
AuthorDate: Wed Nov 27 07:46:52 2024 +0100

    fix(github): Exclude Draft Releases in the ReleaseExtractor (#8214)
    
    Draft releases lead to a bug described in GH Issue #8148
---
 backend/plugins/github_graphql/tasks/release_extractor.go | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/backend/plugins/github_graphql/tasks/release_extractor.go 
b/backend/plugins/github_graphql/tasks/release_extractor.go
index 4b819fc23..0d1010b7c 100644
--- a/backend/plugins/github_graphql/tasks/release_extractor.go
+++ b/backend/plugins/github_graphql/tasks/release_extractor.go
@@ -55,7 +55,9 @@ func ExtractReleases(taskCtx plugin.SubTaskContext) 
errors.Error {
                        if err != nil {
                                return nil, err
                        }
-
+                       if release.IsDraft {
+                               return nil, nil
+                       }
                        var results []interface{}
                        githubRelease, err := convertGitHubRelease(release, 
data.Options.ConnectionId, data.Options.GithubId)
                        if err != nil {

Reply via email to