chore(deps): update dependency @graasp/sdk to v1.2.1 - autoclosed #19
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Auto Tag | |
on: | |
issues: | |
types: | |
- reopened | |
- closed | |
pull_request: | |
types: | |
- closed | |
env: | |
PRE_LABEL_NAME: un-released | |
jobs: | |
setup-labels: | |
if: ${{ !github.event.release }} | |
runs-on: ubuntu-latest | |
env: | |
REPO: ${{ github.event.repository.full_name }} | |
steps: | |
- name: Get `${{ env.PRE_LABEL_NAME }}` label | |
id: label-list | |
run: echo label=$(gh label list --search $PRE_LABEL_NAME -L 1 --json name -q '.[].name' --repo $REPO) >> $GITHUB_OUTPUT | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
- name: Create label if does not exist | |
if: ${{ steps.label-list.outputs.label != env.PRE_LABEL_NAME }} | |
run: | | |
gh label create $PRE_LABEL_NAME --color e3fce3 --repo $REPO; | |
echo ':neckbeard: Created the `${{ env.PRE_LABEL_NAME }}` label !' >> $GITHUB_STEP_SUMMARY; | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
tag-closed-issues: | |
runs-on: ubuntu-latest | |
if: ${{ github.event.issue.state_reason == 'completed' }} | |
env: | |
REPO: ${{ github.event.repository.full_name }} | |
ISSUE_NUMBER: ${{ github.event.issue.number }} | |
steps: | |
- name: Tag Issue | |
run: | | |
gh issue edit $ISSUE_NUMBER --add-label $PRE_LABEL_NAME --repo $REPO; | |
echo ':label: Issue ${{ github.event.issue.html_url }} has been tagged as `${{ env.PRE_LABEL_NAME }}`' >> $GITHUB_STEP_SUMMARY; | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
untag-reopened-issues: | |
runs-on: ubuntu-latest | |
if: ${{ github.event.issue.state_reason == 'reopened' }} | |
env: | |
REPO: ${{ github.event.repository.full_name }} | |
ISSUE_NUMBER: ${{ github.event.issue.number }} | |
steps: | |
- name: Untag Issue | |
run: | | |
gh issue edit $ISSUE_NUMBER --remove-label $PRE_LABEL_NAME --repo $REPO; | |
echo ':recycle: Issue ${{ github.event.issue.html_url }} has been untagged of `${{ env.PRE_LABEL_NAME }}`' >> $GITHUB_STEP_SUMMARY; | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
tag-merged-prs: | |
runs-on: ubuntu-latest | |
if: ${{ github.event.pull_request.merged }} | |
env: | |
REPO: ${{ github.event.repository.full_name }} | |
PR_NUMBER: ${{ github.event.pull_request.number }} | |
steps: | |
- name: Tag PR | |
run: | | |
gh pr edit $PR_NUMBER --add-label $PRE_LABEL_NAME --repo $REPO; | |
echo ':label: PR ${{ github.event.pull_request.html_url }} was merged and has been tagged as `${{ env.PRE_LABEL_NAME }}`' >> $GITHUB_STEP_SUMMARY; | |
env: | |
GITHUB_TOKEN: ${{ github.token }} |