diff --git a/README.md b/README.md index 43676f3..64cc536 100644 --- a/README.md +++ b/README.md @@ -41,15 +41,15 @@ jobs: with: # Personal access token (PAT) used when interacting with Git and GitHub. # - # We recommend using a service account with the least permissions necessary. Also - # when generating a new PAT, select the least scopes necessary. + # We recommend using a service account with the least permissions necessary. + # Also, when generating a new PAT, select the least scopes necessary. # # [Learn more about creating and using encrypted secrets](https://help.github.com/actions/automating-your-workflow-with-github-actions/creating-and-using-encrypted-secrets) # # Required: true token: ${{ secrets.GITHUB_TOKEN }} - # Path to settings file + # Path to the settings file # # By default, .github/preview-updater.yml # @@ -84,30 +84,6 @@ All fields are optional—omitted ones fall back to defaults. path: README.md # Target file to update -repository: - commit: - branch: preview/banner-{random} - title: "docs(preview): Update preview" - body: '' - author: - name: github-actions - email: github-actions@github.com - - pullRequest: - title: Update preview - body: '' - assignees: [ ] - labels: [ 'preview' ] - -data: - # By default, the repository name will be used. - # For example, for https://github.com/TheDragonCode/github-preview-updater, it will take `preview-updater` - # and convert it to `Preview Updater`. - title: '' # Fallbacks to repo name (Title Case) - - # By default, the package description will be used (the ` description ` key in composer.json or package.json). - description: '' # Fallbacks to owner name or package description - package: # Declares the use of the package manager. # It is a regular string that will be substituted into the URL address. @@ -132,6 +108,15 @@ package: # By default, the package name is taken from the composer.json or package.json file. name: '' +data: + # By default, the repository name will be used. + # For example, for https://github.com/TheDragonCode/github-preview-updater, it will take `preview-updater` + # and convert it to `Preview Updater`. + title: '' # Fallbacks to repo name (Title Case) + + # By default, the package description will be used (the ` description ` key in composer.json or package.json). + description: '' # Fallbacks to owner name or package description + image: url: https://banners.beyondco.de/{title}.png @@ -142,6 +127,20 @@ image: fontSize: 100px icon: code +repository: + commit: + branch: preview/banner-{random} + title: "docs(preview): Update preview" + body: '' + author: + name: github-actions + email: github-actions@github.com + + pullRequest: + title: Update preview + body: '' + assignees: [ ] + labels: [ 'preview' ] ``` Currently, the project generates previews through [banners.beyondco.de](https://banners.beyondco.de) and the parameters diff --git a/resources/schema.json b/resources/schema.json index 9710653..81893ff 100644 --- a/resources/schema.json +++ b/resources/schema.json @@ -15,14 +15,14 @@ "default": { "commit": { "branch": "preview/banner-{random}", - "title": "docs(preview): Update preview", + "title": "docs(preview): Update repository banner image", "author": { "name": "github-actions", "email": "github-actions@github.com" } }, "pullRequest": { - "title": "Update preview", + "title": "Update repository banner image", "labels": [ "preview" ] @@ -34,7 +34,7 @@ "additionalProperties": false, "default": { "branch": "preview/banner-{random}", - "title": "docs(preview): Update preview", + "title": "docs(preview): Update repository banner image", "author": { "name": "github-actions", "email": "github-actions@github.com" @@ -49,7 +49,7 @@ "title": { "type": "string", "description": "Commit title", - "default": "docs(preview): Update preview" + "default": "docs(preview): Update repository banner image" }, "body": { "type": "string", @@ -80,7 +80,7 @@ "title": { "type": "string", "description": "Pull request title", - "default": "Update preview" + "default": "Update repository banner image" }, "body": { "type": "string", diff --git a/src/libs/defaults.ts b/src/libs/defaults.ts index e27a81f..b10a408 100644 --- a/src/libs/defaults.ts +++ b/src/libs/defaults.ts @@ -41,11 +41,11 @@ export const defaultPullRequest: PullRequest = { export const defaultConfig: Config = { readme: "README.md", + package: defaultPackage, + image: defaultImage, + repository: { commit: defaultCommit, pullRequest: defaultPullRequest, }, - - package: defaultPackage, - image: defaultImage, }; diff --git a/src/types/config.ts b/src/types/config.ts index 077069a..7e7a48b 100644 --- a/src/types/config.ts +++ b/src/types/config.ts @@ -7,9 +7,8 @@ export interface Config { directory?: string; readme?: string; - repository?: Repository; - - data?: Data; package?: Package; + data?: Data; image?: Image; + repository?: Repository; }