GitHub action in response to pull_request that doesn't create a status check?

GitHub action in response to pull_request that doesn't create a status check?

github actions
github action not running on pull request
github action pull request merged
github actions triggers
github actions examples
github actions commit
github actions not triggering
github actions java

I am trying to set up a GitHub action that will auto-merge PRs if they are in a mergeable state (pass all checks, etc).

My setup looks a bit like this:

name: Auto-Merge Pull Requests

on:
  pull_request:
    branches:
      - master
    types:
      - opened
      - reopened

jobs:
  auto_merge:
    name: auto_merge
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v1
      - uses: ./.github/actions/auto_merge

Inside of the action, my rudimentary plan is to simply poll the GitHub API until the PR is in a clean state, or some timeout occurs.

However, I have discovered that this GitHub action is itself creating a pending status check on the PR, which only goes green once the action stops running. So I fundamentally cannot achieve what I want to, as the action itself places the PR in a non-mergeable state.

How can I run a GitHub Action without creating a new status check on the PR? I have looked all over the docs and cannot find any information on this.


I haven't tried this out myself, but pascalgn/automerge-action on GitHub might be worth using rather than rolling your own solution, as it also supports a bunch of extra features.

Get pull request number from action · Issue #58 · actions , I haven't tried this out myself, but pascalgn/automerge-action on GitHub might be worth using rather than rolling your own solution, as it also  GitHub action in response to pull_request that doesn't create a status check? I am trying to set up a GitHub action that will auto-merge PRs if they are in a mergeable state (pass all checks, etc). My setup looks a bit like this:


My guess is that it's not possible to avoid the status check when using on: pull_request. I would suggest trying to re-engineer your solution to use a different workflow trigger to perform the merge itself.

Perhaps on: status would work well in this case. https://help.github.com/en/articles/events-that-trigger-workflows#status-event-status

From the API reference:

The status API allows external services to mark commits with an error, failure, pending, or success state, which is then reflected in pull requests involving those commits.

https://developer.github.com/v3/repos/statuses/

If your workflow ran on status events and checked to see if the commit in question was in a success state, and contained in a PR, then that PR potentially could be merged.

Checkout fails on pull request closed event · Issue #136 · actions , Replying to myself, I didn't run actions/checkout before ${{github.event.issue.​number}}!. johnboyes added a commit to  For more information, see "Context and expression syntax for GitHub Actions." Example using contexts. This step only runs when the event type is a pull_request and the event action is unassigned. steps:-name: My first step if: ${{github.event_name == 'pull_request' && github.event.action == 'unassigned'}} run: echo This event is a pull request that had an assignee removed.


You can try running your workflow on a different event for example run only if merge request is approved. This also does not adds a status check

name: Auto-Merge Pull Requests

on:
  pull_request_review:
    types: [submitted]
    branches:
      - master

jobs:
  auto_merge:
    name: auto_merge
    if: github.event.review.state == 'approved'
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v1
      - uses: ./.github/actions/auto_merge

Github actions don't work for pull requests created that involve a fork , Hello everyone, So, I have a .github/workflow/docker.yml like this: name: Maybe update Docker image on: pull_request: types: [closed] jobs:  We need this reference so that the deployment is correctly associated with this pull request. We'll therefore perform a GitHub API call first to fetch the branch name that is associated with this pull request. The octokit/request-action GitHub Action is a small wrapper around the GitHub API and a convenient way to use the API. Using the branch


Coveralls GitHub Action · Actions · GitHub Marketplace · GitHub, As explained in the following link, our github actions won't work correctly on PRs Pull Request Automation: Avoid automation tasks for forked  Enter GitHub Actions. With Actions, you’re able to run code as a response to events taking place in your repository. A new pull request, review, comment, issue, and quite a few others, are such events. The code (the action) is arbitrary, and GitHub spawns a container on its own infrastructure, where your code will run.


Avoid duplicate GitHub actions builds for PRs · Issue #309 · gleam , When running on pull_request events, a comment will be added to the PR with It is built into Github Actions and does not need to be manually specified in your coveralls-api-result : JSON response from the Coveralls API with a status code​  If you don’t want to use the Pulumi GitHub App, you can configure Pulumi’s GitHub Actions to copy the output of the pulumi invocation on the Pull Request. This option doesn’t have as rich an output display as the Pulumi GitHub App, as it simply copies the raw output of the Pulumi CLI.


Wait For Check · Actions · GitHub Marketplace · GitHub, Currently blocked as actions doesn't seem to work on this new GitHub Please, share the response of the GitHub support about the actions in new org. Trigger the workflow on push or pull request on: [push, pull_request]. UPDATE_RETRIES and UPDATE_RETRY_SLEEP: Sometimes, the pull request check runs haven't finished yet and the action doesn't know if an update is necessary. To query the pull request state multiple times, the number of retries can be set with UPDATE_RETRIES. The default number of retries is 1 and setting it to 0 disables the retry logic.