From 4f66eb8ab9f11d2478782a201e3485a45b49e4c6 Mon Sep 17 00:00:00 2001 From: Sayali Gaikawad <61760125+gaiksaya@users.noreply.github.com> Date: Wed, 8 Mar 2023 12:33:39 -0800 Subject: [PATCH] Add 2PR approval to release workflow (#306) * Add 2PR approval to release workflow Signed-off-by: Sayali Gaikawad * Update .github/workflows/release-drafter.yml Signed-off-by: Sayali Gaikawad Co-authored-by: Harsha Vamsi Kalluri --------- Signed-off-by: Sayali Gaikawad Co-authored-by: Harsha Vamsi Kalluri --- .github/workflows/release-drafter.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml index 84c4d0d9..3c17bc3e 100644 --- a/.github/workflows/release-drafter.yml +++ b/.github/workflows/release-drafter.yml @@ -11,6 +11,17 @@ jobs: steps: - name: Checkout Repository uses: actions/checkout@v3 + - id: get_approvers + run: | + echo "approvers=$(cat .github/CODEOWNERS | grep @ | tr -d '* ' | sed 's/@/,/g' | sed 's/,//1')" >> $GITHUB_OUTPUT + - uses: trstringer/manual-approval@v1 + with: + secret: ${{ github.TOKEN }} + approvers: ${{ steps.get_approvers.outputs.approvers }} + minimum-approvals: 2 + issue-title: 'Release opensearch-py' + issue-body: "Please approve or deny the release of opensearch-py. **Tag**: ${{ github.ref_name }} **Commit**: ${{ github.sha }}" + exclude-workflow-initiator-as-approver: true - name: Set up Python 3 uses: actions/setup-python@v3 with: