File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,38 +12,10 @@ jobs:
1212 steps :
1313 - uses : actions/checkout@v4
1414
15- - name : Check for "Skip Readme"
16- id : check_rdme
17- uses : actions/github-script@v7
18- with :
19- script : |
20- // Get the list of PRs merged into the current commit
21- const { data: prs } = await github.rest.repos.listPullRequestsAssociatedWithCommit({
22- owner: context.repo.owner,
23- repo: context.repo.repo,
24- commit_sha: context.sha,
25- });
26-
27- // Check if any PR has the "Skip Readme" label
28- if (prs.length > 0) {
29- const pr = prs[0]; // Assume the first PR is the relevant one
30- const hasIgnoreLabel = pr.labels.some(label => label.name === 'Skip Readme');
31- return hasIgnoreLabel;
32- }
33- return false;
34- result-encoding : string
35-
3615 # Upload OpenAPI spec to Stainless
3716 - uses : stainless-api/upload-openapi-spec-action@main
3817 with :
3918 stainless_api_key : ${{ secrets.STAINLESS_API_KEY }}
4019 input_path : ' openapi.yaml'
4120 output_path : ' openapi.documented.yaml'
4221 project_name : ' togetherai'
43-
44- # Conditionally run the rdme step
45- - name : Update Readme docs
46- if : steps.check_rdme.outputs.result != 'true'
47- uses : readmeio/rdme@v8
48- with :
49- rdme : openapi "openapi.yaml" --key=${{ secrets.README_TOKEN }} --id=${{ secrets.README_DEFINITION_ID }}
You can’t perform that action at this time.
0 commit comments