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

fix: add repo status failure call if commits fail quailty checks #114

Merged
merged 7 commits into from
Sep 19, 2024

Conversation

madpah
Copy link
Contributor

@madpah madpah commented Sep 18, 2024

Resolves #113

Signed-off-by: Paul Horton <phorton@sonatype.com>
@madpah madpah added the bug Something isn't working label Sep 18, 2024
@madpah madpah requested a review from bhamail September 18, 2024 07:54
@madpah madpah self-assigned this Sep 18, 2024
Signed-off-by: Paul Horton <phorton@sonatype.com>
@@ -366,6 +368,11 @@ func EvaluatePullRequest(logger *zap.Logger, postgres db.IClaDB, evalInfo *types
return err
}

err = createRepoStatus(client.Repositories, evalInfo.RepoOwner, evalInfo.RepoName, evalInfo.Sha, "failure", "One or more commits haven't met our Quality requirements.", botName)
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm looking into trying to use the Mock objects to see if we can assert some state in unit tests for these sorts of things. It might complicate this PR a little, but should hopefully open the door to better unit tests and maybe allow refactoring some of these huge methods into smaller units. Spoiler: repositoriesMock yadda, yadda...

Copy link

sonarcloud bot commented Sep 19, 2024

Copy link
Contributor

@bhamail bhamail left a comment

Choose a reason for hiding this comment

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

+1

@bhamail bhamail merged commit 29e43c5 into main Sep 19, 2024
4 checks passed
@bhamail bhamail deleted the fix/update-repo-status-post-commit-quality-checks branch September 19, 2024 13:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: Missing update to Repo Status when commits fail Quality Checks
2 participants