|
| 1 | + |
| 2 | + |
| 3 | + # Configuring dev-docs.json for Automatic Documentation Generation |
| 4 | + |
| 5 | +This guide explains how to configure the `dev-docs.json` file with the GitHub app to enable automatic documentation modification and generation when your code changes. |
| 6 | + |
| 7 | +## File Location |
| 8 | + |
| 9 | +The `dev-docs.json` file should be placed in the root directory of your repository. |
| 10 | + |
| 11 | +## Configuration Fields |
| 12 | + |
| 13 | +### Required Fields |
| 14 | + |
| 15 | +- `gitHubApp`: Object containing GitHub-related configurations |
| 16 | + - `approvalWorkflow`: Boolean, enables or disables the approval workflow |
| 17 | + - `userDocsWorkflows`: Array of strings, specifies which documentation workflows to run |
| 18 | + - `issueNotifications`: Array of strings, GitHub usernames to notify on issue creation |
| 19 | + |
| 20 | +## Example Configuration |
| 21 | + |
| 22 | +```json |
| 23 | +{ |
| 24 | + "gitHubApp": { |
| 25 | + "approvalWorkflow": true, |
| 26 | + "userDocsWorkflows": ["generateUserDocs"], |
| 27 | + "issueNotifications": ["user1", "user2"], |
| 28 | + "issues": true |
| 29 | + } |
| 30 | +} |
| 31 | +``` |
| 32 | + |
| 33 | +## Field Descriptions |
| 34 | + |
| 35 | +1. `gitHubApp.approvalWorkflow`: When set to `true`, creates an approval issue before generating documentation. This is recommended so your team decides when to actually attempt to generate documentation as your code changes. |
| 36 | + |
| 37 | +2. `gitHubApp.userDocsWorkflows`: Specifies which documentation workflows to run: |
| 38 | + - `"generateUserDocs"`: Automatically generates and updates documentation files |
| 39 | + - `"generateDocsIssue"`: Creates issues to track documentation changes |
| 40 | +3. `gitHubApp.issues`: Optional but recommend field that is a boolean that allows the GitHub app to create issues on the project |
| 41 | +4. `gitHubApp.issueNotifications`: List of GitHub usernames to be notified when documentation-related issues are created. |
| 42 | +5. `gitHubApp.connectedOrg`: Optional field, if you have multiple orgs can you can set what org is associated to your repo |
| 43 | +6. `gitHubApp.branches`: Optional field that is an array of branches you specificy the GitHub App to listen, such as or `['branch_a', 'branch_b']` or you can use `['*']` to listen for all branch changes. If omitted the GitHub app will only listen for changes on the default branch. |
| 44 | + |
| 45 | +## Usage |
| 46 | + |
| 47 | +1. Make sure you have a docs.dev account, have installed the GitHub App on your docs repo, and the codebase you want to document. |
| 48 | +1. Create a `dev-docs.json` file in your repository's root directory. |
| 49 | +2. Configure the fields according to your documentation needs. |
| 50 | +3. Commit and push the file to your repository. |
| 51 | + |
| 52 | +The system will now use these settings to automatically generate and update documentation based on your code changes. |
| 53 | + |
| 54 | + |
0 commit comments