Skip to content

Triggering the action based on the Label on the Issue #158

Description

@meolivar

Description

I am looking for a solution where the github action can only be triggered based on the label associated to the issue created in Github.

The use case is we are trying to trigger the workflow to send a message to slack based on a specific label attached to the issue.

What type of issue is this? (place an x in one of the [ ])

  • bug
  • enhancement (feature request)
  • question
  • documentation related
  • example code related
  • testing related
  • discussion

Requirements (place an x in each of the [ ])

  • I've read and understood the Contributing guidelines and have done my best effort to follow them.
  • I've read and agree to the Code of Conduct.
  • I've searched for any related issues and avoided creating a duplicate issue.

Bug Report

Filling out the following details about bugs will help us solve your issue sooner.

Reproducible in:

package version:

node version:

OS version(s):

Steps to reproduce:

Expected result:

What you expected to happen

Actual result:

What actually happened

Attachments:

Logs, screenshots, screencast, sample project, funny gif, etc.

Activity

  1. srajiang commented on Dec 19, 2022

    @srajiang
    Contributor

    Hi @meolivar,

    It sounds like you might want to try configuring this workflow action to be triggered by the issues event payload with the activity type labeled. Github docs on that here are very helpful and contain some setup configuration which you can add to your workflow.

    on: 
       issues: 
           types: [labeled, unlabeled]
  2. zimeg commented on Dec 20, 2024

    @zimeg
    Member

    👋 An example workflow showcasing this and a few more steps with slackapi/slack-github-action@v2 is now included!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions