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

Skip to content

Conversation

@twavv
Copy link
Contributor

@twavv twavv commented Sep 12, 2022

This PR adds parentPull to stack metadata. It also will update the metadata whenever CreatePullRequest is called (i.e., when doing av pr create or av stack submit).

We'll probably need to detect if things are bad™ on the server side of things and recommend running av stack submit, but at least this should make it so that the logic for constructing stacks is more explicit and intentional and consistent and less likely to do unexpected things.

…stack submit

This PR adds `parentPull` to stack metadata. It also will update the metadata whenever `CreatePullRequest` is called (_i.e._, when doing `av pr create` or `av stack submit`).

We'll probably need to detect if things are bad™ on the server side of things and recommend running `av stack submit`, but at least this should make it so that the logic for constructing stacks is more explicit and intentional and consistent and less likely to do unexpected things.
@aviator-app
Copy link
Contributor

aviator-app bot commented Sep 12, 2022

Aviator status

Aviator will automatically update this comment as the status of the PR changes.

This PR was merged using Aviator.

@twavv twavv requested a review from a user September 12, 2022 18:32
upstream, err := repo.RevParse(&git.RevParse{
SymbolicFullName: true,
Rev: "HEAD@{u}",
Rev: fmt.Sprintf("%s@{u}", opts.BranchName),
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this is an unrelated bug: we would always push whatever branch was currently checked out rather than the target branch.

Bad behavior (that's now fixed):

$ av stack submit
Creating pull request for branch 2022-09-12-one:
  - pushing branch to GitHub (origin/2022-09-12-three)
...

(note that the pushing branch to bit is wrong)

colors.UserInput(pull.Permalink),
"\n",
" - ", action, " pull request ",
colors.UserInput(pull.Permalink), "\n",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

tweaked this just to be less visually noisy.
Screen Shot 2022-09-12 at 11 34 52 AM

@twavv twavv changed the title [MER-1245] Include parent pull in stack metadata, update metadata on stack submit feat: Include parent pull in stack metadata, update metadata on stack submit Sep 12, 2022
@aviator-app aviator-app bot merged commit 6076153 into master Sep 12, 2022
@aviator-app aviator-app bot deleted the travis/mer-1245-include-parent-stack-pull-number-in-pr branch September 12, 2022 19:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant