Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

README should include --help (options) and explicit --allow instructions #152

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

MPV
Copy link

@MPV MPV commented Nov 24, 2023

To help the reader avoid mistakes/surprises which I ran into.

Comment on lines +61 to +75
Options are:
```bash
pin-github-action -h
Usage: pin-github-action [options] [file ...]

Options:
-V, --version output the version number
-a, --allow <actions> comma separated list of actions to allow e.g. mheap/debug-action. May be a glob e.g. mheap/*
-i, --ignore-shas do not update any commits that are pinned at a sha
-e, --allow-empty allow workflows that do not contain any actions
-l, --yaml-line-width <width> set maximum output width before a line break (default: "120")
-n, --yaml-null-str <string> set string representation for null values (default: "null")
-c, --comment <string> comment to add inline when pinning an action (default: " pin@{ref}")
-h, --help display help for command
```
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Options are:
```bash
pin-github-action -h
Usage: pin-github-action [options] [file ...]
Options:
-V, --version output the version number
-a, --allow <actions> comma separated list of actions to allow e.g. mheap/debug-action. May be a glob e.g. mheap/*
-i, --ignore-shas do not update any commits that are pinned at a sha
-e, --allow-empty allow workflows that do not contain any actions
-l, --yaml-line-width <width> set maximum output width before a line break (default: "120")
-n, --yaml-null-str <string> set string representation for null values (default: "null")
-c, --comment <string> comment to add inline when pinning an action (default: " pin@{ref}")
-h, --help display help for command
```
To see all available options, run `pin-github-action --help`

Command lists get out of date very quickly in my experience. Would you be open to changing this to show the --help flag instead?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess I was trying to gauge what settings I could make and see if/how this repo could be useful to me (before I installed and tried it out).

Hence why having the list of available options would've helped in my case.

I really understand what you mean, and maybe it's okay to have an outdated --help readme example, over missing this interesting info. Makes it easier to skim the readme imho.

I don't have strong feelings about this, also open to closing the PR if you don't feel this is needed. Just thought I'd contribute back a solution to a problem I faced when trying to use it. Feel the issue on maintainability though, so I'll leave it up to you, whichever is fine with me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants