Skip to content

Commit aaaf433

Browse files
rachmarigithub-actions
andauthored
update pipeline readmes (#50561)
Co-authored-by: github-actions <github-actions@github.com>
1 parent 085fc1b commit aaaf433

5 files changed

Lines changed: 36 additions & 9 deletions

File tree

src/github-apps/README.md

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,32 @@
22

33
Our GitHub Apps pipeline creates autogenerated documentation for docs.github.com from the OpenAPI stored in the open-source repository [`github/rest-api-description`](https://github.com/github/rest-api-description).
44

5-
The pipeline is used to generate data that is used by the docs.github.com site when deployed locally, in preview environments, or in production.
5+
The pipeline is used to generate the data used on these pages:
6+
- [Endpoints available for Github App installation access tokens](https://docs.github.com/en/rest/authentication/endpoints-available-for-github-app-installation-access-tokens)
7+
- [Endpoints available for GitHub App user access tokens](https://docs.github.com/en/rest/authentication/endpoints-available-for-github-app-user-access-tokens)
8+
- [Endpoints available for fine-grained personal access tokens](https://docs.github.com/en/rest/authentication/endpoints-available-for-fine-grained-personal-access-tokens)
9+
- [Permissions required for GitHub Apps](https://docs.github.com/en/rest/authentication/permissions-required-for-github-apps)
10+
- [Permissions required for fine-grained personal access tokens](https://docs.github.com/en/rest/authentication/permissions-required-for-fine-grained-personal-access-tokens)
611

712
## How does it work
813

914
![A flow chart describing how the automation pipeline for GitHub Apps generates documentation](./github-apps-pipeline-flowchart.png)
1015

1116
A [workflow](.github/workflows/sync-openapi.yml) is used to trigger the automation of the GitHub Apps documentation. The workflow runs automatically on a schedule. The workflow that triggers the GitHub Apps pipeline also triggers other automation pipelines that use the OpenAPI as the source data:
17+
1218
- GitHub Apps
1319
- REST
1420
- Webhooks
1521

1622
The workflow automatically creates a pull request with the changes (for all three pipelines) and the label `github-openapi-bot`.
1723

18-
The workflow runs the `src/rest/scripts/update-files.js` script.
24+
The data used by the GitHub Apps pages is generated from two sources of programmatic access data and the OpenAPI. Changes to the programmatic access files do not trigger this pipeline to run, but this pipeline can be manually triggered at any time.
25+
26+
## Manually running the pipeline
27+
28+
You can manually sync the data used by the REST, Webhooks, and GitHub App pipelines before the scheduled daily run [here](https://github.com/github/docs-internal/actions/workflows/sync-openapi.yml). Use the default input options.
29+
30+
If the OpenAPI has changed, you will need to first wait for the OpenAPI to be merged into `github/rest-api-description`.
1931

2032
## Local development
2133

@@ -26,11 +38,12 @@ To run the GitHub Apps pipeline locally:
2638

2739
## About this directory
2840

29-
- `src/rest/data` - The automatically generated data files created by running this pipeline.
30-
- `src/rest/lib` - The source code used in production for the automated documentation generated by the GitHub Apps pipeline and configuration files edited by content and engineering team members.
31-
- `src/rest/lib/config.json` - A configuration file used to specify metadata about the GitHub Apps pipeline. This file contains the SHA of the commit in `github/rest-api-description` that was used to generate the data in `src/github-apps/data`. This value is automatically updated when the pipeline runs.
32-
- `src/rest/scripts` - The scripts and source code used run the GitHub Apps pipeline, which updates the `src/github-apps/data` directory.
33-
- `src/rest/tests` - The tests used to verify the GitHub Apps pipeline.
41+
- `src/github-apps/components` - The React source code.
42+
- `src/github-apps/data` - The automatically generated data files created by running this pipeline.
43+
- `src/github-apps/lib` - The source code used in production for the automated documentation generated by the GitHub Apps pipeline and configuration files edited by content and engineering team members.
44+
- `src/github-apps/lib/config.json` - A configuration file used to specify metadata about the GitHub Apps pipeline. This file contains the SHA of the commit in `github/rest-api-description` that was used to generate the data in `src/github-apps/data`. This value is automatically updated when the pipeline runs.
45+
- `src/github-apps/scripts` - The scripts and source code used to run the GitHub Apps pipeline, which updates the `src/github-apps/data` directory.
46+
- `src/github-apps/tests` - The tests used to verify the GitHub Apps pipeline.
3447

3548
## Configuring the pipeline
3649

-30.2 KB
Loading

src/github-apps/scripts/sync.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,6 @@ export async function getProgAccessData(progAccessSource) {
163163
}
164164

165165
let progAccessDataRaw
166-
// config/locales/programmatic_actor_fine_grained_resources.en.yml
167166
let progActorResources
168167
const progAccessFilepath = 'config/access_control/programmatic_access.yaml'
169168
const progActorFilepath = 'config/locales/programmatic_actor_fine_grained_resources.en.yml'

src/rest/README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ The pipeline is used to generate data that is used by the docs.github.com site w
99
![A flow chart describing how the automation pipeline for REST generates documentation](./rest-pipeline-flowchart.png)
1010

1111
A [workflow](.github/workflows/sync-openapi.yml) is used to trigger the automation of the REST documentation. The workflow runs automatically on a schedule. The workflow that triggers the REST pipeline also triggers other automation pipelines that use the OpenAPI as the source data:
12+
1213
- GitHub Apps
1314
- REST
1415
- Webhooks
@@ -23,6 +24,12 @@ You can manually run the workflow leaving the source branch input parameter with
2324

2425
If there is a pull request that is still unmerged in `github/rest-api-description` that needs to be propagated to the docs.github.com site, manually run the workflow and provide the branch name of the pull request in the `github/rest-api-description` repo that you would like to get the changes from. This will create a new pull request in the `github/docs-internal` repo with the changes.
2526

27+
## Manually running the pipeline
28+
29+
You will need to first wait for the OpenAPI to be merged into `github/rest-api-description`.
30+
31+
Then, you can manually sync the data used by the REST, Webhooks, and GitHub App pipelines before the scheduled daily run [here](https://github.com/github/docs-internal/actions/workflows/sync-openapi.yml). Use the default input options.
32+
2633
## Local development
2734

2835
To run the REST pipeline locally:
@@ -32,7 +39,8 @@ To run the REST pipeline locally:
3239

3340
## About this directory
3441

35-
- `src/rest/api` - The source code for the api endpoint used in production that redirects specific anchor links on a page under `docs.github.com/rest`.
42+
- `src/github-apps/api` - API endpoints used by source code in `src/rest`.
43+
- `src/github-apps/components` - The React source code.
3644
- `src/rest/data` - The automatically generated data files created by running this pipeline.
3745
- `src/rest/lib` - The source code used in production for the automated documentation generated by the REST pipeline and configuration files edited by content and engineering team members.
3846
- `src/rest/lib/config.json` - A configuration file used to specify metadata about the REST pipeline.

src/webhooks/README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ The pipeline is used to generate data that is used by the docs.github.com site w
99
![A flow chart describing how the automation pipeline for webhooks generates documentation](./webhooks-pipeline-flowchart.png)
1010

1111
A [workflow](.github/workflows/sync-openapi.yml) is used to trigger the automation of the webhooks documentation. The workflow runs automatically on a schedule. The workflow that triggers the webhooks pipeline also triggers other automation pipelines that use the OpenAPI as the source data:
12+
1213
- GitHub Apps
1314
- REST
1415
- Webhooks
@@ -17,6 +18,12 @@ The workflow automatically creates a pull request with the changes (for all thre
1718

1819
The workflow runs the `src/rest/scripts/update-files.js` script, which then calls the `src/webhooks/scripts/sync.js` script.
1920

21+
## Manually running the pipeline
22+
23+
You will need to first wait for the OpenAPI to be merged into `github/rest-api-description`.
24+
25+
Then, you can manually sync the data used by the REST, Webhooks, and GitHub App pipelines before the scheduled daily run [here](https://github.com/github/docs-internal/actions/workflows/sync-openapi.yml). Use the default input options.
26+
2027
## Local development
2128

2229
To run the webhooks pipeline locally:

0 commit comments

Comments
 (0)