ayon-core/.github/workflows/project_actions.yml
2023-03-30 09:15:48 +02:00

72 lines
2.2 KiB
YAML

name: project-actions
on:
pull_request_target:
types: [opened, synchronize, assigned, review_requested]
pull_request_review:
types: [submitted]
jobs:
pr_review_requested:
name: pr_review_requested
runs-on: ubuntu-latest
if: github.event_name == 'pull_request_review' && github.event.review.state == 'changes_requested'
steps:
- name: Move PR to 'Change Requested'
uses: leonsteinhaeuser/project-beta-automations@v2.1.0
with:
gh_token: ${{ secrets.YNPUT_BOT_TOKEN }}
organization: ynput
project_id: 11
resource_node_id: ${{ github.event.pull_request.node_id }}
status_value: Change Requested
size-label:
name: pr_size_label
runs-on: ubuntu-latest
if: |
${{(github.event_name == 'pull_request' && github.event.action == 'synchronize')
|| (github.event_name == 'pull_request' && github.event.action == 'assigned')}}
steps:
- name: Add size label
uses: "pascalgn/size-label-action@v0.4.3"
env:
GITHUB_TOKEN: "${{ secrets.YNPUT_BOT_TOKEN }}"
IGNORED: ".gitignore\n*.md\n*.json"
with:
sizes: >
{
"0": "XS",
"100": "S",
"500": "M",
"1000": "L",
"1500": "XL",
"2500": "XXL"
}
label_prs_branch:
name: pr_branch_label
runs-on: ubuntu-latest
if: |
${{(github.event_name == 'pull_request' && github.event.action == 'synchronize')
|| (github.event_name == 'pull_request' && github.event.action == 'opened')}}
steps:
- name: Label PRs - Branch name detection
uses: ffittschen/pr-branch-labeler@v1
with:
repo-token: ${{ secrets.YNPUT_BOT_TOKEN }}
label_prs_globe:
name: pr_globe_label
runs-on: ubuntu-latest
if: |
${{(github.event_name == 'pull_request' && github.event.action == 'synchronize')
|| (github.event_name == 'pull_request' && github.event.action == 'opened')}}
steps:
- name: Label PRs - Globe detection
uses: actions/labeler@v4
with:
repo-token: ${{ secrets.YNPUT_BOT_TOKEN }}
configuration-path: ".github/pr-glob-labeler.yml"
sync-labels: false