Skip to content

Commit

Permalink
Add repository to data
Browse files Browse the repository at this point in the history
  • Loading branch information
AlekSi committed Sep 3, 2024
1 parent eea3aa5 commit 391d54c
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions internal/pusher/pusher.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,11 @@ import (

// Client represents a MongoDB client.
type Client struct {
c *mongo.Client
database string
hostname string
runner string
c *mongo.Client
database string
hostname string
runner string
repository string
}

// New creates a new MongoDB client with given URI.
Expand Down Expand Up @@ -68,10 +69,11 @@ func New(uri string) (*Client, error) {
}

return &Client{
c: c,
database: database,
hostname: hostname,
runner: os.Getenv("RUNNER_NAME"),
c: c,
database: database,
hostname: hostname,
runner: os.Getenv("RUNNER_NAME"),
repository: os.Getenv("GITHUB_REPOSITORY"),
}, nil
}

Expand All @@ -91,6 +93,7 @@ func (c *Client) Push(ctx context.Context, config, database string, res map[stri
{"env", bson.D{
{"runner", c.runner},
{"hostname", c.hostname},
{"repository", c.repository},
}},
{"passed", passed},
}
Expand Down

0 comments on commit 391d54c

Please sign in to comment.