INNER CODE UNIT · Go

func

zopdev/helm-charts · charts-lint/github/client.go:21

func (c *githubClient) GetDiff() ([]string, error) {
	// Get env variables for github repo
	owner := os.Getenv("REPOSITORY_OWNER")
	repoPath := os.Getenv("REPOSITORY_NAME")
	repo := strings.Split(repoPath, "/")[1]

	prNumber, err := strconv.Atoi(os.Getenv("PR_NUMBER"))
	if err != nil {
		return nil, err
	}

	// get changes in the pull request
	commitFiles, _, err := c.pr.ListFiles(context.Background(), owner, repo, prNumber, nil)
	if err != nil {
		return nil, err
	}

	charts := make([]string, 0)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…