Skip to content

Commit 87699fd

Browse files
authored
repo sync
2 parents 772e573 + 62a8f70 commit 87699fd

13 files changed

Lines changed: 20775 additions & 2284 deletions

.github/allowed-actions.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ module.exports = [
3333
"rachmari/actions-add-new-issue-to-column@1a459ef92308ba7c9c9dc2fcdd72f232495574a9",
3434
"rachmari/labeler@832d42ec5523f3c6d46e8168de71cd54363e3e2e",
3535
"repo-sync/github-sync@3832fe8e2be32372e1b3970bbae8e7079edeec88",
36-
"repo-sync/pull-request@33777245b1aace1a58c87a29c90321aa7a74bd7d",
36+
"repo-sync/pull-request@65194d8015be7624d231796ddee1cd52a5023cb3", // repo-sync/pull-request@v2.6
3737
"someimportantcompany/github-actions-slack-message@0b470c14b39da4260ed9e3f9a4f1298a74ccdefd",
3838
"tjenkinson/gh-action-auto-merge-dependency-updates@4d7756c04d9d999c5968697a621b81c47f533d61",
3939
"EndBug/add-and-commit@9358097a71ad9fb9e2f9624c6098c89193d83575",

.github/workflows/repo-sync.yml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232

3333
- name: Create pull request
3434
id: create-pull
35-
uses: repo-sync/pull-request@33777245b1aace1a58c87a29c90321aa7a74bd7d
35+
uses: repo-sync/pull-request@65194d8015be7624d231796ddee1cd52a5023cb3
3636
env:
3737
GITHUB_TOKEN: ${{ secrets.OCTOMERGER_PAT_WITH_REPO_AND_WORKFLOW_SCOPE }}
3838
with:
@@ -52,6 +52,22 @@ jobs:
5252
base: main
5353
author: Octomerger
5454

55+
# Sometimes the `repo-sync` branch gets created but GitHub thinks a pull
56+
# request is already attached to the branch. This may happen when an
57+
# external contributor creates a pull request for the `repo-sync` branch
58+
# in a fork, then deletes their repository. If there were changes added
59+
# to the `repo-sync` branch but no pull request can be found, we should
60+
# fail. The failure will then be sent to Slack in the last step.
61+
- name: Check for pull request creation errors
62+
if: ${{ !steps.find-pull-request.outputs.number }}
63+
id: check-pr-creation
64+
run: |
65+
LINES_CHANGED=$(git diff --name-only "main" "repo-sync" -- | wc -l | awk '{print $1}')
66+
if [[ "$LINES_CHANGED" != "0" ]]; then
67+
echo 'Unable to create a new PR for the existing branch `repo-sync`. Delete that branch and re-run this workflow to generate a new PR.'
68+
exit 1 # prevents further steps from running
69+
fi
70+
5571
- name: Approve pull request
5672
if: ${{ steps.find-pull-request.outputs.number }}
5773
uses: juliangruber/approve-pull-request-action@c530832d4d346c597332e20e03605aa94fa150a8

lib/rest/static/decorated/api.github.com.json

Lines changed: 1537 additions & 43 deletions
Large diffs are not rendered by default.

lib/rest/static/decorated/ghes-2.22.json

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28669,12 +28669,13 @@
2866928669
},
2867028670
{
2867128671
"name": "run_id",
28672+
"description": "The id of the workflow run",
2867228673
"in": "path",
2867328674
"required": true,
2867428675
"schema": {
2867528676
"type": "integer"
2867628677
},
28677-
"descriptionHTML": ""
28678+
"descriptionHTML": "<p>The id of the workflow run</p>"
2867828679
}
2867928680
],
2868028681
"x-codeSamples": [
@@ -28748,12 +28749,13 @@
2874828749
},
2874928750
{
2875028751
"name": "run_id",
28752+
"description": "The id of the workflow run",
2875128753
"in": "path",
2875228754
"required": true,
2875328755
"schema": {
2875428756
"type": "integer"
2875528757
},
28756-
"descriptionHTML": ""
28758+
"descriptionHTML": "<p>The id of the workflow run</p>"
2875728759
}
2875828760
],
2875928761
"x-codeSamples": [
@@ -28826,12 +28828,13 @@
2882628828
},
2882728829
{
2882828830
"name": "run_id",
28831+
"description": "The id of the workflow run",
2882928832
"in": "path",
2883028833
"required": true,
2883128834
"schema": {
2883228835
"type": "integer"
2883328836
},
28834-
"descriptionHTML": ""
28837+
"descriptionHTML": "<p>The id of the workflow run</p>"
2883528838
},
2883628839
{
2883728840
"name": "per_page",
@@ -28925,12 +28928,13 @@
2892528928
},
2892628929
{
2892728930
"name": "run_id",
28931+
"description": "The id of the workflow run",
2892828932
"in": "path",
2892928933
"required": true,
2893028934
"schema": {
2893128935
"type": "integer"
2893228936
},
28933-
"descriptionHTML": ""
28937+
"descriptionHTML": "<p>The id of the workflow run</p>"
2893428938
}
2893528939
],
2893628940
"x-codeSamples": [
@@ -29003,12 +29007,13 @@
2900329007
},
2900429008
{
2900529009
"name": "run_id",
29010+
"description": "The id of the workflow run",
2900629011
"in": "path",
2900729012
"required": true,
2900829013
"schema": {
2900929014
"type": "integer"
2901029015
},
29011-
"descriptionHTML": ""
29016+
"descriptionHTML": "<p>The id of the workflow run</p>"
2901229017
},
2901329018
{
2901429019
"name": "filter",
@@ -29117,12 +29122,13 @@
2911729122
},
2911829123
{
2911929124
"name": "run_id",
29125+
"description": "The id of the workflow run",
2912029126
"in": "path",
2912129127
"required": true,
2912229128
"schema": {
2912329129
"type": "integer"
2912429130
},
29125-
"descriptionHTML": ""
29131+
"descriptionHTML": "<p>The id of the workflow run</p>"
2912629132
}
2912729133
],
2912829134
"x-codeSamples": [
@@ -29195,12 +29201,13 @@
2919529201
},
2919629202
{
2919729203
"name": "run_id",
29204+
"description": "The id of the workflow run",
2919829205
"in": "path",
2919929206
"required": true,
2920029207
"schema": {
2920129208
"type": "integer"
2920229209
},
29203-
"descriptionHTML": ""
29210+
"descriptionHTML": "<p>The id of the workflow run</p>"
2920429211
}
2920529212
],
2920629213
"x-codeSamples": [
@@ -29273,12 +29280,13 @@
2927329280
},
2927429281
{
2927529282
"name": "run_id",
29283+
"description": "The id of the workflow run",
2927629284
"in": "path",
2927729285
"required": true,
2927829286
"schema": {
2927929287
"type": "integer"
2928029288
},
29281-
"descriptionHTML": ""
29289+
"descriptionHTML": "<p>The id of the workflow run</p>"
2928229290
}
2928329291
],
2928429292
"x-codeSamples": [

lib/rest/static/decorated/ghes-3.0.json

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33009,12 +33009,13 @@
3300933009
},
3301033010
{
3301133011
"name": "run_id",
33012+
"description": "The id of the workflow run",
3301233013
"in": "path",
3301333014
"required": true,
3301433015
"schema": {
3301533016
"type": "integer"
3301633017
},
33017-
"descriptionHTML": ""
33018+
"descriptionHTML": "<p>The id of the workflow run</p>"
3301833019
}
3301933020
],
3302033021
"x-codeSamples": [
@@ -33088,12 +33089,13 @@
3308833089
},
3308933090
{
3309033091
"name": "run_id",
33092+
"description": "The id of the workflow run",
3309133093
"in": "path",
3309233094
"required": true,
3309333095
"schema": {
3309433096
"type": "integer"
3309533097
},
33096-
"descriptionHTML": ""
33098+
"descriptionHTML": "<p>The id of the workflow run</p>"
3309733099
}
3309833100
],
3309933101
"x-codeSamples": [
@@ -33166,12 +33168,13 @@
3316633168
},
3316733169
{
3316833170
"name": "run_id",
33171+
"description": "The id of the workflow run",
3316933172
"in": "path",
3317033173
"required": true,
3317133174
"schema": {
3317233175
"type": "integer"
3317333176
},
33174-
"descriptionHTML": ""
33177+
"descriptionHTML": "<p>The id of the workflow run</p>"
3317533178
},
3317633179
{
3317733180
"name": "per_page",
@@ -33265,12 +33268,13 @@
3326533268
},
3326633269
{
3326733270
"name": "run_id",
33271+
"description": "The id of the workflow run",
3326833272
"in": "path",
3326933273
"required": true,
3327033274
"schema": {
3327133275
"type": "integer"
3327233276
},
33273-
"descriptionHTML": ""
33277+
"descriptionHTML": "<p>The id of the workflow run</p>"
3327433278
}
3327533279
],
3327633280
"x-codeSamples": [
@@ -33343,12 +33347,13 @@
3334333347
},
3334433348
{
3334533349
"name": "run_id",
33350+
"description": "The id of the workflow run",
3334633351
"in": "path",
3334733352
"required": true,
3334833353
"schema": {
3334933354
"type": "integer"
3335033355
},
33351-
"descriptionHTML": ""
33356+
"descriptionHTML": "<p>The id of the workflow run</p>"
3335233357
},
3335333358
{
3335433359
"name": "filter",
@@ -33457,12 +33462,13 @@
3345733462
},
3345833463
{
3345933464
"name": "run_id",
33465+
"description": "The id of the workflow run",
3346033466
"in": "path",
3346133467
"required": true,
3346233468
"schema": {
3346333469
"type": "integer"
3346433470
},
33465-
"descriptionHTML": ""
33471+
"descriptionHTML": "<p>The id of the workflow run</p>"
3346633472
}
3346733473
],
3346833474
"x-codeSamples": [
@@ -33535,12 +33541,13 @@
3353533541
},
3353633542
{
3353733543
"name": "run_id",
33544+
"description": "The id of the workflow run",
3353833545
"in": "path",
3353933546
"required": true,
3354033547
"schema": {
3354133548
"type": "integer"
3354233549
},
33543-
"descriptionHTML": ""
33550+
"descriptionHTML": "<p>The id of the workflow run</p>"
3354433551
}
3354533552
],
3354633553
"x-codeSamples": [
@@ -33613,12 +33620,13 @@
3361333620
},
3361433621
{
3361533622
"name": "run_id",
33623+
"description": "The id of the workflow run",
3361633624
"in": "path",
3361733625
"required": true,
3361833626
"schema": {
3361933627
"type": "integer"
3362033628
},
33621-
"descriptionHTML": ""
33629+
"descriptionHTML": "<p>The id of the workflow run</p>"
3362233630
}
3362333631
],
3362433632
"x-codeSamples": [

0 commit comments

Comments
 (0)