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

Providing step output #169

Closed
wants to merge 7 commits into from
Closed

Providing step output #169

wants to merge 7 commits into from

Conversation

liiri
Copy link
Contributor

@liiri liiri commented Aug 19, 2021

Adding two new outputs to the Github action context:

  • mergeResult - The result from the action run, could be one of skipped, not_ready, author_filtered, merge_failed, merged
  • pullRequestNumber - If one or more pull requests were matched in the action this value will hold the Github number of one of them

The main motivation is to avoid the limitation of using the built in auth token. See also #36

For example:

name: automerge
on:
  ...
jobs:
  automerge:
    runs-on: ubuntu-latest
    steps:
      - name: automerge
        id: automerge
        uses: "pascalgn/automerge-action@v0.14.2"
        env:
          GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
      - name: feedback
        if: steps.automerge.outputs.mergeResult == "merged"
        run: |
          echo "Pull request ${{ steps.automerge.outputs.pullRequestNumber }} was auto merged!"

image

image

@pascalgn
Copy link
Owner

pascalgn commented Sep 3, 2021

It's a lot of changes, I'm not so sure about this PR. Maybe we should start by just adding the output for some cases, directly in merge.js. Changing all the signatures to return a value doesn't seem to be the best way

@trent-abc
Copy link

This functionality is critical for us, if you're not going to accept the PR can you provide an alternative implementation?

@pascalgn pascalgn mentioned this pull request Mar 24, 2022
@pascalgn
Copy link
Owner

Thanks a lot for the PR, this is merged now via #186! I've changed some things (therefore the new PR, I couldn't push to your branch), so if you're having any problems, feel free to create an issue! Thanks! 🚀

@pascalgn pascalgn closed this Mar 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants