Skip to content

Adding option to return baseRefOid in pr view #9938

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 1 commit into from
Nov 20, 2024
Merged

Conversation

daliusd
Copy link
Contributor

@daliusd daliusd commented Nov 19, 2024

You need to know exact baseRefOid so you could show correct diff.
baseRefName is not enough sometimes because branch from which PR was
forked might have changes already.

Example usage:

gh pr view --json headRefName,headRefOid,number,baseRefName,baseRefOid,reviewDecision

Fixes #9941

You need to know exact `baseRefOid` so you could show correct diff.
`baseRefName` is not enough sometimes because branch from which PR was
forked might have changes already.

Example usage:
```
gh pr view --json headRefName,headRefOid,number,baseRefName,baseRefOid,reviewDecision
```
@daliusd daliusd requested a review from a team as a code owner November 19, 2024 21:55
@daliusd daliusd requested a review from andyfeller November 19, 2024 21:55
@cliAutomation cliAutomation added the external pull request originating outside of the CLI core team label Nov 19, 2024
@cliAutomation
Copy link
Collaborator

Hi! Thanks for the pull request. Please ensure that this change is linked to an issue by mentioning an issue number in the description of the pull request. If this pull request would close the issue, please put the word 'Fixes' before the issue number somewhere in the pull request body. If this is a tiny change like fixing a typo, feel free to ignore this message.

daliusd added a commit to daliusd/ghlite.nvim that referenced this pull request Nov 20, 2024
Note: this needs gh cli PR to be merged
cli/cli#9938 and released
Copy link
Contributor

@jtmcg jtmcg left a comment

Choose a reason for hiding this comment

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

I tried this out using GH_DEBUG=api to see if it required any strange, under-the-hood things to happen and it did not (not that I expected it to 😅)

:shipit:

@jtmcg jtmcg enabled auto-merge November 20, 2024 20:02
@jtmcg jtmcg merged commit 1ec23f6 into cli:trunk Nov 20, 2024
@daliusd daliusd deleted the base-ref-oid branch November 20, 2024 21:39
@daliusd
Copy link
Contributor Author

daliusd commented Nov 20, 2024

I tried this out using GH_DEBUG=api to see if it required any strange, under-the-hood things to happen and it did not (not that I expected it to 😅)

:shipit:

Thanks for review. It was super easy to contribute to this project.

daliusd added a commit to daliusd/ghlite.nvim that referenced this pull request Nov 22, 2024
Note: this needs gh cli PR to be merged
cli/cli#9938 and released
tmeijn pushed a commit to tmeijn/dotfiles that referenced this pull request Nov 28, 2024
This MR contains the following updates:

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

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.63.0`](https://github.com/cli/cli/releases/tag/v2.63.0): GitHub CLI 2.63.0

[Compare Source](cli/cli@v2.62.0...v2.63.0)

#### What's Changed

-   Support bare repo creation by [@&#8203;williammartin](https://github.com/williammartin) in cli/cli#9905
-   Refactor the `getAttestations` functions by [@&#8203;malancas](https://github.com/malancas) in cli/cli#9892
-   Added a section on manual verification of the relases. by [@&#8203;kommendorkapten](https://github.com/kommendorkapten) in cli/cli#9936
-   Adding option to return `baseRefOid` in `pr view` by [@&#8203;daliusd](https://github.com/daliusd) in cli/cli#9938
-   Update verification results printing by [@&#8203;malancas](https://github.com/malancas) in cli/cli#9937
-   Fix some multiline command documentation to use `heredoc` strings by [@&#8203;BagToad](https://github.com/BagToad) in cli/cli#9948
-   Print friendly error when `release create` fails due to missing `workflow` OAuth scope by [@&#8203;BagToad](https://github.com/BagToad) in cli/cli#9791

**Full Changelog**: cli/cli@v2.62.0...v2.63.0

#### Security

-   A security vulnerability has been identified in the GitHub CLI that could leak authentication tokens when cloning repositories containing git submodules hosted outside of GitHub.com and ghe.com.

    For more information, see GHSA-jwcm-9g39-pmcw

#### New Contributors

-   [@&#8203;daliusd](https://github.com/daliusd) made their first contribution in cli/cli#9938

</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:eyJjcmVhdGVkSW5WZXIiOiIzNy40NDAuNyIsInVwZGF0ZWRJblZlciI6IjM3LjQ0MC43IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJSZW5vdmF0ZSBCb3QiXX0=-->
daliusd added a commit to daliusd/ghlite.nvim that referenced this pull request Dec 7, 2024
Note: this needs gh cli PR to be merged
cli/cli#9938 and released
daliusd added a commit to daliusd/ghlite.nvim that referenced this pull request Dec 7, 2024
* `GHLitePRDiffview` improvement

Note: this needs gh cli PR to be merged
cli/cli#9938 and released

* nil handling

* Missing baseRefOid handling

* README updated

* Pass stderr to callback
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
external pull request originating outside of the CLI core team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

baseRefOid not returned by gh pr view
3 participants