Skip to content

Commit

Permalink
Temporary patch broken spec files after download until github/rest-ap…
Browse files Browse the repository at this point in the history
…i-description#2609 has been resolved
  • Loading branch information
WyriHaximus committed Jul 4, 2023
1 parent efce7d9 commit 1f26fa3
Show file tree
Hide file tree
Showing 15 changed files with 33 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/generate-GitHub.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ jobs:
rm etc/specs/GitHub/previous.spec.yaml || true
mv etc/specs/GitHub/current.spec.yaml etc/specs/GitHub/previous.spec.yaml
curl -o etc/specs/GitHub/current.spec.yaml https://raw.githubusercontent.com/github/rest-api-description/main/descriptions-next/api.github.com/api.github.com.yaml
php utils/patch-broken-spec-files.php etc/specs/GitHub/current.spec.yaml
- name: Hash specs
id: spec-hash
run: |
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/generate-GitHubAE.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ jobs:
rm etc/specs/GitHubAE/previous.spec.yaml || true
mv etc/specs/GitHubAE/current.spec.yaml etc/specs/GitHubAE/previous.spec.yaml
curl -o etc/specs/GitHubAE/current.spec.yaml https://raw.githubusercontent.com/github/rest-api-description/main/descriptions-next/github.ae/github.ae.yaml
php utils/patch-broken-spec-files.php etc/specs/GitHubAE/current.spec.yaml
- name: Hash specs
id: spec-hash
run: |
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/generate-GitHubEnterprise-3.0.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ jobs:
rm etc/specs/GitHubEnterprise-3.0/previous.spec.yaml || true
mv etc/specs/GitHubEnterprise-3.0/current.spec.yaml etc/specs/GitHubEnterprise-3.0/previous.spec.yaml
curl -o etc/specs/GitHubEnterprise-3.0/current.spec.yaml https://raw.githubusercontent.com/github/rest-api-description/main/descriptions-next/ghes-3.0/ghes-3.0.yaml
php utils/patch-broken-spec-files.php etc/specs/GitHubEnterprise-3.0/current.spec.yaml
- name: Hash specs
id: spec-hash
run: |
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/generate-GitHubEnterprise-3.1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ jobs:
rm etc/specs/GitHubEnterprise-3.1/previous.spec.yaml || true
mv etc/specs/GitHubEnterprise-3.1/current.spec.yaml etc/specs/GitHubEnterprise-3.1/previous.spec.yaml
curl -o etc/specs/GitHubEnterprise-3.1/current.spec.yaml https://raw.githubusercontent.com/github/rest-api-description/main/descriptions-next/ghes-3.1/ghes-3.1.yaml
php utils/patch-broken-spec-files.php etc/specs/GitHubEnterprise-3.1/current.spec.yaml
- name: Hash specs
id: spec-hash
run: |
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/generate-GitHubEnterprise-3.2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ jobs:
rm etc/specs/GitHubEnterprise-3.2/previous.spec.yaml || true
mv etc/specs/GitHubEnterprise-3.2/current.spec.yaml etc/specs/GitHubEnterprise-3.2/previous.spec.yaml
curl -o etc/specs/GitHubEnterprise-3.2/current.spec.yaml https://raw.githubusercontent.com/github/rest-api-description/main/descriptions-next/ghes-3.2/ghes-3.2.yaml
php utils/patch-broken-spec-files.php etc/specs/GitHubEnterprise-3.2/current.spec.yaml
- name: Hash specs
id: spec-hash
run: |
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/generate-GitHubEnterprise-3.3.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ jobs:
rm etc/specs/GitHubEnterprise-3.3/previous.spec.yaml || true
mv etc/specs/GitHubEnterprise-3.3/current.spec.yaml etc/specs/GitHubEnterprise-3.3/previous.spec.yaml
curl -o etc/specs/GitHubEnterprise-3.3/current.spec.yaml https://raw.githubusercontent.com/github/rest-api-description/main/descriptions-next/ghes-3.3/ghes-3.3.yaml
php utils/patch-broken-spec-files.php etc/specs/GitHubEnterprise-3.3/current.spec.yaml
- name: Hash specs
id: spec-hash
run: |
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/generate-GitHubEnterprise-3.4.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ jobs:
rm etc/specs/GitHubEnterprise-3.4/previous.spec.yaml || true
mv etc/specs/GitHubEnterprise-3.4/current.spec.yaml etc/specs/GitHubEnterprise-3.4/previous.spec.yaml
curl -o etc/specs/GitHubEnterprise-3.4/current.spec.yaml https://raw.githubusercontent.com/github/rest-api-description/main/descriptions-next/ghes-3.4/ghes-3.4.yaml
php utils/patch-broken-spec-files.php etc/specs/GitHubEnterprise-3.4/current.spec.yaml
- name: Hash specs
id: spec-hash
run: |
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/generate-GitHubEnterprise-3.5.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ jobs:
rm etc/specs/GitHubEnterprise-3.5/previous.spec.yaml || true
mv etc/specs/GitHubEnterprise-3.5/current.spec.yaml etc/specs/GitHubEnterprise-3.5/previous.spec.yaml
curl -o etc/specs/GitHubEnterprise-3.5/current.spec.yaml https://raw.githubusercontent.com/github/rest-api-description/main/descriptions-next/ghes-3.5/ghes-3.5.yaml
php utils/patch-broken-spec-files.php etc/specs/GitHubEnterprise-3.5/current.spec.yaml
- name: Hash specs
id: spec-hash
run: |
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/generate-GitHubEnterprise-3.6.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ jobs:
rm etc/specs/GitHubEnterprise-3.6/previous.spec.yaml || true
mv etc/specs/GitHubEnterprise-3.6/current.spec.yaml etc/specs/GitHubEnterprise-3.6/previous.spec.yaml
curl -o etc/specs/GitHubEnterprise-3.6/current.spec.yaml https://raw.githubusercontent.com/github/rest-api-description/main/descriptions-next/ghes-3.6/ghes-3.6.yaml
php utils/patch-broken-spec-files.php etc/specs/GitHubEnterprise-3.6/current.spec.yaml
- name: Hash specs
id: spec-hash
run: |
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/generate-GitHubEnterprise-3.7.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ jobs:
rm etc/specs/GitHubEnterprise-3.7/previous.spec.yaml || true
mv etc/specs/GitHubEnterprise-3.7/current.spec.yaml etc/specs/GitHubEnterprise-3.7/previous.spec.yaml
curl -o etc/specs/GitHubEnterprise-3.7/current.spec.yaml https://raw.githubusercontent.com/github/rest-api-description/main/descriptions-next/ghes-3.7/ghes-3.7.yaml
php utils/patch-broken-spec-files.php etc/specs/GitHubEnterprise-3.7/current.spec.yaml
- name: Hash specs
id: spec-hash
run: |
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/generate-GitHubEnterprise-3.8.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ jobs:
rm etc/specs/GitHubEnterprise-3.8/previous.spec.yaml || true
mv etc/specs/GitHubEnterprise-3.8/current.spec.yaml etc/specs/GitHubEnterprise-3.8/previous.spec.yaml
curl -o etc/specs/GitHubEnterprise-3.8/current.spec.yaml https://raw.githubusercontent.com/github/rest-api-description/main/descriptions-next/ghes-3.8/ghes-3.8.yaml
php utils/patch-broken-spec-files.php etc/specs/GitHubEnterprise-3.8/current.spec.yaml
- name: Hash specs
id: spec-hash
run: |
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/generate-GitHubEnterprise-3.9.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ jobs:
rm etc/specs/GitHubEnterprise-3.9/previous.spec.yaml || true
mv etc/specs/GitHubEnterprise-3.9/current.spec.yaml etc/specs/GitHubEnterprise-3.9/previous.spec.yaml
curl -o etc/specs/GitHubEnterprise-3.9/current.spec.yaml https://raw.githubusercontent.com/github/rest-api-description/main/descriptions-next/ghes-3.9/ghes-3.9.yaml
php utils/patch-broken-spec-files.php etc/specs/GitHubEnterprise-3.9/current.spec.yaml
- name: Hash specs
id: spec-hash
run: |
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/generate-GitHubEnterpriseCloud.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ jobs:
rm etc/specs/GitHubEnterpriseCloud/previous.spec.yaml || true
mv etc/specs/GitHubEnterpriseCloud/current.spec.yaml etc/specs/GitHubEnterpriseCloud/previous.spec.yaml
curl -o etc/specs/GitHubEnterpriseCloud/current.spec.yaml https://raw.githubusercontent.com/github/rest-api-description/main/descriptions-next/ghec/ghec.yaml
php utils/patch-broken-spec-files.php etc/specs/GitHubEnterpriseCloud/current.spec.yaml
- name: Hash specs
id: spec-hash
run: |
Expand Down
1 change: 1 addition & 0 deletions etc/workflow-skeleton/generate-{{ path }}.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ jobs:
rm etc/specs/{{ path }}/previous.spec.yaml || true
mv etc/specs/{{ path }}/current.spec.yaml etc/specs/{{ path }}/previous.spec.yaml
curl -o etc/specs/{{ path }}/current.spec.yaml {{ specUrl }}
php utils/patch-broken-spec-files.php etc/specs/{{ path }}/current.spec.yaml
- name: Hash specs
id: spec-hash
run: |
Expand Down
19 changes: 19 additions & 0 deletions utils/patch-broken-spec-files.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?php

file_put_contents(
$argv[1],
str_replace(
[
" description: 'A group of pull requests that the merge queue has grouped together
to be merged.
'"
],
[
" description: 'A group of pull requests that the merge queue has grouped together to be merged.'"
],
file_get_contents(
$argv[1],
),
),
);

0 comments on commit 1f26fa3

Please sign in to comment.