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: PR check status to show summary e.g. Plan: 1 to add, 0 to change, 1 to destroy #2983

Merged

Conversation

krrrr38
Copy link
Contributor

@krrrr38 krrrr38 commented Jan 14, 2023

@krrrr38 krrrr38 requested a review from a team as a code owner January 14, 2023 11:49
@@ -34,9 +34,6 @@ type CommitStatusUpdater interface {
// UpdateCombinedCount updates the combined status to reflect the
// numSuccess out of numTotal.
UpdateCombinedCount(repo models.Repo, pull models.PullRequest, status models.CommitStatus, cmdName command.Name, numSuccess int, numTotal int) error
// UpdateProject sets the commit status for the project represented by
// ctx.
UpdateProject(ctx command.ProjectContext, cmdName command.Name, status models.CommitStatus, url string) error
Copy link
Contributor Author

Choose a reason for hiding this comment

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

type StatusUpdater interface has same impl and this is used only for test. so removed.

@krrrr38 krrrr38 force-pushed the albertorm95-feat-change-plan-status branch from df936b4 to 8355e31 Compare January 14, 2023 11:54
@krrrr38 krrrr38 force-pushed the albertorm95-feat-change-plan-status branch from 8355e31 to c778576 Compare January 14, 2023 12:05
@@ -48,8 +48,10 @@ type AsyncTFExec interface {

// StatusUpdater brings the interface from CommitStatusUpdater into this package
// without causing circular imports.
//
//go:generate pegomock generate -m --package mocks -o mocks/mock_status_updater.go StatusUpdater
type StatusUpdater interface {
Copy link
Member

Choose a reason for hiding this comment

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

Are there tests that we can add to runetime_test.go ?

Copy link
Contributor Author

@krrrr38 krrrr38 Jan 14, 2023

Choose a reason for hiding this comment

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

StatusUpdater is just interface and this impl is DefaultCommitStatusUpdater. This test is implemented in commit_status_updater_test.go, so not needed 👌

StatusUpdater brings the interface from CommitStatusUpdater into this package without causing circular imports.

image

Copy link
Member

@nitrocode nitrocode left a comment

Choose a reason for hiding this comment

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

@krrrr38 you make these changes look easy. Thank you so much for your impactful contributions!

@nitrocode nitrocode added this to the v0.23.0 milestone Jan 14, 2023
@nitrocode
Copy link
Member

@krrrr38 is this ready to merge?

@krrrr38
Copy link
Contributor Author

krrrr38 commented Jan 14, 2023

@krrrr38 is this ready to merge?

yes!

@nitrocode nitrocode modified the milestones: v0.23.0, v0.22.3 Jan 14, 2023
@nitrocode nitrocode merged commit ee7a5ca into runatlantis:main Jan 14, 2023
@nitrocode
Copy link
Member

Awesome! Merged :D. Thanks again!

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