Skip to content

Commit

Permalink
Update sync_opal_plus.yml (#651)
Browse files Browse the repository at this point in the history
* Update sync_opal_plus.yml

* Fixed pre-commit
  • Loading branch information
danyi1212 authored Sep 1, 2024
1 parent b55bb50 commit 8726380
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion .github/workflows/sync_opal_plus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,15 @@ jobs:
- name: Create Pull Request for opal-plus
working-directory: opal-plus
run: |
gh pr create --repo permitio/opal-plus --assignee "$GITHUB_ACTOR" --reviewer "$GITHUB_ACTOR" --base master --head public-${{ github.ref_name }} --title "Sync changes from public OPAL repository" --body "This PR synchronizes changes from the public OPAL repository to the private OPAL Plus repository."
set -e
PR_NUMBER=$(gh pr list --repo permitio/opal-plus --base master --head public-master --json number --jq '.[0].number')
if [ -n "$PR_NUMBER" ]; then
echo "PR already exists: #$PR_NUMBER"
gh pr review --repo permitio/opal-plus --request-reviewer "$GITHUB_ACTOR" "$PR_NUMBER" || true
else
gh pr create --repo permitio/opal-plus --assignee "$GITHUB_ACTOR" --reviewer "$GITHUB_ACTOR" --base master --head public-master --title "Sync changes from public OPAL repository" --body "This PR synchronizes changes from the public OPAL repository to the private OPAL Plus repository." || true
echo "New PR created."
fi
shell: bash
env:
GITHUB_TOKEN: ${{ steps.get_workflow_token.outputs.token }}

0 comments on commit 8726380

Please sign in to comment.