From 19ad38ab902119c5704cf43e81bac2b2a5ed56f9 Mon Sep 17 00:00:00 2001 From: Joshua Li Date: Thu, 4 Nov 2021 12:33:48 -0700 Subject: [PATCH] Add dco and release drafter workflows Signed-off-by: Joshua Li --- .github/draft-release-notes-config.yml | 45 +++++++++++++++++++ .github/workflows/dco.yml | 18 ++++++++ .../draft-release-notes-workflow.yml | 21 +++++++++ 3 files changed, 84 insertions(+) create mode 100644 .github/draft-release-notes-config.yml create mode 100644 .github/workflows/dco.yml create mode 100644 .github/workflows/draft-release-notes-workflow.yml diff --git a/.github/draft-release-notes-config.yml b/.github/draft-release-notes-config.yml new file mode 100644 index 00000000..24a9d6e8 --- /dev/null +++ b/.github/draft-release-notes-config.yml @@ -0,0 +1,45 @@ +# The overall template of the release notes +template: | + Compatible with OpenSearch and OpenSearch Dashboards Version $RESOLVED_VERSION + $CHANGES + +# Setting the formatting and sorting for the release notes body +name-template: Version $RESOLVED_VERSION +change-template: "* $TITLE ([#$NUMBER](https://github.com/opensearch-project/dashboards-reports/pull/$NUMBER))" +sort-by: merged_at +sort-direction: ascending +replacers: + - search: '##' + replace: '###' + +# Organizing the tagged PRs into unified categories +categories: + - title: 'Breaking Changes' + labels: + - 'Breaking Changes' + - title: 'Features' + labels: + - 'feature' + - title: 'Enhancements' + labels: + - 'enhancement' + - title: 'Bug Fixes' + labels: + - 'bug' + - title: 'Infrastructure' + labels: + - 'infra' + - 'test' + - 'dependencies' + - 'github actions' + - title: 'Documentation' + labels: + - 'documentation' + - title: 'Maintenance' + labels: + - "version compatibility" + - "maintenance" + - title: 'Refactoring' + labels: + - 'refactor' + - 'code quality' diff --git a/.github/workflows/dco.yml b/.github/workflows/dco.yml new file mode 100644 index 00000000..cf30ea89 --- /dev/null +++ b/.github/workflows/dco.yml @@ -0,0 +1,18 @@ +name: Developer Certificate of Origin Check + +on: [pull_request] + +jobs: + check: + runs-on: ubuntu-latest + + steps: + - name: Get PR Commits + id: 'get-pr-commits' + uses: tim-actions/get-pr-commits@v1.1.0 + with: + token: ${{ secrets.GITHUB_TOKEN }} + - name: DCO Check + uses: tim-actions/dco@v1.1.0 + with: + commits: ${{ steps.get-pr-commits.outputs.commits }} diff --git a/.github/workflows/draft-release-notes-workflow.yml b/.github/workflows/draft-release-notes-workflow.yml new file mode 100644 index 00000000..a6832b7d --- /dev/null +++ b/.github/workflows/draft-release-notes-workflow.yml @@ -0,0 +1,21 @@ +name: Release Drafter + +on: + push: + branches: + - main + +jobs: + update_release_draft: + name: Update draft release notes + runs-on: ubuntu-latest + steps: + # Drafts your next Release notes as Pull Requests are merged into "main" + - name: Update draft release notes + uses: release-drafter/release-drafter@v5 + with: + config-name: draft-release-notes-config.yml + tag: (None) + version: 1.2.0.0 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}