Skip to content

Provide merge outcome as output #323

@alexivanov

Description

@alexivanov

Prerequisites

  • I have written a descriptive issue title
  • I have searched existing issues to ensure the feature has not already been requested

🚀 Feature Proposal

It would be great if the action execution outcome, i.e whether a PR was merged, is provided as an output.

Something along the lines of:
mergeResult - One of skipped, not_a_dependabot_pr,merge_failed, merged etc.

Motivation

Allows for running steps / jobs conditionally only if a PR was auto-merged.

Example

jobs:
  automerge:
    runs-on: ubuntu-latest
    steps:
      - id: automerge
        name: automerge
        uses: "fastify/github-action-merge-dependabot@v3.0.0"
        env:
          github-token: ${{ secrets.GITHUB_TOKEN }}
      - name: Invoke workflow
        if: steps.automerge.outputs.mergeResult == 'merged'
        ....

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions