Skip to content
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

evolve should handle merged pull request branches #73

Open
zombiezen opened this issue Aug 16, 2018 · 1 comment
Open

evolve should handle merged pull request branches #73

zombiezen opened this issue Aug 16, 2018 · 1 comment
Assignees

Comments

@zombiezen
Copy link
Member

Steps to Reproduce

# On an existing working copy in the fork/pull workflow:
$ gg branch feature
$ gg commit -m "Made a change"
$ gg push -create
$ gg requestpull
# Pull request is merged, squashed and merged, or rebased.
$ gg pull
$ gg evolve

Expected Behavior

evolve consults the GitHub pull request API to see if the branch corresponding to the pull request was merged, and then advances the ref to the merge_commit_sha if present locally.

Actual Behavior

Nothing happens.

@zombiezen zombiezen added this to the 0.7 milestone Aug 16, 2018
@zombiezen
Copy link
Member Author

Don't have a full idea yet, but in doing some absent-minded sketching, a GraphQL query like this might be useful for finding relevant PRs in a project.

query ($repoOwner: String!, $repo: String!, $tok: String, $headRef: String) {
  repository(owner: $repoOwner, name: $repo) {
    pullRequests(after: $tok, first: 100, headRefName: $headRef, states: [MERGED]) {
      nodes {
        number
        headRepositoryOwner {
          login
        }
        headRefName
        headRefOid
        mergeCommit {
          oid
        }
      }
      pageInfo {
        endCursor
        hasNextPage
      }
    }
  }
}

@zombiezen zombiezen self-assigned this Jan 14, 2019
@zombiezen zombiezen removed this from the 0.7 milestone Jan 23, 2019
@zombiezen zombiezen added this to the 0.8 milestone Feb 7, 2019
@zombiezen zombiezen modified the milestones: 1.0, 1.1 Jul 23, 2019
@zombiezen zombiezen removed this from the 1.1 milestone Sep 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant