diff --git a/.github/workflows/repo-sync.yml b/.github/workflows/repo-sync.yml index 804633901b74..eddc1d713097 100644 --- a/.github/workflows/repo-sync.yml +++ b/.github/workflows/repo-sync.yml @@ -44,6 +44,7 @@ jobs: github_token: ${{ secrets.OCTOMERGER_PAT_WITH_REPO_AND_WORKFLOW_SCOPE }} - name: Create pull request + id: create-pull uses: repo-sync/pull-request@33777245b1aace1a58c87a29c90321aa7a74bd7d env: GITHUB_TOKEN: ${{ secrets.OCTOMERGER_PAT_WITH_REPO_AND_WORKFLOW_SCOPE }} @@ -72,9 +73,10 @@ jobs: # There are cases where the branch becomes out-of-date in between the time this workflow began and when the pull request is created/updated - name: Update branch + if: ${{ steps.find-pull-request.outputs.number }} uses: actions/github-script@626af12fe9a53dc2972b48385e7fe7dec79145c9 with: - github-token: ${{secrets.GITHUB_TOKEN}} + github-token: ${{ secrets.GITHUB_TOKEN }} script: | const mainHeadSha = await github.git.getRef({ ...context.repo, @@ -84,13 +86,14 @@ jobs: const pull = await github.pulls.get({ ...context.repo, - pull_number: ${{ steps.find-pull-request.outputs.number }} + pull_number: parseInt(${{ steps.find-pull-request.outputs.number }}) }) + console.log(`Pull request base sha: ${pull.data.base.sha}`) - if (mainHeadSha.data.object.sha !== pull.data.base.sha) { + if (mainHeadSha.data.object.sha !== pull.data.base.sha || pull.data.mergeable_state === 'behind') { const updateBranch = await github.pulls.updateBranch({ ...context.repo, - pull_number: ${{ steps.find-pull-request.outputs.number }} + pull_number: parseInt(${{ steps.find-pull-request.outputs.number }}) }) console.log(updateBranch.data.message) } else { diff --git a/content/graphql/reference/enums.md b/content/graphql/reference/enums.md index f87cc2e4ccd3..50ff25548cab 100644 --- a/content/graphql/reference/enums.md +++ b/content/graphql/reference/enums.md @@ -2,6 +2,7 @@ title: Enums redirect_from: - /v4/enum + - /v4/reference/enum versions: free-pro-team: '*' enterprise-server: '*' diff --git a/content/graphql/reference/input-objects.md b/content/graphql/reference/input-objects.md index 423c6511c8b7..ad927ff2bbd6 100644 --- a/content/graphql/reference/input-objects.md +++ b/content/graphql/reference/input-objects.md @@ -2,6 +2,7 @@ title: Input objects redirect_from: - /v4/input_object + - /v4/reference/input_object versions: free-pro-team: '*' enterprise-server: '*' diff --git a/content/graphql/reference/interfaces.md b/content/graphql/reference/interfaces.md index bfc411d7967c..492e7b535c62 100644 --- a/content/graphql/reference/interfaces.md +++ b/content/graphql/reference/interfaces.md @@ -2,6 +2,7 @@ title: Interfaces redirect_from: - /v4/interface + - /v4/reference/interface versions: free-pro-team: '*' enterprise-server: '*' diff --git a/content/graphql/reference/mutations.md b/content/graphql/reference/mutations.md index e42955c3d30c..387dcd51ac14 100644 --- a/content/graphql/reference/mutations.md +++ b/content/graphql/reference/mutations.md @@ -2,6 +2,7 @@ title: Mutations redirect_from: - /v4/mutation + - /v4/reference/mutation versions: free-pro-team: '*' enterprise-server: '*' diff --git a/content/graphql/reference/objects.md b/content/graphql/reference/objects.md index 345786d5e1fc..7872b01baa65 100644 --- a/content/graphql/reference/objects.md +++ b/content/graphql/reference/objects.md @@ -2,6 +2,7 @@ title: Objects redirect_from: - /v4/object + - /v4/reference/object versions: free-pro-team: '*' enterprise-server: '*' diff --git a/content/graphql/reference/queries.md b/content/graphql/reference/queries.md index a2cc6af7b152..48b714cd4b40 100644 --- a/content/graphql/reference/queries.md +++ b/content/graphql/reference/queries.md @@ -3,6 +3,7 @@ title: Queries miniTocMaxHeadingLevel: 2 redirect_from: - /v4/query + - /v4/reference/query versions: free-pro-team: '*' enterprise-server: '*' diff --git a/content/graphql/reference/scalars.md b/content/graphql/reference/scalars.md index 338b4f42c7ee..2863a61f0de0 100644 --- a/content/graphql/reference/scalars.md +++ b/content/graphql/reference/scalars.md @@ -2,6 +2,7 @@ title: Scalars redirect_from: - /v4/scalar + - /v4/reference/scalar versions: free-pro-team: '*' enterprise-server: '*' diff --git a/content/graphql/reference/unions.md b/content/graphql/reference/unions.md index 5a87c63fc0a6..2c9b6a786244 100644 --- a/content/graphql/reference/unions.md +++ b/content/graphql/reference/unions.md @@ -2,6 +2,7 @@ title: Unions redirect_from: - /v4/union + - /v4/reference/union versions: free-pro-team: '*' enterprise-server: '*'