The Free Software Media System - Server Backend & API
Add workflows for rebase and project automation
Fernando Fernández55700e0d1cc8
diff --git a/.github/dependabot.yml b/.github/dependabot.ymlindex 0874cae2e3..70bcd49737 100644--- a/.github/dependabot.yml+++ b/.github/dependabot.yml@@ -6,4 +6,10 @@ updates:interval: weeklytime: '12:00'open-pull-requests-limit: 10-++- package-ecosystem: github-actions+ directory: '/'+ schedule:+ interval: weekly+ time: '12:00'+ open-pull-requests-limit: 10diff --git a/.github/workflows/automation.yml b/.github/workflows/automation.ymlnew file mode 100644index 0000000000..db34693cc7--- /dev/null+++ b/.github/workflows/automation.yml@@ -0,0 +1,66 @@+name: Automation++on:+ pull_request:+ issues:+ issue_comment:++jobs:+ main:+ runs-on: ubuntu-latest+ steps:+ - name: Does PR has the stable backport label?+ uses: Dreamcodeio/[email protected]+ id: checkLabel+ with:+ label: stable backport++ - name: Remove from 'Current Release' project+ uses: alex-page/[email protected]+ if: (github.event.pull_request || github.event.issue.pull_request) && !steps.checkLabel.outputs.hasLabel+ continue-on-error: true+ with:+ project: Current Release+ action: delete+ repo-token: ${{ secrets.GH_TOKEN }}++ - name: Add to 'Release Next' project+ uses: alex-page/[email protected]+ 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+ repo-token: ${{ secrets.GH_TOKEN }}++ - name: Add to 'Current Release' project+ uses: alex-page/[email protected]+ if: (github.event.pull_request || github.event.issue.pull_request) && steps.checkLabel.outputs.hasLabel+ continue-on-error: true+ with:+ project: Current Release+ column: In progress+ repo-token: ${{ secrets.GH_TOKEN }}++ - 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+ uses: alex-page/[email protected]+ 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+ repo-token: ${{ secrets.GH_TOKEN }}++ - name: Add issue to triage project+ uses: alex-page/[email protected]+ if: github.event.issue.pull_request == '' && github.event.action == 'opened'+ continue-on-error: true+ with:+ project: Issue Triage for Main Repo+ column: Pending response+ repo-token: ${{ secrets.GH_TOKEN }}diff --git a/.github/workflows/merge-conflicts.yml b/.github/workflows/merge-conflicts.ymlnew file mode 100644index 0000000000..3740ce7a8a--- /dev/null+++ b/.github/workflows/merge-conflicts.yml@@ -0,0 +1,17 @@+name: 'Merge Conflicts'++on:+ push:+ branches:+ - master+ pull_request_target:+ types:+ - synchronize+jobs:+ triage:+ runs-on: ubuntu-latest+ steps:+ - uses: eps1lon/[email protected]+ with:+ dirtyLabel: 'merge conflict'+ repoToken: ${{ secrets.GH_TOKEN }}diff --git a/.github/workflows/rebase.yml b/.github/workflows/rebase.ymlnew file mode 100644index 0000000000..3172ec0d9f--- /dev/null+++ b/.github/workflows/rebase.yml@@ -0,0 +1,27 @@+name: Automatic Rebase+on:+ issue_comment:++jobs:+ rebase:+ name: Rebase+ if: github.event.issue.pull_request != '' && contains(github.event.comment.body, '@jellyfin-bot rebase') && github.event.comment.author_association == 'MEMBER'+ runs-on: ubuntu-latest+ steps:+ - name: Notify as seen+ uses: peter-evans/[email protected]+ with:+ token: ${{ secrets.GH_TOKEN }}+ comment-id: ${{ github.event.comment.id }}+ reactions: '+1'++ - name: Checkout the latest code+ uses: actions/checkout@v2+ with:+ token: ${{ secrets.GH_TOKEN }}+ fetch-depth: 0++ - name: Automatic Rebase+ uses: cirrus-actions/[email protected]+ env:+ GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}