2021-03-09 20:13:27 +00:00
|
|
|
name: Automation
|
|
|
|
|
|
|
|
on:
|
2021-05-31 19:54:51 +00:00
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
2021-05-30 22:35:35 +00:00
|
|
|
pull_request_target:
|
2021-05-31 19:54:51 +00:00
|
|
|
issue_comment:
|
2021-03-09 20:13:27 +00:00
|
|
|
|
|
|
|
jobs:
|
2021-05-31 19:54:51 +00:00
|
|
|
label:
|
|
|
|
name: Labeling
|
2021-03-09 20:13:27 +00:00
|
|
|
runs-on: ubuntu-latest
|
2021-06-20 17:42:52 +00:00
|
|
|
if: ${{ github.repository == 'jellyfin/jellyfin' }}
|
2021-03-09 20:13:27 +00:00
|
|
|
steps:
|
2021-05-31 19:54:51 +00:00
|
|
|
- name: Apply label
|
|
|
|
uses: eps1lon/actions-label-merge-conflict@v2.0.1
|
|
|
|
if: ${{ github.event_name == 'push' || github.event_name == 'pull_request_target'}}
|
2021-03-09 20:13:27 +00:00
|
|
|
with:
|
2021-05-31 19:54:51 +00:00
|
|
|
dirtyLabel: 'merge conflict'
|
|
|
|
repoToken: ${{ secrets.JF_BOT_TOKEN }}
|
2021-03-09 20:13:27 +00:00
|
|
|
|
2021-05-31 19:54:51 +00:00
|
|
|
project:
|
|
|
|
name: Project board
|
|
|
|
runs-on: ubuntu-latest
|
2021-06-20 17:42:52 +00:00
|
|
|
if: ${{ github.repository == 'jellyfin/jellyfin' }}
|
2021-05-31 19:54:51 +00:00
|
|
|
steps:
|
2021-03-09 20:13:27 +00:00
|
|
|
- name: Remove from 'Current Release' project
|
2021-07-19 12:03:27 +00:00
|
|
|
uses: alex-page/github-project-automation-plus@v0.8.1
|
2021-05-31 19:54:51 +00:00
|
|
|
if: (github.event.pull_request || github.event.issue.pull_request) && !contains(github.event.*.labels.*.name, 'stable backport')
|
2021-03-09 20:13:27 +00:00
|
|
|
continue-on-error: true
|
|
|
|
with:
|
|
|
|
project: Current Release
|
|
|
|
action: delete
|
2021-05-12 19:06:53 +00:00
|
|
|
repo-token: ${{ secrets.JF_BOT_TOKEN }}
|
2021-03-09 20:13:27 +00:00
|
|
|
|
|
|
|
- name: Add to 'Release Next' project
|
2021-07-19 12:03:27 +00:00
|
|
|
uses: alex-page/github-project-automation-plus@v0.8.1
|
2021-03-09 20:13:27 +00:00
|
|
|
if: (github.event.pull_request || github.event.issue.pull_request) && github.event.action == 'opened'
|
|
|
|
continue-on-error: true
|
|
|
|
with:
|
|
|
|
project: Release Next
|
|
|
|
column: In progress
|
2021-05-12 19:06:53 +00:00
|
|
|
repo-token: ${{ secrets.JF_BOT_TOKEN }}
|
2021-03-09 20:13:27 +00:00
|
|
|
|
|
|
|
- name: Add to 'Current Release' project
|
2021-07-19 12:03:27 +00:00
|
|
|
uses: alex-page/github-project-automation-plus@v0.8.1
|
2021-05-31 19:54:51 +00:00
|
|
|
if: (github.event.pull_request || github.event.issue.pull_request) && !contains(github.event.*.labels.*.name, 'stable backport')
|
2021-03-09 20:13:27 +00:00
|
|
|
continue-on-error: true
|
|
|
|
with:
|
|
|
|
project: Current Release
|
|
|
|
column: In progress
|
2021-05-12 19:06:53 +00:00
|
|
|
repo-token: ${{ secrets.JF_BOT_TOKEN }}
|
2021-03-09 20:13:27 +00:00
|
|
|
|
|
|
|
- name: Check number of comments from the team member
|
|
|
|
if: github.event.issue.pull_request == '' && github.event.comment.author_association == 'MEMBER'
|
|
|
|
id: member_comments
|
|
|
|
run: echo "::set-output name=number::$(curl -s ${{ github.event.issue.comments_url }} | jq '.[] | select(.author_association == "MEMBER") | .author_association' | wc -l)"
|
|
|
|
|
|
|
|
- name: Move issue to needs triage
|
2021-07-19 12:03:27 +00:00
|
|
|
uses: alex-page/github-project-automation-plus@v0.8.1
|
2021-03-09 20:13:27 +00:00
|
|
|
if: github.event.issue.pull_request == '' && github.event.comment.author_association == 'MEMBER' && steps.member_comments.outputs.number <= 1
|
|
|
|
continue-on-error: true
|
|
|
|
with:
|
|
|
|
project: Issue Triage for Main Repo
|
|
|
|
column: Needs triage
|
2021-05-12 19:06:53 +00:00
|
|
|
repo-token: ${{ secrets.JF_BOT_TOKEN }}
|
2021-03-09 20:13:27 +00:00
|
|
|
|
|
|
|
- name: Add issue to triage project
|
2021-07-19 12:03:27 +00:00
|
|
|
uses: alex-page/github-project-automation-plus@v0.8.1
|
2021-03-09 20:13:27 +00:00
|
|
|
if: github.event.issue.pull_request == '' && github.event.action == 'opened'
|
|
|
|
continue-on-error: true
|
|
|
|
with:
|
|
|
|
project: Issue Triage for Main Repo
|
|
|
|
column: Pending response
|
2021-05-12 19:06:53 +00:00
|
|
|
repo-token: ${{ secrets.JF_BOT_TOKEN }}
|