-
Notifications
You must be signed in to change notification settings - Fork 0
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
add validate-config action and README #20
Conversation
This will fix #9 by implementing a validation action for config files that additionally comments on the pull request the results of the validation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is awesome!!
I made some comments and suggestions for changes directly in the PR.
One last thing I forgot to mention is we also maintain details of available workflows in hubDocs
. https://hubverse.io/en/latest/quickstart-hub-admin/continuous-integration.html#available-hubverse-github-actions
Any chance you can add an entry there too? (might be worth a custom PR template for this repo to remind us every time!)
Co-authored-by: Anna Krystalli <[email protected]>
- all comments will have a timestamp (because it's not immediately clear from the edited comment) - added a "success" comment so that the failure comments do not hang around - added a more informative error message for workflows that don't use comments.
I added @annakrystalli's suggestions and did the following:
|
Also, I have hubverse-org/hubDocs#164 in draft. It's actually ready, but I didn't want to open it until this is merged. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hehehehe almost! I made a few suggested editing to make it cleaner and more intuitive for someone wanting to override the default hub_path
.
It did make me think about the workflow paths
triggers though. These also need to be responsive to a change in hub_path
otherwise we need to let users know to change them too right?
Co-authored-by: Anna Krystalli <[email protected]>
For example, to validate the config of a demo hub included as part of a package you would want make sure the hub path is set to `"inst/demo_hub"`: | ||
|
||
```diff | ||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
branches: main | ||
paths: | ||
- - 'hub-config/**' | ||
+ - 'inst/demo_hub/hub-config/**' | ||
- '!**README**' | ||
|
||
jobs: | ||
validate-hub-config: | ||
runs-on: ubuntu-latest | ||
env: | ||
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | ||
PR_NUMBER: ${{ github.event.number }} | ||
- HUB_PATH: ${{ github.workspace }} | ||
+ HUB_PATH: ${{ github.workspace }}/inst/demo_hub | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@annakrystalli, I've modified the README to show the example. Does this seem good to you?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perfect!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Brilliant! This looks fab now and very clear instructions. Approved!
This will fix #9 by implementing a validation action for config files
that additionally comments on the pull request the results of the
validation.