Skip to content

Commit

Permalink
Improve documentation (#127)
Browse files Browse the repository at this point in the history
* Docs: Improve readability of inputs docs

* Docs: Clarify SSH key usage
  • Loading branch information
politician authored Sep 21, 2024
1 parent 014dedb commit c6f5210
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 32 deletions.
8 changes: 4 additions & 4 deletions .config/autodoc.js → .config/autodoc.mjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const YAML = require("yaml");
const tablemark = require("tablemark");
const fs = require("fs");
import fs from "fs";
import tablemark from "tablemark";
import YAML from "yaml";

const file = fs.readFileSync("./action.yml", "utf8");

Expand All @@ -11,7 +11,7 @@ Object.keys(yml.inputs).forEach((input) => {
table.push({
input,
required: yml.inputs[input] && yml.inputs[input].required ? "yes" : "",
default: yml.inputs[input] && yml.inputs[input].default ? yml.inputs[input].default : "",
default: yml.inputs[input] && yml.inputs[input].default ? "`" + yml.inputs[input].default + "`" : "",
description: yml.inputs[input] && yml.inputs[input].description ? yml.inputs[input].description : "",
});
});
Expand Down
3 changes: 2 additions & 1 deletion .config/commit-docs.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Copied from commit-build.sh
# This script is used for repos that need to commit a build folder (eg. Github actions)

# Add more sources/destinations by separating them by spaces (ie. source="src lib")
Expand All @@ -11,7 +12,7 @@ then

# Run build command
echo "Generating $build..."
node .config/autodoc.js
node .config/autodoc.mjs

# If this generated unstaged changes in $build folder(s)
if [[ $(git status --porcelain $build | egrep '^(([M ]M)|\?\?)') ]]
Expand Down
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ inputs:
default: ""

committer:
description: "Who will commit changes."
description: "Who will commit changes (author will be original committer)."
required: false
default: Github Actions <[email protected]>

Expand Down
3 changes: 2 additions & 1 deletion docs/basic-usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ Once they are merged on SoT, Copybara will automatically push the code to the de

- **Source of Truth (SoT) repo**
- **Destination repo**
- **[SSH private key](ssh-keys.md)** with write access to destination repo (used to push code)
- **[SSH private key](ssh-keys.md)** with write access to both repos (used to
push code on destination and create/commit to branches on SoT)
- **[GitHub Personal access token](https://github.com/settings/tokens)** with 'repo' permissions (used for determining default branches and managing pull requests on both repos)

## Examples
Expand Down
Loading

0 comments on commit c6f5210

Please sign in to comment.