Skip to content

Commit bc5ca99

Browse files
Update README and schema to reflect adjustments in repository configuration
1 parent 88b4afb commit bc5ca99

File tree

4 files changed

+36
-38
lines changed

4 files changed

+36
-38
lines changed

README.md

Lines changed: 26 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -41,15 +41,15 @@ jobs:
4141
with:
4242
# Personal access token (PAT) used when interacting with Git and GitHub.
4343
#
44-
# We recommend using a service account with the least permissions necessary. Also
45-
# when generating a new PAT, select the least scopes necessary.
44+
# We recommend using a service account with the least permissions necessary.
45+
# Also, when generating a new PAT, select the least scopes necessary.
4646
#
4747
# [Learn more about creating and using encrypted secrets](https://help.github.com/actions/automating-your-workflow-with-github-actions/creating-and-using-encrypted-secrets)
4848
#
4949
# Required: true
5050
token: ${{ secrets.GITHUB_TOKEN }}
5151

52-
# Path to settings file
52+
# Path to the settings file
5353
#
5454
# By default, .github/preview-updater.yml
5555
#
@@ -84,30 +84,6 @@ All fields are optional—omitted ones fall back to defaults.
8484
8585
path: README.md # Target file to update
8686
87-
repository:
88-
commit:
89-
branch: preview/banner-{random}
90-
title: "docs(preview): Update preview"
91-
body: ''
92-
author:
93-
name: github-actions
94-
email: github-actions@github.com
95-
96-
pullRequest:
97-
title: Update preview
98-
body: ''
99-
assignees: [ ]
100-
labels: [ 'preview' ]
101-
102-
data:
103-
# By default, the repository name will be used.
104-
# For example, for https://github.com/TheDragonCode/github-preview-updater, it will take `preview-updater`
105-
# and convert it to `Preview Updater`.
106-
title: '' # Fallbacks to repo name (Title Case)
107-
108-
# By default, the package description will be used (the ` description ` key in composer.json or package.json).
109-
description: '' # Fallbacks to owner name or package description
110-
11187
package:
11288
# Declares the use of the package manager.
11389
# It is a regular string that will be substituted into the URL address.
@@ -132,6 +108,15 @@ package:
132108
# By default, the package name is taken from the composer.json or package.json file.
133109
name: ''
134110

111+
data:
112+
# By default, the repository name will be used.
113+
# For example, for https://github.com/TheDragonCode/github-preview-updater, it will take `preview-updater`
114+
# and convert it to `Preview Updater`.
115+
title: '' # Fallbacks to repo name (Title Case)
116+
117+
# By default, the package description will be used (the ` description ` key in composer.json or package.json).
118+
description: '' # Fallbacks to owner name or package description
119+
135120
image:
136121
url: https://banners.beyondco.de/{title}.png
137122

@@ -142,6 +127,20 @@ image:
142127
fontSize: 100px
143128
icon: code
144129

130+
repository:
131+
commit:
132+
branch: preview/banner-{random}
133+
title: "docs(preview): Update preview"
134+
body: ''
135+
author:
136+
name: github-actions
137+
email: github-actions@github.com
138+
139+
pullRequest:
140+
title: Update preview
141+
body: ''
142+
assignees: [ ]
143+
labels: [ 'preview' ]
145144
```
146145
147146
Currently, the project generates previews through [banners.beyondco.de](https://banners.beyondco.de) and the parameters

resources/schema.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@
1515
"default": {
1616
"commit": {
1717
"branch": "preview/banner-{random}",
18-
"title": "docs(preview): Update preview",
18+
"title": "docs(preview): Update repository banner image",
1919
"author": {
2020
"name": "github-actions",
2121
"email": "github-actions@github.com"
2222
}
2323
},
2424
"pullRequest": {
25-
"title": "Update preview",
25+
"title": "Update repository banner image",
2626
"labels": [
2727
"preview"
2828
]
@@ -34,7 +34,7 @@
3434
"additionalProperties": false,
3535
"default": {
3636
"branch": "preview/banner-{random}",
37-
"title": "docs(preview): Update preview",
37+
"title": "docs(preview): Update repository banner image",
3838
"author": {
3939
"name": "github-actions",
4040
"email": "github-actions@github.com"
@@ -49,7 +49,7 @@
4949
"title": {
5050
"type": "string",
5151
"description": "Commit title",
52-
"default": "docs(preview): Update preview"
52+
"default": "docs(preview): Update repository banner image"
5353
},
5454
"body": {
5555
"type": "string",
@@ -80,7 +80,7 @@
8080
"title": {
8181
"type": "string",
8282
"description": "Pull request title",
83-
"default": "Update preview"
83+
"default": "Update repository banner image"
8484
},
8585
"body": {
8686
"type": "string",

src/libs/defaults.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,11 @@ export const defaultPullRequest: PullRequest = {
4141
export const defaultConfig: Config = {
4242
readme: "README.md",
4343

44+
package: defaultPackage,
45+
image: defaultImage,
46+
4447
repository: {
4548
commit: defaultCommit,
4649
pullRequest: defaultPullRequest,
4750
},
48-
49-
package: defaultPackage,
50-
image: defaultImage,
5151
};

src/types/config.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,8 @@ export interface Config {
77
directory?: string;
88
readme?: string;
99

10-
repository?: Repository;
11-
12-
data?: Data;
1310
package?: Package;
11+
data?: Data;
1412
image?: Image;
13+
repository?: Repository;
1514
}

0 commit comments

Comments
 (0)