sapling icon indicating copy to clipboard operation
sapling copied to clipboard

[ReviewStack] [Github] Missing metadata on Pull Requests for complete stack on ReviewStack

Open equetzal opened this issue 2 years ago • 0 comments

Context

When sending a stack of commits with the pr method to Github, the PRs usually have a bottom content like this:

Stack created with [Sapling](https://sapling-scm.com). Best reviewed with [ReviewStack](https://reviewstack.dev/equetzal/huronOS-build-tools/pull/105).
* __->__ #105
* #104
* #103
* #102
* #101

That is usually rendered like this:

Stack created with Sapling. Best reviewed with ReviewStack.

  • -> #105
  • #104
  • #103
  • #102
  • #101

Problem

When sending the commits as a PR to Github, only the last PR contains the full stack PRs link. (There is an example, if you check the bottom PR it does not have the links to the top PRs of the stack https://github.com/equetzal/huronOS-build-tools/pull/105).

This data seems to be used by ReviewStack to display the stack switch dropbox options. But as the lower PRs miss the metadata, we're not being able to switch to PRs on top of the current reviewed PR:

PR ReviewStack PR Switch dropbox
From the top PR Captura de pantalla 2023-06-02 a la(s) 7 05 03 a m
From a middle PR Captura de pantalla 2023-06-02 a la(s) 7 05 30 a m
From the bottom PR Captura de pantalla 2023-06-02 a la(s) 7 05 43 a m

Expected behavior

I would expect sapling to update the previous PRs of the stack to include the full stack metadata so that ReviewStack is able to switch between lower and upper commits/PRs. (Like already happens with phabricator)

I know this feature might not be super easy to implement as users are able to change the PR descriptions, so this imply fetching the latest description, and append/replace the stack metadata for ReviewStack to read it.

equetzal avatar Jun 02 '23 13:06 equetzal