Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add github app #1070

Draft
wants to merge 33 commits into
base: main
Choose a base branch
from
Draft

feat: add github app #1070

wants to merge 33 commits into from

Conversation

jbrockopp
Copy link
Contributor

No description provided.

Copy link

codecov bot commented Feb 27, 2024

Codecov Report

Attention: Patch coverage is 3.63636% with 53 lines in your changes missing coverage. Please review.

Project coverage is 62.22%. Comparing base (4fd820a) to head (b011b7c).

Current head b011b7c differs from pull request most recent head 8dec758

Please upload reports for the commit 8dec758 to get more accurate results.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##             main    #1070       +/-   ##
===========================================
+ Coverage   52.15%   62.22%   +10.07%     
===========================================
  Files         550      345      -205     
  Lines       18833    10309     -8524     
===========================================
- Hits         9822     6415     -3407     
+ Misses       8447     3416     -5031     
+ Partials      564      478       -86     
Files Coverage Δ
scm/setup.go 100.00% <100.00%> (ø)
scm/github/opts.go 85.50% <0.00%> (-14.50%) ⬇️
scm/github/repo.go 70.76% <0.00%> (-5.79%) ⬇️
scm/github/github.go 67.12% <0.00%> (-32.88%) ⬇️

... and 419 files with indirect coverage changes

@@ -164,3 +184,40 @@

return github
}

// helper function to return the GitHub App token.
func (c *client) newGithubAppToken(r *library.Repo) *github.Client {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [golangci] reported by reviewdog 🐶
func (*client).newGithubAppToken is unused (unused)

// CreateChecks defines a function that does stuff...
func (c *client) CreateChecks(ctx context.Context, r *library.Repo, s *library.Step, branch string) (int64, error) {
// create client from GitHub App
client := c.newGithubAppToken(r)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [golangci] reported by reviewdog 🐶
Function newGithubAppToken->newClientToken should pass the context parameter (contextcheck)

// UpdateChecks defines a function that does stuff...
func (c *client) UpdateChecks(ctx context.Context, r *library.Repo, s *library.Step, id int64, branch string) error {
// create client from GitHub App
client := c.newGithubAppToken(r)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [golangci] reported by reviewdog 🐶
Function newGithubAppToken->newClientToken should pass the context parameter (contextcheck)

}

// TODO: have to store the check ID somewhere
s.SetCheckID(id)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [golangci] reported by reviewdog 🐶
s.SetCheckID undefined (type *library.Step has no field or method SetCheckID) (typecheck)

api/step/plan.go Outdated

// TODO: have to store the check ID somewhere
s.SetCheckID(id)

// send API call to create the step
s, err := database.CreateStep(ctx, s)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [golangci] reported by reviewdog 🐶
no new variables on left side of := (typecheck)

Status: github.String(status),
}

_, _, err := client.Checks.UpdateCheckRun(ctx, r.GetOrg(), r.GetName(), s.GetCheckID(), opts)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [golangci] reported by reviewdog 🐶
s.GetCheckID undefined (type *library.Step has no field or method GetCheckID)) (typecheck)

Status: github.String(status),
}

_, _, err := client.Checks.UpdateCheckRun(ctx, r.GetOrg(), r.GetName(), s.GetCheckID(), opts)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [golangci] reported by reviewdog 🐶
s.GetCheckID undefined (type *library.Step has no field or method GetCheckID)) (typecheck)

Status: github.String(status),
}

_, _, err := client.Checks.UpdateCheckRun(ctx, r.GetOrg(), r.GetName(), s.GetCheckID(), opts)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [golangci] reported by reviewdog 🐶
s.GetCheckID undefined (type *library.Step has no field or method GetCheckID)) (typecheck)

Status: github.String(status),
}

_, _, err := client.Checks.UpdateCheckRun(ctx, r.GetOrg(), r.GetName(), s.GetCheckID(), opts)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚫 [golangci] reported by reviewdog 🐶
s.GetCheckID undefined (type *library.Step has no field or method GetCheckID) (typecheck)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants