Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 26 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
#
Expand Down Expand Up @@ -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.
Expand All @@ -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

Expand All @@ -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
Expand Down
10 changes: 5 additions & 5 deletions resources/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
]
Expand All @@ -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"
Expand All @@ -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",
Expand Down Expand Up @@ -80,7 +80,7 @@
"title": {
"type": "string",
"description": "Pull request title",
"default": "Update preview"
"default": "Update repository banner image"
},
"body": {
"type": "string",
Expand Down
6 changes: 3 additions & 3 deletions src/libs/defaults.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};
5 changes: 2 additions & 3 deletions src/types/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@ export interface Config {
directory?: string;
readme?: string;

repository?: Repository;

data?: Data;
package?: Package;
data?: Data;
image?: Image;
repository?: Repository;
}