• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

mvisonneau / gitlab-ci-pipelines-exporter / 24448833884

15 Apr 2026 09:57AM UTC coverage: 61.836% (+0.09%) from 61.751%
24448833884

Pull #1081

github

strowi
Revert "chore: trim pre-release goreleaser to amd64-only and normalize quotes"

This reverts commit 84606c80b.
Pull Request #1081: Fix/merge request pipelines

2 of 12 new or added lines in 2 files covered. (16.67%)

4 existing lines in 3 files now uncovered.

3618 of 5851 relevant lines covered (61.84%)

3.91 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

38.18
/pkg/controller/projects.go
1
package controller
2

3
import (
4
        "context"
5

6
        log "github.com/sirupsen/logrus"
7

8
        "github.com/mvisonneau/gitlab-ci-pipelines-exporter/pkg/config"
9
        "github.com/mvisonneau/gitlab-ci-pipelines-exporter/pkg/schemas"
10
)
11

12
// PullProject ..
13
func (c *Controller) PullProject(ctx context.Context, name string, pull config.ProjectPull) error {
×
14
        gp, err := c.Gitlab.GetProject(ctx, name)
×
15
        if err != nil {
×
16
                return err
×
17
        }
×
18

19
        p := schemas.NewProject(gp.PathWithNamespace)
×
20
        p.Pull = pull
×
21

×
22
        projectExists, err := c.Store.ProjectExists(ctx, p.Key())
×
23
        if err != nil {
×
24
                return err
×
25
        }
×
26

NEW
27
        if err := c.Store.SetProject(ctx, p); err != nil {
×
NEW
28
                log.WithContext(ctx).
×
NEW
29
                        WithError(err).
×
NEW
30
                        Error()
×
NEW
31
        }
×
32

33
        if !projectExists {
×
34
                log.WithFields(log.Fields{
×
35
                        "project-name": p.Name,
×
36
                }).Info("discovered new project")
×
37

×
38
                c.ScheduleTask(ctx, schemas.TaskTypePullRefsFromProject, string(p.Key()), p)
×
39
                c.ScheduleTask(ctx, schemas.TaskTypePullEnvironmentsFromProject, string(p.Key()), p)
×
UNCOV
40
        }
×
41

42
        return nil
×
43
}
44

45
// PullProjectsFromWildcard ..
46
func (c *Controller) PullProjectsFromWildcard(ctx context.Context, w config.Wildcard) error {
1✔
47
        foundProjects, err := c.Gitlab.ListProjects(ctx, w)
1✔
48
        if err != nil {
1✔
49
                return err
×
50
        }
×
51

52
        for _, p := range foundProjects {
2✔
53
                projectExists, err := c.Store.ProjectExists(ctx, p.Key())
1✔
54
                if err != nil {
1✔
55
                        return err
×
56
                }
×
57

58
                if err := c.Store.SetProject(ctx, p); err != nil {
1✔
NEW
59
                        log.WithContext(ctx).
×
NEW
60
                                WithError(err).
×
NEW
61
                                Error()
×
NEW
62
                }
×
63

64
                if !projectExists {
2✔
65
                        log.WithFields(log.Fields{
1✔
66
                                "wildcard-search":                  w.Search,
1✔
67
                                "wildcard-owner-kind":              w.Owner.Kind,
1✔
68
                                "wildcard-owner-name":              w.Owner.Name,
1✔
69
                                "wildcard-owner-include-subgroups": w.Owner.IncludeSubgroups,
1✔
70
                                "wildcard-archived":                w.Archived,
1✔
71
                                "project-name":                     p.Name,
1✔
72
                        }).Info("discovered new project")
1✔
73

1✔
74
                        c.ScheduleTask(ctx, schemas.TaskTypePullRefsFromProject, string(p.Key()), p)
1✔
75
                        c.ScheduleTask(ctx, schemas.TaskTypePullEnvironmentsFromProject, string(p.Key()), p)
1✔
76
                }
1✔
77
        }
78

79
        return nil
1✔
80
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc