chore: [CLI-936] Prepare documentation synchronization scripts for new Gitbook structure#5955
Conversation
🎉 Snyk checks have passed. No issues have been found so far.✅ security/snyk check is complete. No issues have been found. (View Details) ✅ license/snyk check is complete. No issues have been found. (View Details) ✅ code/snyk check is complete. No issues have been found. (View Details) |
|
2f3a448 to
b70c21c
Compare
48924f3 to
71dec0b
Compare
|
|
||
| - name: Copy help documentation from user-docs to CLI | ||
| run: | | ||
| cp ./user-docs/docs/snyk-cli/commands/*.md ./cli/help/cli-commands/ |
There was a problem hiding this comment.
☝🏻 This part needs to change when the Gitbook CR has been merged. We are unsure about the file names until that happens.
|
|
||
| - name: Retrieve GitBook content and update README | ||
| run: | | ||
| cp ./docs/snyk-cli/getting-started-with-the-snyk-cli.md ./cli/README.md |
d3093ac to
bf10e87
Compare
| --title="${{ env.COMMIT_MESSAGE }}" \ | ||
| --body="Automatic PR controlled by GitHub Action" \ | ||
| --head "${{ env.DESTINATION_BRANCH }}" \ | ||
| --base main |
There was a problem hiding this comment.
Suggestion: Let's use the branch we are executing on, so that we can run the automation against a release or release-candidate branch as well.
There was a problem hiding this comment.
I think github.ref_name from here could do the job.
There was a problem hiding this comment.
Oh and it would need to be considered in the DESTINATION_BRANCH
There was a problem hiding this comment.
Can you give a pseudo-suggestion? I get the change from main to a dynamic execution branch, but unsure how env.DESTINATION_BRANCH fits in 🤔
There was a problem hiding this comment.
I can also push on the branch. The point is just that you can't re-use the same destination branch if the source branch changes.
There was a problem hiding this comment.
The change is in a couple of places, so suggestion might not work in the PR.
There was a problem hiding this comment.
There was a problem hiding this comment.
Possibly a different branch naming strategy? docs/automatic-gitbook-update-cli-help-dotkas/CLI-936/update-synchronization-scripts looks a bit funny.
There was a problem hiding this comment.
Maybe just github.ref. 🤔
There was a problem hiding this comment.
Or even keep as is but add -from-. Just thinking. 💭
bf10e87 to
1007ba8
Compare
Pull Request Submission Checklist
are release-note ready, emphasizing
what was changed, not how.
What does this PR do?
Updates the Gitbook synchronization scripts to prepare for the new file structure being created over on the user-docs repo.
Notable changes:
Where should the reviewer start?
Workflows.
How should this be manually tested?
Go to Github Actions, click one of them, do a workflow dispatch targeting this branch.
The README updater had its filename changed and thus cannot be run manually in the Actions tab. But I cheated and tested out the code before changing the filename, and the result was good: action, PR.
What's the product update that needs to be communicated to CLI users?
None, this is an internal chore related to documentation synchronization.