gruntwork-io / git-xargs

git-xargs is a command-line tool (CLI) for making updates across multiple Github repositories with a single command.
https://blog.gruntwork.io/introducing-git-xargs-an-open-source-tool-to-update-multiple-github-repos-753f9f3675ec
Apache License 2.0
944 stars 62 forks source link

Add label option #135

Open sercantor opened 1 year ago

sercantor commented 1 year ago

Description

Addresses #134. GH api doesn't seem to have the option to provide labels with the PR request endpoint, that seems to be in their graphql api.

Added label flag, and a request to add the label after the PR is opened successfully (similar to requesting reviewers)

I have no idea how to write go, but I've added this since I looked at the code, and it looked similar to how you add reviewers to the pr, I've provided a description to why I'd like to use this in the issue I've opened, but if it doesn't suit the CLI's usecase I'll close this PR.

Oh, also I didn't really test it with code, I just made the changes, built it, ran it in my cli for some of my own repos, seems to work OK.

TODOs

Read the Gruntwork contribution guidelines.

Release Notes (draft)

Added the option to pass labels to the PRs