Skip to content

Commit 3e96d63

Browse files
authored
Revert repo-sync to its old auto-merge strategy (#18189)
1 parent 052a540 commit 3e96d63

File tree

1 file changed

+1
-29
lines changed

1 file changed

+1
-29
lines changed

.github/workflows/repo-sync.yml

Lines changed: 1 addition & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
destination_branch: main
4141
pr_title: 'repo sync'
4242
pr_body: "This is an automated pull request to sync changes between the public and private repos.\n\n:robot: This pull request should be merged (not squashed) to preserve continuity across repos, so please let a bot do the merging!"
43-
pr_label: autoupdate,automated-reposync-pr
43+
pr_label: automerge,autoupdate,automated-reposync-pr
4444
github_token: ${{ secrets.OCTOMERGER_PAT_WITH_REPO_AND_WORKFLOW_SCOPE }}
4545

4646
- name: Find pull request
@@ -88,34 +88,6 @@ jobs:
8888
console.log(`Branch is already up-to-date`)
8989
}
9090
91-
- name: Enable GitHub auto-merge
92-
if: ${{ steps.find-pull-request.outputs.number }}
93-
uses: actions/github-script@626af12fe9a53dc2972b48385e7fe7dec79145c9
94-
with:
95-
github-token: ${{ secrets.GITHUB_TOKEN }}
96-
script: |
97-
const pull = await github.pulls.get({
98-
...context.repo,
99-
pull_number: parseInt(${{ steps.find-pull-request.outputs.number }})
100-
})
101-
102-
const pullNodeId = pull.data.node_id
103-
console.log(`Pull request GraphQL Node ID: ${pullNodeId}`)
104-
105-
const mutation = `mutation ($id: ID!) {
106-
enablePullRequestAutoMerge(input: {
107-
pullRequestId: $id,
108-
mergeMethod: MERGE
109-
}) {
110-
clientMutationId
111-
}
112-
}`
113-
const variables = {
114-
id: pullNodeId
115-
}
116-
await github.graphql(mutation, variables)
117-
console.log('Auto-merge enabled!')
118-
11991
- name: Send Slack notification if workflow fails
12092
uses: someimportantcompany/github-actions-slack-message@0b470c14b39da4260ed9e3f9a4f1298a74ccdefd
12193
if: failure()

0 commit comments

Comments
 (0)