Skip to content

Commit

Permalink
Create check-pull-request-label-by-comment.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
MeilCli authored Feb 28, 2021
1 parent 0fbe6bf commit a8aab87
Showing 1 changed file with 53 additions and 0 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/check-pull-request-label-by-comment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: 'Check-Pull-Request-Label-By-Comment'

on:
issues:
types: [labeled, unlabeled]
pull_request:
types: [opened]
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: octokit/[email protected]
if: github.event_name == 'issues'
name: Get Issue
id: get_issue
with:
route: GET /repos/:repository/issues/:issue_number
repository: ${{ github.repository }}
issue_number: ${{ github.event.issue.number }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: MeilCli/hidable-comment-action@v1
if: github.event_name == 'issues'
with:
number: ${{ github.event.issue.number }}
show: ${{ contains(fromJson(steps.get_issue.outputs.data).labels.*.name, 'documentation') == false }}
id: 'label-lint'
body: |
label lint
- test1
- test2
- test3
- uses: octokit/[email protected]
if: github.event_name == 'pull_request'
name: Get PullRequest
id: get_pr
with:
route: GET /repos/:repository/issues/:issue_number
repository: ${{ github.repository }}
issue_number: ${{ github.event.pull_request.number }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: MeilCli/hidable-comment-action@v1
if: github.event_name == 'pull_request'
with:
number: ${{ github.event.pull_request.number }}
show: ${{ contains(fromJson(steps.get_pr.outputs.data).labels.*.name, 'documentation') == false }}
id: 'label-lint'
body: |
label lint
- test1
- test2
- test3

0 comments on commit a8aab87

Please sign in to comment.