Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@babakks
Copy link
Member

@babakks babakks commented May 13, 2025

Fixes #10957

This PR adds an example usage of the --head option to the pr list docs.

Signed-off-by: Babak K. Shandiz <[email protected]>
Copilot AI review requested due to automatic review settings May 13, 2025 13:32
@babakks babakks requested a review from a team as a code owner May 13, 2025 13:32
@babakks babakks requested a review from BagToad May 13, 2025 13:32
@babakks babakks linked an issue May 13, 2025 that may be closed by this pull request
@babakks babakks temporarily deployed to cli-automation May 13, 2025 13:32 — with GitHub Actions Inactive
Copy link
Contributor

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

Adds an example showing how to use the --head filter in the gh pr list command help.

  • Introduces a new usage example for filtering PRs by head branch
  • Ensures consistency with other example sections in the help text

@BagToad
Copy link
Member

BagToad commented May 13, 2025

❓ What do you think about adding a note to the flag description to be more direct, instead of the example:

cmd.Flags().StringVarP(&opts.HeadBranch, "head", "H", "", "Filter by head branch. Does not support <owner>:<branch> syntax.")

@babakks
Copy link
Member Author

babakks commented May 13, 2025

I thought about that, but since we're going to support the <owner>:<branch> syntax by #10945, I decided to keep it from changes in the near future.

What do you think?

@BagToad
Copy link
Member

BagToad commented May 27, 2025

I thought about that, but since we're going to support the <owner>:<branch> syntax by #10945, I decided to keep it from changes in the near future.

What do you think?

I think this text would be very easy to remove and will help users understand in the meantime. Having only the example requires picking up on some nuance that by it being undocumented, it is unsupported.

Normally, I support this approach to not document all the things that aren't possible. But in this case, we're clarifying an inconsistency with other commands that support the same flag but behave differently. So, I think it's appropriate to be very clear.

I'm also not sure how quickly someone would get to the work to add <owner>:<branch> support, so that is another reason why I support adding the text. If it truly was right away and before our next release, I think I wouldn't care as much. We can also make removing this text part of the AC for #10945, if we wanted to be thorough.

Let me know if that makes sense!

@babakks
Copy link
Member Author

babakks commented May 27, 2025

Makes sense, of course, with an A/C note on the other issue to update here accordingly.

I'll update this PR soon.

@babakks
Copy link
Member Author

babakks commented May 28, 2025

@BagToad I've updated this PR, and also the A/C in #10945 for future.

I changed the usage string to this because it felt a bit better without punctuations in the middle. What do you think?

Filter by head branch ("<owner>:<branch>" syntax not supported)

@babakks babakks requested review from BagToad and removed request for BagToad May 28, 2025 12:00
Copy link
Member

@BagToad BagToad left a comment

Choose a reason for hiding this comment

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

Thanks! LGTM

@babakks babakks merged commit c927ea4 into trunk May 28, 2025
16 checks passed
@babakks babakks deleted the babakks/improve-pr-list-docs branch May 28, 2025 13:38
tmeijn pushed a commit to tmeijn/dotfiles that referenced this pull request Jun 13, 2025
This MR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [cli/cli](https://github.com/cli/cli) | minor | `v2.73.0` -> `v2.74.1` |

MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot).

**Proposed changes to behavior should be submitted there as MRs.**

---

### Release Notes

<details>
<summary>cli/cli (cli/cli)</summary>

### [`v2.74.1`](https://github.com/cli/cli/releases/tag/v2.74.1): GitHub CLI 2.74.1

[Compare Source](cli/cli@v2.74.0...v2.74.1)

#### What's Changed

