Read-only mirror — the public repositories of the Forgejo instance, refreshed every 10 minutes. The live instance (fg.dieschoenewolke.de) is reachable only over the VPN; clone here with https://git.dieschoenewolke.de/git/<owner>/<repo>.git.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md3
-rw-r--r--action.yml3
-rw-r--r--src/misc/generate-docs.ts7
3 files changed, 10 insertions, 3 deletions
diff --git a/README.md b/README.md
index 4abc07b..82d3494 100644
--- a/README.md
+++ b/README.md
@@ -47,7 +47,8 @@ Refer [here](https://github.com/actions/checkout/blob/v1/README.md) for previous
# Auth token used to fetch the repository. The token is stored in the local git
# config, which enables your scripts to run authenticated git commands. The
- # post-job step removes the token from the git config.
+ # post-job step removes the token from the git config. [Learn more about creating
+ # and using encrypted secrets](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/creating-and-using-encrypted-secrets)
# Default: ${{ github.token }}
token: ''
diff --git a/action.yml b/action.yml
index 54cf4b3..9650409 100644
--- a/action.yml
+++ b/action.yml
@@ -13,7 +13,8 @@ inputs:
description: >
Auth token used to fetch the repository. The token is stored in the local
git config, which enables your scripts to run authenticated git commands.
- The post-job step removes the token from the git config.
+ The post-job step removes the token from the git config. [Learn more about
+ creating and using encrypted secrets](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/creating-and-using-encrypted-secrets)
default: ${{ github.token }}
persist-credentials:
description: 'Whether to persist the token in the git config'
diff --git a/src/misc/generate-docs.ts b/src/misc/generate-docs.ts
index ee90d6f..884d606 100644
--- a/src/misc/generate-docs.ts
+++ b/src/misc/generate-docs.ts
@@ -65,9 +65,14 @@ function updateUsage(
let segment: string = description
if (description.length > width) {
segment = description.substr(0, width + 1)
- while (!segment.endsWith(' ')) {
+ while (!segment.endsWith(' ') && segment) {
segment = segment.substr(0, segment.length - 1)
}
+
+ // Trimmed too much?
+ if (segment.length < width * 0.67) {
+ segment = description
+ }
} else {
segment = description
}