Skip to content

Commit b579486

Browse files
authored
repo sync
2 parents c0686ba + eeb2b59 commit b579486

9 files changed

Lines changed: 15 additions & 4 deletions

File tree

.github/workflows/repo-sync.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ jobs:
4444
github_token: ${{ secrets.OCTOMERGER_PAT_WITH_REPO_AND_WORKFLOW_SCOPE }}
4545

4646
- name: Create pull request
47+
id: create-pull
4748
uses: repo-sync/pull-request@33777245b1aace1a58c87a29c90321aa7a74bd7d
4849
env:
4950
GITHUB_TOKEN: ${{ secrets.OCTOMERGER_PAT_WITH_REPO_AND_WORKFLOW_SCOPE }}
@@ -72,9 +73,10 @@ jobs:
7273

7374
# 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
7475
- name: Update branch
76+
if: ${{ steps.find-pull-request.outputs.number }}
7577
uses: actions/github-script@626af12fe9a53dc2972b48385e7fe7dec79145c9
7678
with:
77-
github-token: ${{secrets.GITHUB_TOKEN}}
79+
github-token: ${{ secrets.GITHUB_TOKEN }}
7880
script: |
7981
const mainHeadSha = await github.git.getRef({
8082
...context.repo,
@@ -84,13 +86,14 @@ jobs:
8486
8587
const pull = await github.pulls.get({
8688
...context.repo,
87-
pull_number: ${{ steps.find-pull-request.outputs.number }}
89+
pull_number: parseInt(${{ steps.find-pull-request.outputs.number }})
8890
})
91+
console.log(`Pull request base sha: ${pull.data.base.sha}`)
8992
90-
if (mainHeadSha.data.object.sha !== pull.data.base.sha) {
93+
if (mainHeadSha.data.object.sha !== pull.data.base.sha || pull.data.mergeable_state === 'behind') {
9194
const updateBranch = await github.pulls.updateBranch({
9295
...context.repo,
93-
pull_number: ${{ steps.find-pull-request.outputs.number }}
96+
pull_number: parseInt(${{ steps.find-pull-request.outputs.number }})
9497
})
9598
console.log(updateBranch.data.message)
9699
} else {

content/graphql/reference/enums.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
title: Enums
33
redirect_from:
44
- /v4/enum
5+
- /v4/reference/enum
56
versions:
67
free-pro-team: '*'
78
enterprise-server: '*'

content/graphql/reference/input-objects.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
title: Input objects
33
redirect_from:
44
- /v4/input_object
5+
- /v4/reference/input_object
56
versions:
67
free-pro-team: '*'
78
enterprise-server: '*'

content/graphql/reference/interfaces.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
title: Interfaces
33
redirect_from:
44
- /v4/interface
5+
- /v4/reference/interface
56
versions:
67
free-pro-team: '*'
78
enterprise-server: '*'

content/graphql/reference/mutations.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
title: Mutations
33
redirect_from:
44
- /v4/mutation
5+
- /v4/reference/mutation
56
versions:
67
free-pro-team: '*'
78
enterprise-server: '*'

content/graphql/reference/objects.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
title: Objects
33
redirect_from:
44
- /v4/object
5+
- /v4/reference/object
56
versions:
67
free-pro-team: '*'
78
enterprise-server: '*'

content/graphql/reference/queries.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ title: Queries
33
miniTocMaxHeadingLevel: 2
44
redirect_from:
55
- /v4/query
6+
- /v4/reference/query
67
versions:
78
free-pro-team: '*'
89
enterprise-server: '*'

content/graphql/reference/scalars.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
title: Scalars
33
redirect_from:
44
- /v4/scalar
5+
- /v4/reference/scalar
56
versions:
67
free-pro-team: '*'
78
enterprise-server: '*'

content/graphql/reference/unions.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
title: Unions
33
redirect_from:
44
- /v4/union
5+
- /v4/reference/union
56
versions:
67
free-pro-team: '*'
78
enterprise-server: '*'

0 commit comments

Comments
 (0)