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

Add Usage Example #333

Open
jackwener opened this issue Jan 6, 2022 · 5 comments
Open

Add Usage Example #333

jackwener opened this issue Jan 6, 2022 · 5 comments
Labels
enhancement New feature or request

Comments

@jackwener
Copy link

What you want to add

I have tried to add it in my test repo. It didn't work.

It will be better to add Usage Example

Why this is needed

Help user to use this action

@jackwener jackwener added the enhancement New feature or request label Jan 6, 2022
@jackwener
Copy link
Author

It didn't work. like those.

Test PR

Test issue

@jackwener
Copy link
Author

The current way of using it is like touching the elephant by the blind, I think it’s not very good

@jackwener
Copy link
Author

action-add-lable didn't work. link

@liangyuanpeng
Copy link

name: Add Label

on:
  issue_comment:
    types: [created, deleted]
  issues:
    types: opened

jobs:
  add_label:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: actions-ecosystem/action-add-labels@v1
        if: ${{ startsWith(github.event.comment.body, '/add-labels') }}
        with:
          labels: bug

This is the example for add label when you create a issue .

Github-Action bot will add label "bug" when you add a comment to issue and comment startwith '/add-labels'.

@gfrid
Copy link

gfrid commented Feb 15, 2023

you can use this to get the PR topic

  - uses: actions-ecosystem/action-add-labels@v1
    if: ${{ startsWith(github.event.pull_request.title, 'feat') }}
    with:
      github_token: ${{ secrets.GH_PAT }}
      labels: 
         feature

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants