Command doc lint ignore for autogen maintainer #113
Workflow file for this run
This file contains hidden or 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 | |
if: ${{!contains(fromJSON('[hustcer]'), github.event.pull_request.user.login)}} | |
steps: | |
- uses: actions/[email protected] | |
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/categorees`!\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 |