Skip to content

Commit

Permalink
Fix dependecies PR automerge in zStream Branche
Browse files Browse the repository at this point in the history
  • Loading branch information
jyejare committed Sep 22, 2023
1 parent 4d632fc commit b19179d
Showing 1 changed file with 8 additions and 13 deletions.
21 changes: 8 additions & 13 deletions .github/workflows/auto_cherry_pick.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ env:
assignee: ${{ github.event.pull_request.assignee.login }}
title: ${{ github.event.pull_request.title }}
number: ${{ github.event.number }}
is_dependabot_pr: ''

jobs:

Expand Down Expand Up @@ -45,6 +46,12 @@ jobs:
with:
fetch-depth: 0

## Set env var for dependencies label PR
- name: Set env var is_dependabot_pr to `dependencies` to set the label
if: contains(github.event.pull_request.labels.*.name, 'dependencies')
run: |
echo "is_dependabot_pr=dependencies" >> $GITHUB_ENV
## CherryPicking and AutoMerging
- name: Cherrypicking to zStream branch
id: cherrypick
Expand All @@ -57,19 +64,7 @@ jobs:
Auto_Cherry_Picked
${{ matrix.label }}
No-CherryPick
assignees: ${{ env.assignee }}

- name: Add dependencies label, if merged pr author is dependabot[bot]
id: dependencies
if: |
contains(github.event.pull_request.labels.*.name, 'dependencies') &&
github.event.pull_request.user.login == 'dependabot[bot]'
uses: jyejare/github-cherry-pick-action@main
with:
token: ${{ secrets.CHERRYPICK_PAT }}
branch: ${{ matrix.label }}
labels: |
dependencies
${{ env.is_dependabot_pr }}
assignees: ${{ env.assignee }}

- name: Add Parent PR's PRT comment to Auto_Cherry_Picked PR's
Expand Down

0 comments on commit b19179d

Please sign in to comment.