Toolkit: Don't create checks on issues

Created on 26 Aug 2019  路  7Comments  路  Source: actions/toolkit

How can I enable the action only to run when an issue is created without setting checks... If my base branch is develop, and I have PR opened to master, every time an issue is created it's gonna assign checks to my PR. something that I don't want because the action is only used to assign users to it, no to prevent merging a PR.

how can I prevent this behavior?

external

Most helpful comment

@damccorm I'll create an internal issue. The problem is that when an event not related to a push triggers Actions, Actions searches the latest version of the workflow files. In order to do that it uses the latest commit in the default branch. This makes sense in order to decide which version of the workflow file is used. Then checks are created and the SHA is stored in them. These checks need to be created to show up in the Actions tab and be able to debug anything.

However that SHA used to find the right workflow file version may also be the latest SHA in a PR, which causes the checks to appear in the merge box (and probably other places of the UI) and this is what's happening here, which is confusing to the users.

All 7 comments

What are you triggering your workflow on? In theory on: issues should have this behavior and shouldn't create any checks

I have this workflow

name: "Issue assigner"

on: [issues, issue_comment]

jobs:
  triage:
    runs-on: ubuntu-latest
    steps:
    - name: Issue assigner
      if: github.event.action == 'created' || github.event.action == 'opened'
      uses: estrada9166/issue-assigner@v1
      with:
        GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
        WITH_COMMENTS: true

Screen Shot 2019-08-26 at 3 28 35 PM

@gimenete you did some work on checks right? This looks like unexpected behavior to me, could you take a look (or repath to someone better)?

@gimenete https://github.com/actions/stale/issues/13 looks like the same issue

@damccorm I'll create an internal issue. The problem is that when an event not related to a push triggers Actions, Actions searches the latest version of the workflow files. In order to do that it uses the latest commit in the default branch. This makes sense in order to decide which version of the workflow file is used. Then checks are created and the SHA is stored in them. These checks need to be created to show up in the Actions tab and be able to debug anything.

However that SHA used to find the right workflow file version may also be the latest SHA in a PR, which causes the checks to appear in the merge box (and probably other places of the UI) and this is what's happening here, which is confusing to the users.

Closing here since not toolkit related and tracking internally

We have shipped a fix for this. Here's a blog post with more information https://github.blog/changelog/2019-09-24-ui-changes-in-github-actions-checks/

Was this page helpful?
0 / 5 - 0 ratings