Project

Profile

Help

Issue #5990

closed

Travis fails to check out merged PRs

Added by daviddavis over 4 years ago. Updated about 4 years ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Assignee:
Category:
-
Sprint/Milestone:
-
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
Platform Release:
OS:
Triaged:
No
Groomed:
No
Sprint Candidate:
No
Tags:
CI/CD, Plugin Template
Sprint:
Sprint 64
Quarter:

Description

Error:

  if [ -n "$PULP_SMASH_PR_NUMBER" ]; then
    cd pulp-smash
    git fetch --depth=1 origin +refs/pull/$PULP_SMASH_PR_NUMBER/merge
    git checkout FETCH_HEAD
    cd ..
  fi
fatal: couldn't find remote ref refs/pull/1228/merge

This seems to fail for merged PRs but I noticed that the github help docs[0] recommend using git fetch origin pull/ID/head:BRANCHNAME which seems to work with merged PRs.

[0] https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/checking-out-pull-requests-locally

Actions #1

Updated by daviddavis over 4 years ago

For this fix, I am proposing we update PR check outs to the following which is more inline with what the github help docs recommend.

  if [ -n "$PULP_SMASH_PR_NUMBER" ]; then
    cd pulp-smash
    git fetch --depth=1 origin pull/$PULP_SMASH_PR_NUMBER/head:$PULP_SMASH_PR_NUMBER
    git checkout $PULP_SMASH_PR_NUMBER
    cd ..
  fi
Actions #2

Updated by daviddavis over 4 years ago

  • Status changed from NEW to POST
  • Assignee set to daviddavis
  • Sprint set to Sprint 64

Added by daviddavis over 4 years ago

Revision 9a70aa92 | View on GitHub

Checking out PRs according to github docs

Attempting to fix "fatal: couldn't find remote ref refs/pull/ID/merge" that occurs when a PR is merged.

fixes #5990

Actions #3

Updated by daviddavis over 4 years ago

  • Status changed from POST to MODIFIED
Actions #4

Updated by daviddavis about 4 years ago

  • Status changed from MODIFIED to CLOSED - CURRENTRELEASE
  • Tags Plugin Template added

Also available in: Atom PDF