From c4f63908664ce4cf5d0332102e2c740f320962d2 Mon Sep 17 00:00:00 2001 From: Vishwas Shashidhar Date: Fri, 18 Dec 2020 20:50:18 +0530 Subject: [PATCH] consolidate github actions (#1158) --- .github/PULL_REQUEST_TEMPLATE.md | 11 +---------- .github/release-drafter.yml | 14 ------------- .github/workflows/assign.yml | 8 ++++++++ .github/workflows/automerge.yml | 27 -------------------------- .github/workflows/jira-description.yml | 19 ++++++++++++++++++ .github/workflows/review-reminder.yml | 19 ++++++++++++++++++ .github/workflows/stats.yml | 16 +++++++++++++++ 7 files changed, 63 insertions(+), 51 deletions(-) delete mode 100644 .github/release-drafter.yml create mode 100644 .github/workflows/assign.yml delete mode 100644 .github/workflows/automerge.yml create mode 100644 .github/workflows/jira-description.yml create mode 100644 .github/workflows/review-reminder.yml create mode 100644 .github/workflows/stats.yml diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index bf47695b..78bf6856 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,14 +1,5 @@ ## Description -A few sentences describing the overall goals of the pull request's commits. -Describe the problem or feature in addition to a link to the + [JIRA-ticket](https://perzoinc.atlassian.net/browse/JIRA-ticket) -## Solution Approach -Describe the approach you've taken to implement this change / resolve the issue - ## Related PRs -List related PRs against other branches/repositories: - -branch | PR ------- | ------ -other_pr_dev | [link]() diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml deleted file mode 100644 index 5ac83fa6..00000000 --- a/.github/release-drafter.yml +++ /dev/null @@ -1,14 +0,0 @@ -name-template: 'v$NEXT_PATCH_VERSION 🌈' -tag-template: 'v$NEXT_PATCH_VERSION' -categories: - - title: '🚀 Features' - label: 'feature' - - title: '🐛 Bug Fixes' - label: 'fix' - - title: '🧰 Maintenance' - label: 'chore' -change-template: '- $TITLE @$AUTHOR (#$NUMBER)' -template: | - ## Changes - - $CHANGES \ No newline at end of file diff --git a/.github/workflows/assign.yml b/.github/workflows/assign.yml new file mode 100644 index 00000000..631f7f3e --- /dev/null +++ b/.github/workflows/assign.yml @@ -0,0 +1,8 @@ +name: 'Auto Assign' +on: pull_request_target + +jobs: + add-reviews: + runs-on: ubuntu-latest + steps: + - uses: kentaro-m/auto-assign-action@v1.1.2 diff --git a/.github/workflows/automerge.yml b/.github/workflows/automerge.yml deleted file mode 100644 index 93081ee6..00000000 --- a/.github/workflows/automerge.yml +++ /dev/null @@ -1,27 +0,0 @@ -name: automerge -on: - pull_request: - types: - - labeled - - unlabeled - - synchronize - - opened - - edited - - ready_for_review - - reopened - - unlocked - pull_request_review: - types: - - submitted - check_suite: - types: - - completed - status: {} -jobs: - automerge: - runs-on: ubuntu-latest - steps: - - name: automerge - uses: "pascalgn/automerge-action@v0.11.0" - env: - GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" diff --git a/.github/workflows/jira-description.yml b/.github/workflows/jira-description.yml new file mode 100644 index 00000000..a442173f --- /dev/null +++ b/.github/workflows/jira-description.yml @@ -0,0 +1,19 @@ +name: JIRA Description + +on: + pull_request_target: + types: [opened, edited] + +jobs: + add-jira-description: + runs-on: ubuntu-latest + steps: + - uses: cakeinpanic/jira-description-action@v0.2.0 + name: jira-description-action + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + jira-token: ${{ secrets.JIRA_TOKEN }} + jira-base-url: ${{ secrets.JIRA_BASE_URL }} + custom-issue-number-regexp: '^\d+' + jira-project-name: 'SDA' + use: 'both' diff --git a/.github/workflows/review-reminder.yml b/.github/workflows/review-reminder.yml new file mode 100644 index 00000000..1ce0a706 --- /dev/null +++ b/.github/workflows/review-reminder.yml @@ -0,0 +1,19 @@ +name: Review Reminder +on: + schedule: + - cron: '*/9 * * * *' + +jobs: + deploy: + name: Review reminders + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v2 + + - uses: blombard/review-reminder@master + with: + token: "${{ secrets.GITHUB_TOKEN }}" + reminder-comment: "Don't forget to review this PR !" + days-before-reminder: '1' diff --git a/.github/workflows/stats.yml b/.github/workflows/stats.yml new file mode 100644 index 00000000..8f8b894b --- /dev/null +++ b/.github/workflows/stats.yml @@ -0,0 +1,16 @@ +name: Pull Request Stats + +on: pull_request_target + +jobs: + stats: + runs-on: ubuntu-latest + steps: + - name: Run pull request stats + uses: flowwer-dev/pull-request-stats@v1 + with: + token: ${{ secrets.GITHUB_TOKEN }} + repositories: 'symphonyoss/SymphonyElectron' + period: 90 + charts: true + sort-by: 'COMMENTS'