Skip to content

Provide user friendly error for when PR is merged before action runs #393

Open
@jsoref

Description

@jsoref

#36 reports users can be confused by:

couldn't find remote ref refs/pull/6/merge

An action run output will look like:

 Check failure on line 1 in .github

@github-actionsgithub-actions
/ changes
.github#L1
couldn't find remote ref refs/pull/6/merge
 Check warning on line 1 in .github

@github-actionsgithub-actions
/ changes
.github#L1
Git fetch failed with exit code 128, back off 7.292 seconds before retry.
 Check failure on line 1 in .github

@github-actionsgithub-actions
/ changes
.github#L1
couldn't find remote ref refs/pull/6/merge
 Check warning on line 1 in .github

@github-actionsgithub-actions
/ changes
.github#L1
Git fetch failed with exit code 128, back off 8.111 seconds before retry.
 Check failure on line 1 in .github

@github-actionsgithub-actions
/ changes
.github#L1
couldn't find remote ref refs/pull/6/merge
 Check failure on line 1 in .github

@github-actionsgithub-actions
/ changes
.github#L1
Git fetch failed with exit code: 128
 Check failure on line 1 in .github

@github-actionsgithub-actions
/ changes
.github#L1
Exit code 1 returned from process: file name '/home/runner/runners/2.274.2/bin/Runner.PluginHost', arguments 'action "GitHub.Runner.Plugins.Repository.v1_0.CheckoutTask, Runner.Plugins"'.

While it's technically correct, it'd be much nicer if the error message was replaced with a friendly message.

Something like Can't retrieve merge, PR has already been merged or Can't retrieve merge, PR has been closed.

I'm hitting this often and it's pretty frustrating. Technically correct, but...

Also, maybe it's worth mapping this to skipped instead of failed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions