Documentation
¶
Overview ¶
Copyright 2022 Explore.dev Unipessoal Lda. All Rights Reserved. Use of this source code is governed by a license that can be found in the LICENSE file
Index ¶
- func AbsInt32(value int32) int32
- func CompactJSONString(data string) (string, error)
- func DownloadReviewpadFileFromGitHub(ctx context.Context, logger *logrus.Entry, githubClient *gh.GithubClient, ...) (*bytes.Buffer, error)
- func ElementOf(s []string, str string) bool
- func FileExt(fp string) string
- func GenerateRandom(size int) int
- func IsPullRequestReadyForReportMetrics(eventDetails *entities.EventDetails) bool
- func IsReviewpadCommand(eventDetails *entities.EventDetails) bool
- func IsReviewpadCommandDryRun(command string) bool
- func IsReviewpadCommandRun(command string) bool
- func MinifyQuery(query string) string
- func MustRead(r io.Reader) string
- func MustUnmarshal(data []byte, v interface{})
- func MustWrite(w io.Writer, s string)
- func MustWriteBytes(w io.Writer, data []byte)
- func ReadFile(filepath string) ([]byte, error)
- func ReadableTimeDiff(x time.Time, y time.Time) string
- func ReviewpadFileChanged(ctx context.Context, githubClient *gh.GithubClient, filePath string, ...) (bool, error)
- func ValidateUrl(fileUrl string) (*pbc.Branch, string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CompactJSONString ¶
func GenerateRandom ¶
func IsPullRequestReadyForReportMetrics ¶
func IsPullRequestReadyForReportMetrics(eventDetails *entities.EventDetails) bool
func IsReviewpadCommand ¶
func IsReviewpadCommand(eventDetails *entities.EventDetails) bool
func IsReviewpadCommandRun ¶
func MinifyQuery ¶
func MustUnmarshal ¶
func MustUnmarshal(data []byte, v interface{})
func MustWriteBytes ¶
func ReviewpadFileChanged ¶
func ReviewpadFileChanged(ctx context.Context, githubClient *gh.GithubClient, filePath string, pullRequest *pbc.PullRequest) (bool, error)
reviewpad-an: experimental ReviewpadFileChanges checks if a file path was changed in a pull request. The way this is done depends on the number of files changed in the pull request. If the number of files changed is greater than pullRequestFileLimit, then we download both files using the filePath and check their contents. This strategy assumes that the file path exists in the head branch. Otherwise, we download the pull request files and check the filePath exists in them.
Types ¶
This section is empty.