Skip to content

Automatically fetch PRs for rebase if not already merged #219

@manics

Description

@manics

Rebase an unmerged PR, this will fail if that commit hasn't already been fetched:

$ scc rebase 5460 metadata53
2017-08-22 17:26:48,640 [  scc.rebase] INFO  PR 5460: allow model types to be ignored during object deletion opened by Mark Carroll against develop
2017-08-22 17:26:48,641 [  scc.rebase] INFO  Head: 338362
2017-08-22 17:26:49,047 [  scc.rebase] INFO  Merged: False
Commit 338362bd08634334a2198997bf89c95a029171d7 does not exists in local Git repository. Fetch this remote first: mtbc

Since it is possible to fetch PRs from origin without needing to add a remote scc should automatically fetch pull/<PR>/head:

$ git fetch origin pull/5460/head
remote: Counting objects: 23, done.
remote: Total 23 (delta 19), reused 19 (delta 19), pack-reused 4
Unpacking objects: 100% (23/23), done.
From https://github.com/openmicroscopy/openmicroscopy
 * branch                  refs/pull/5460/head -> FETCH_HEAD

$ scc rebase 5460 metadata53
2017-08-22 17:30:24,671 [  scc.rebase] INFO  PR 5460: allow model types to be ignored during object deletion opened by Mark Carroll against develop
...
# Created local branch rebased/metadata53/delete-ignore-types
# Pushed rebased/metadata53/delete-ignore-types to manics
https://github.com/openmicroscopy/openmicroscopy/pull/5464

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions