π₯π₯π₯ Open-source Jira, Linear, Monday, and ClickUp alternative. Plane is a modern project management platform to manage tasks, sprints, docs, and triage.
TypeScript boardsbug-trackerdjangodockerganttissue-trackerjirajira-alternativekanbanlinearpostgresqlproduct-managementproject-managementproject-planningpythonreactredistypesciptvitework-management
fix: workflow sync fixes (#5594)
sriram veeraghanta5f1939cdebff
diff --git a/.github/workflows/create-sync-pr.yml b/.github/workflows/create-sync-pr.ymlindex 24c4fb9954..46f6365fd9 100644--- a/.github/workflows/create-sync-pr.yml+++ b/.github/workflows/create-sync-pr.yml@@ -8,7 +8,6 @@ on:env:CURRENT_BRANCH: ${{ github.ref_name }}- SOURCE_BRANCH: ${{ vars.SYNC_SOURCE_BRANCH_NAME }} # The sync branch such as "sync/ce"TARGET_BRANCH: ${{ vars.SYNC_TARGET_BRANCH_NAME }} # The target branch that you would like to merge changes like developGITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }} # Personal access token required to modify contents and workflowsREVIEWER: ${{ vars.SYNC_PR_REVIEWER }}@@ -16,22 +15,7 @@ env:ACCOUNT_USER_EMAIL: ${{ vars.ACCOUNT_USER_EMAIL }}jobs:- Check_Branch:- runs-on: ubuntu-latest- outputs:- BRANCH_MATCH: ${{ steps.check-branch.outputs.MATCH }}- steps:- - name: Check if current branch matches the secret- id: check-branch- run: |- if [ "$CURRENT_BRANCH" = "$SOURCE_BRANCH" ]; then- echo "MATCH=true" >> $GITHUB_OUTPUT- else- echo "MATCH=false" >> $GITHUB_OUTPUT- fiCreate_PR:- if: ${{ needs.Check_Branch.outputs.BRANCH_MATCH == 'true' }}- needs: [Check_Branch]runs-on: ubuntu-latestpermissions:pull-requests: write@@ -59,11 +43,11 @@ jobs:- name: Create PR to Target Branchrun: |# get all pull requests and check if there is already a PR- PR_EXISTS=$(gh pr list --base $TARGET_BRANCH --head $SOURCE_BRANCH --state open --json number | jq '.[] | .number')+ PR_EXISTS=$(gh pr list --base $TARGET_BRANCH --head $CURRENT_BRANCH --state open --json number | jq '.[] | .number')if [ -n "$PR_EXISTS" ]; thenecho "Pull Request already exists: $PR_EXISTS"elseecho "Creating new pull request"- PR_URL=$(gh pr create --base $TARGET_BRANCH --head $SOURCE_BRANCH --title "sync: community changes" --body "")+ PR_URL=$(gh pr create --base $TARGET_BRANCH --head $CURRENT_BRANCH --title "sync: community changes" --body "")echo "Pull Request created: $PR_URL"fidiff --git a/.github/workflows/repo-sync.yml b/.github/workflows/repo-sync.ymlindex 9ac4771ef6..2c211cf318 100644--- a/.github/workflows/repo-sync.yml+++ b/.github/workflows/repo-sync.yml@@ -35,8 +35,9 @@ jobs:env:GH_TOKEN: ${{ secrets.ACCESS_TOKEN }}run: |+ RUN_ID="${{ github.run_id }}"TARGET_REPO="${{ vars.SYNC_TARGET_REPO }}"- TARGET_BRANCH="${{ vars.SYNC_TARGET_BRANCH_NAME }}"+ TARGET_BRANCH="sync/${RUN_ID}"SOURCE_BRANCH="${{ env.SOURCE_BRANCH_NAME }}"git checkout $SOURCE_BRANCH