Refresh Nu command docs for v0.101 #114
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Comment on manual command changes | |
on: | |
pull_request_target: | |
paths: | |
- 'commands/docs/**' | |
- 'commands/categories/**' | |
jobs: | |
comment: | |
runs-on: ubuntu-latest | |
# Maintainers/Contributors can add themselves exempt from this bot if they regularly run the command doc generation. | |
# If you are on this list, be careful about accidental changes! | |
if: ${{!contains(fromJSON('["hustcer", "sholderbach"]'), github.event.pull_request.user.login)}} | |
steps: | |
- uses: actions/github-script@v7.0.1 | |
with: | |
script: | | |
github.rest.issues.createComment({ | |
issue_number: context.issue.number, | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
body: 'Awesome that you are trying to improve the documentation of a nushell command!\n\n' + | |
'**You should not modify the files in `commands/docs` or `commands/categories`!**\n' + | |
'We autogenerate these command pages from the `help` information defined by the command implementation, after each release. Thus:\n'+ | |
'- If you already updated the command help, you are already done and can close this PR!\n'+ | |
'- Else, please look for the command in the [source tree](https://github.com/nushell/nushell/tree/main/crates) and make your changes directly there in the `impl Command` and `Signature`.\n'+ | |
'- If you accidentally made a change in `commands/` while working on general documentation, please revert changes to `commands/`\n\n'+ | |
'Thanks for helping out!' | |
}) | |
- run: | | |
echo "This PR touched autogenerated command docs. If you are not a maintainer of the autogenerated docs, please revert changes to `commands/docs/**` and make the change on the nushell side" | |
exit 1 |