-   Document support for `@copilot` in `gh [pr|issue] edit --add-assignee` and `--remove-assignee` by [@&#8203;timrogers](https://github.com/timrogers) in cli/cli#11056
-   Fix pr edit when URL is provided by [@&#8203;williammartin](https://github.com/williammartin) in cli/cli#11057
-   Fix const in MR finder tests by [@&#8203;babakks](https://github.com/babakks) in cli/cli#11091

**Full Changelog**: cli/cli@v2.74.0...v2.74.1

### [`v2.74.0`](https://github.com/cli/cli/releases/tag/v2.74.0): GitHub CLI 2.74.0

[Compare Source](cli/cli@v2.73.0...v2.74.0)

#### Security

A security vulnerability has been identified in a core `gh` dependency, `go-gh`, where an attacker-controlled GitHub Enterprise Server could result in executing arbitrary commands on a user's machine by replacing HTTP URLs provided by GitHub with local file paths for browsing.

This issue is addressed in this `gh` release by updating `go-gh` to a fixed version.

For more information, see GHSA-g9f5-x53j-h563

#### What's changed

##### ✨ Features

-   Add `preview prompter` command by [@&#8203;BagToad](https://github.com/BagToad) in cli/cli#10745
-   \[gh run watch] Support `--compact` flag by [@&#8203;iamazeem](https://github.com/iamazeem) in cli/cli#10629
-   Fix brew update notifications by [@&#8203;BagToad](https://github.com/BagToad) in cli/cli#11024

##### 🐛 Fixes

-   Revert "\[gh config] Escape pipe symbol in Long desc for website manual" by [@&#8203;BagToad](https://github.com/BagToad) in cli/cli#11004
-   Fix formatting in allowed values for `gh config --help` by [@&#8203;BagToad](https://github.com/BagToad) in cli/cli#11003
-   fix: `gh gist edit` panic when no file in a gist by [@&#8203;phanen](https://github.com/phanen) in cli/cli#10627
-   Add retry logic when fetching TUF content in `gh attestation` commands by [@&#8203;malancas](https://github.com/malancas) in cli/cli#10943

##### 📚 Docs & Chores

-   Update README.md by [@&#8203;irhdab](https://github.com/irhdab) in cli/cli#11022
-   Add tests for `RenderJobs` and `RenderJobsCompact` by [@&#8203;babakks](https://github.com/babakks) in cli/cli#11013
-   Add example usage of `--head` option to `pr list` docs by [@&#8203;babakks](https://github.com/babakks) in cli/cli#10979
-   Mention `pr create` will print the created MR's URL by [@&#8203;babakks](https://github.com/babakks) in cli/cli#10980
-   Add Digest to ReleaseAsset struct by [@&#8203;bdehamer](https://github.com/bdehamer) in cli/cli#11030

##### :dependabot: Dependencies

-   Bump `go-gh` to v2.12.1 by [@&#8203;BagToad](https://github.com/BagToad) in cli/cli#11043
-   chore(deps): bump github.com/gabriel-vasile/mimetype from 1.4.8 to 1.4.9 by [@&#8203;dependabot](https://github.com/dependabot) in cli/cli#10825
-   Update sigstore-go dependency to v1.0.0 by [@&#8203;malancas](https://github.com/malancas) in cli/cli#11028
-   chore(deps): bump github.com/sigstore/protobuf-specs from 0.4.1 to 0.4.2 by [@&#8203;dependabot](https://github.com/dependabot) in cli/cli#10999
-   chore(deps): bump github.com/yuin/goldmark from 1.7.8 to 1.7.12 by [@&#8203;dependabot](https://github.com/dependabot) in cli/cli#11032

#### New Contributors

-   [@&#8203;irhdab](https://github.com/irhdab) made their first contribution in cli/cli#11022
-   [@&#8203;phanen](https://github.com/phanen) made their first contribution in cli/cli#10627

**Full Changelog**: cli/cli@v2.73.0...v2.74.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever MR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this MR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box

---

This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MC41MC4wIiwidXBkYXRlZEluVmVyIjoiNDAuNTAuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiUmVub3ZhdGUgQm90Il19-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add an example of --head option usage to pr list docs

3 participants