Skip to content

Commit

Permalink
use build script for labels
Browse files Browse the repository at this point in the history
  • Loading branch information
mickahell committed Aug 6, 2023
1 parent 1eb74ad commit 758cf1a
Showing 1 changed file with 49 additions and 15 deletions.
64 changes: 49 additions & 15 deletions .github/workflows/ecosystem-submission.yml
Original file line number Diff line number Diff line change
Expand Up @@ -160,23 +160,38 @@ jobs:
# PR labels and comment
- name: PR labeling status ready
uses: actions-ecosystem/action-add-labels@v1
uses: actions/github-script@v6
if: ${{ steps.check-return.outputs.PASS_STD == 'True' }}
with:
number: ${{ steps.cpr.outputs.pull-request-number }}
labels: ready
- uses: actions-ecosystem/action-remove-labels@v1
script: |
github.rest.issues.addLabels({
issue_number: steps.cpr.outputs.pull-request-number,
owner: context.repo.owner,
repo: context.repo.repo,
labels: ["ready"]
})
- uses: actions/github-script@v6
if: ${{ steps.check-return.outputs.PASS_STD == 'True' }}
with:
number: ${{ steps.cpr.outputs.pull-request-number }}
labels: on hold
script: |
github.rest.issues.removeLabel({
issue_number: steps.cpr.outputs.pull-request-number,
owner: context.repo.owner,
repo: context.repo.repo,
name: ["on hold"]
})
- name: PR labeling status on hold
uses: actions-ecosystem/action-add-labels@v1
uses: actions/github-script@v6
if: ${{ steps.check-return.outputs.PASS_STD != 'True' }}
with:
number: ${{ steps.cpr.outputs.pull-request-number }}
labels: on hold
script: |
github.rest.issues.addLabels({
issue_number: steps.cpr.outputs.pull-request-number,
owner: context.repo.owner,
repo: context.repo.repo,
labels: ["on hold"]
})

- name: PR create comment
uses: peter-evans/create-or-update-comment@v3
Expand All @@ -186,20 +201,39 @@ jobs:

# Issue labels and comment
- name: Issue labeling status ready
uses: actions-ecosystem/action-add-labels@v1
uses: actions/github-script@v6
if: ${{ steps.check-return.outputs.PASS_STD == 'True' }}
with:
labels: ready
- uses: actions-ecosystem/action-remove-labels@v1
script: |
github.rest.issues.addLabels({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
labels: ["ready"]
})
- uses: actions/github-script@v6
if: ${{ steps.check-return.outputs.PASS_STD == 'True' }}
with:
labels: on hold
script: |
github.rest.issues.removeLabel({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
name: ["on hold"]
})
- name: Issue labeling status on hold
uses: actions-ecosystem/action-add-labels@v1
uses: actions/github-script@v6
if: ${{ steps.check-return.outputs.PASS_STD != 'True' }}
with:
labels: on hold
script: |
github.rest.issues.addLabels({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
labels: ["on hold"]
})

- name: Issue create comment
uses: peter-evans/create-or-update-comment@v3
Expand Down

0 comments on commit 758cf1a

Please sign in to comment.