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

Do not comment if no resutls #109

Merged
merged 1 commit into from
Jun 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 0 additions & 37 deletions pkg/domain/interfaces/mock.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,8 @@ import (
"context"
"encoding/json"
"io"
"net/url"

"github.com/google/go-github/v53/github"
"github.com/m-mizutani/goerr"
"github.com/m-mizutani/octovy/pkg/domain/model"
"github.com/m-mizutani/octovy/pkg/domain/types"
)

type StorageMock struct {
Expand Down Expand Up @@ -55,36 +51,3 @@ func (s *StorageMock) Unmarshal(key string, v interface{}) error {

return nil
}

type GitHubMock struct {
MockGetArchiveURL func(ctx context.Context, input *GetArchiveURLInput) (*url.URL, error)
MockCreateIssueComment func(ctx context.Context, repo *model.GitHubRepo, id types.GitHubAppInstallID, prID int, body string) error
MockListIssueComments func(ctx context.Context, repo *model.GitHubRepo, id types.GitHubAppInstallID, prID int) ([]*model.GitHubIssueComment, error)
MockMinimizeComment func(ctx context.Context, repo *model.GitHubRepo, id types.GitHubAppInstallID, subjectID string) error
MockCreateCheckRun func(ctx context.Context, id types.GitHubAppInstallID, repo *model.GitHubRepo, commit string) (int64, error)
MockUpdateCheckRun func(ctx context.Context, id types.GitHubAppInstallID, repo *model.GitHubRepo, checkID int64, opt *github.UpdateCheckRunOptions) error
}

func (x *GitHubMock) GetArchiveURL(ctx context.Context, input *GetArchiveURLInput) (*url.URL, error) {
return x.MockGetArchiveURL(ctx, input)
}

func (x *GitHubMock) CreateIssueComment(ctx context.Context, repo *model.GitHubRepo, id types.GitHubAppInstallID, prID int, body string) error {
return x.MockCreateIssueComment(ctx, repo, id, prID, body)
}

func (x *GitHubMock) ListIssueComments(ctx context.Context, repo *model.GitHubRepo, id types.GitHubAppInstallID, prID int) ([]*model.GitHubIssueComment, error) {
return x.MockListIssueComments(ctx, repo, id, prID)
}

func (x *GitHubMock) MinimizeComment(ctx context.Context, repo *model.GitHubRepo, id types.GitHubAppInstallID, subjectID string) error {
return x.MockMinimizeComment(ctx, repo, id, subjectID)
}

func (x *GitHubMock) CreateCheckRun(ctx context.Context, id types.GitHubAppInstallID, repo *model.GitHubRepo, commit string) (int64, error) {
return x.MockCreateCheckRun(ctx, id, repo, commit)
}

func (x *GitHubMock) UpdateCheckRun(ctx context.Context, id types.GitHubAppInstallID, repo *model.GitHubRepo, checkID int64, opt *github.UpdateCheckRunOptions) error {
return x.MockUpdateCheckRun(ctx, id, repo, checkID, opt)
}
Loading
Loading