Skip to content

feat: add labels and assignees to the resulting combined-pr #13

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

Merged
merged 3 commits into from
Apr 14, 2025

Conversation

GrantBirki
Copy link
Member

This pull request adds logic for adding labels and assignees to the resulting PR that gets created by this CLI.

Note: I did an experiment and used the agentic mode of copilot to generate these changes and have review/tested them myself.


Resolves: #10

@GrantBirki GrantBirki added the enhancement New feature or request label Apr 14, 2025
@Copilot Copilot AI review requested due to automatic review settings April 14, 2025 17:17
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This pull request adds functionality for attaching labels and assignees to the combined pull request created by the CLI. Key changes include wrapping the REST client to conform to a new interface, updating functions to use the RESTClientInterface, and extending the pull request creation logic to include labels and assignees.

Reviewed Changes

Copilot reviewed 32 out of 33 changed files in this pull request and generated no comments.

File Description
internal/cmd/root.go Introduces a wrapper for the REST client to meet the new interface.
internal/cmd/mock_restclient.go Implements a mock REST client matching the updated interface.
internal/cmd/combine_prs_test.go Adds tests for pull request creation with labels and assignees.
internal/cmd/combine_prs.go Refactors functions to use RESTClientInterface and updates createPullRequest to accept labels and assignees.
Files not reviewed (1)
  • go.mod: Language not supported
Comments suppressed due to low confidence (1)

internal/cmd/combine_prs.go:98

  • The variables 'addLabels' and 'addAssignees' are used in the createPullRequest call but their definitions are not visible in this diff. Please ensure these variables are properly defined and initialized for the call to succeed.
err = createPullRequest(ctx, restClient, repo, prTitle, combineBranchName, repoDefaultBranch, prBody, addLabels, addAssignees)

@GrantBirki GrantBirki merged commit 9578695 into main Apr 14, 2025
7 checks passed
@GrantBirki GrantBirki deleted the add-labels-and-assignees branch April 14, 2025 17:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat: implement logic for adding labels and assignees via the cli flags that exist today
1 participant