Skip to content

slash_command workflow activation trigger on issue opened leads to confusing warning #48918

Closed

Description

@dsyme

When you have a workflow with a on.slash_command trigger, it correctly compiles down to trigger when an issue is opened, which checks issue text for the slash command, and the preactivation job exits early if it's not present. OK, good.

However, a surprising and unrelated extra warning appears, e.g. see run https://github.com/fsprojects/FSharp.Data/actions/runs/28906217685

This is occurring because of a roles check. It's correct to be doing the roles check if the /slash command has actually attempted to be triggered. But we shouldn't I think be emitting the warning when there is no attempt to trigger the /slash command.

> [!NOTE]
> **Workflow Activation Skipped**

> Access denied: User 'jkone27' is not authorized. Required permissions: admin, maintainer, write. To allow this user to run the workflow, add their role to the frontmatter. Example: roles: [admin, maintainer, write, read]

**Remediation:** To allow a bot or GitHub App actor, add it to `on.bots:` in the workflow frontmatter. To change the required roles for human actors, update `on.roles:` in the workflow frontmatter.

---

_See the `pre_activation` job log for full details._

> [!NOTE]
> **Workflow Activation Skipped**

> The trigger comment did not start with a required command. Expected one of: /repo-assist. Found: `Seems`.

**Remediation:** Make sure the trigger comment starts with the required command defined in `on.command:` in the workflow frontmatter.

---

_See the `pre_activation` job log for full details._

Activity

  1. dsyme commented on Jul 29, 2026

    @dsyme
    CollaboratorAuthor

    The full on: for this workflow is

    on:
      schedule: weekly
      workflow_dispatch:
        inputs:
          command:
            description: "Optional command-mode instruction (for example: Run Task 9)"
            required: false
            type: string
            default: ""
      slash_command:
        name: repo-assist
      reaction: "eyes"
      permissions:
        pull-requests: read
      steps:
        - id: check
          env:
            GH_TOKEN: ${{ github.token }}
          run: |
            MAX_OPEN_PRS=8
            if [[ "$GITHUB_EVENT_NAME" != "schedule" ]]; then exit 0; fi
            COUNT=$(gh pr list --repo "$GITHUB_REPOSITORY" --state open --search 'in:title "[repo-assist]"' --json number --jq 'length')
            [[ "$COUNT" -lt "$MAX_OPEN_PRS" ]]
          # exits 0 if not scheduled or <MAX_OPEN_PRS open PRs, 1 if ≥MAX_OPEN_PRS
    
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions