From eb766a25e0036047ff389d5d11e7d700cc1f2637 Mon Sep 17 00:00:00 2001 From: Laukik Hase Date: Tue, 9 Nov 2021 12:09:10 +0530 Subject: [PATCH] gh_actions: Sync approved PRs to internal codebase - Changed trigger from pull_request_review to pull_request_target [labeled] --- .github/workflows/pr_approved.yml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/pr_approved.yml b/.github/workflows/pr_approved.yml index fb19ffeffe..3881355b1e 100644 --- a/.github/workflows/pr_approved.yml +++ b/.github/workflows/pr_approved.yml @@ -1,21 +1,23 @@ -name: GitHub PR to Internal Codebase Sync +name: Sync approved PRs to internal codebase on: - pull_request_review: - types: [submitted] + pull_request_target: + types: [labeled] jobs: sync_prs_to_internal_codebase: name: GitHub PR to Internal Codebase Sync runs-on: ubuntu-latest - if: github.event.review.state == 'approved' && (contains(github.event.review.body, '/rebase') || contains(github.event.review.body, '/merge')) + if: (github.event.label.name == 'PR-Sync-Merge') || + (github.event.label.name == 'PR-Sync-Rebase') || + (github.event.label.name == 'PR-Sync-Update') steps: - uses: actions/checkout@master - - name: GitHub PR to Internal Codebase Sync + - name: Sync approved PRs to internal codebase uses: espressif/github-actions/github_pr_to_internal_pr@master env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITLAB_URL: ${{ secrets.GITLAB_URL }} GITLAB_TOKEN: ${{ secrets.GITLAB_TOKEN }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GIT_CONFIG_NAME: ${{ secrets.GIT_CONFIG_NAME }} GIT_CONFIG_EMAIL: ${{ secrets.GIT_CONFIG_EMAIL }} JIRA_PROJECT: IDFGH