-
Notifications
You must be signed in to change notification settings - Fork 33
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
[Documentation] Python Automation script and workflow for github wiki #419
Conversation
Just FYI @Olshansk; I am not able to set the Assignee, label, priority, etc. (as per the PR templates instructions) during or after creating a PR. This is what I see while trying to creating a cross repo PR for pocket: This is what it looked like after creating the draft PR, usually the words become clickable links to set the assignee etc.: Maybe there is a different way, but those are the ones I was familiar with. |
Co-authored-by: Daniel Olshansky <olshansky.daniel@gmail.com>
Co-authored-by: Daniel Olshansky <olshansky.daniel@gmail.com>
Co-authored-by: Daniel Olshansky <olshansky.daniel@gmail.com>
Co-authored-by: Daniel Olshansky <olshansky.daniel@gmail.com>
Co-authored-by: Daniel Olshansky <olshansky.daniel@gmail.com>
@okdas Could you help configure the secrets in our github repo to enable this via automation? See |
I somehow lost access to this functionality, I'll work on either getting access or setting the secrets with the infra team. |
Updated the settings. Let me know if you've taken another look |
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.
Thank you for taking care of this @profishional!
I've explained why tokens might not be the best way to access wiki with an alternative solution in comments in code. From my research, this should work just fine! However, if something won't work as suspected, I'll research what permissions we are going to need for fine-grained PAT.
@profishional Let us know if you have time/capacity to tend to the changes we mentioned so we can get this PR over the finish line. If not, @okdas and I can push it ourselves |
Co-authored-by: Dmitry Knyazev <okdas@users.noreply.github.com>
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.
@profishional LGTM!
Can you merge with main and resolve the merge conflicts? Since this branch is from your own repository, I don't have the ability to update it.
Ok I've solved the conflict. But can't merge "only those with write access to this repo can merge PR" @Olshansk. |
@profishional I can merge it for you. Can you update the changelogs first please? Again, I would do it on your behalf, but this branch isn't in our main repo. EDIT: Ignore. I will make an exception because of how minimal the changes in each repo are. |
I don't follow. You've merged it but you'd like me to update the Changelogs as another PR? |
@profishional Sorry about that. I wrote the original message but then added an EDIT at the bottom:
We'd be updating every changelog saying "Added a GITHUB WIKI tag", so the changelog diff would be greater than the actual diff, which I saw as unnecessary overhead. I made an exception and merged the changes as is. I also just created a followup ticket that's adding it in the missing READMEs here: #488. I think this is really awesome btw!! https://github.com/pokt-network/pocket/wiki |
…#488) ## Description Update all READMes to have a tag so they are reflected in the [Github Wiki](https://github.com/pokt-network/pocket/wiki). ## Issue NA. Follow up to #419 ## Type of change Please mark the relevant option(s): - [ ] New feature, functionality or library - [ ] Bug fix - [ ] Code health or cleanup - [ ] Major breaking change - [x] Documentation - [ ] Other <!-- add details here if it a different type of change --> ## List of changes - Added a link to the [Github Wiki](https://github.com/pokt-network/pocket/wiki) in the learning guide - Update all READMEs that were missing a github wiki tag - Bonus: Added a link to Alin's blog ## Testing - [x] `make develop_test` - [ ] [LocalNet](https://github.com/pokt-network/pocket/blob/main/docs/development/README.md) w/ all of the steps outlined in the `README`
Description
Motivation
Create a GitHub wiki (a separate git repo relative to this repo) for the documentation across this GitHub repo. GitHub wikis have better visibility and navigation for users.
Background
GitHub wikis lack version control and are entirely separate relative to this source repository. To solve both of these issues, we use the documentation/markdown files from the main repo to update the Github wiki repository.
To maximize the benefit of the wiki, a hierarchical view is created in a sidebar. However, the mapping of the markdowns files to the sidebar poses some challenges.
The PR is an attempt at a very simple solution. A GitHub action that tracks changes to a set of files and triggers a python script. The script picks up pre-written comments in the set of files to generate a sidebar. From the sidebars linking reference, it copies over the files from the main repo to the wiki repo.
Pre-Requisites to Merge this in
repo
permission box.Outstanding issues
Issue
Fixes #133
Remaining/new issues
Type of change
Please mark the relevant option(s):
List of changes
.md
files, sets env variables and runs a python script.md
files, maps them to the specified format described in the files, generates a GitHub wiki sidebar file and respective wiki files. Pulls the current wiki, syncs the files and pushes them..md
files found fromfind . -name "*.md" | grep -v -e "vendor" -e "app"
in the form of<!-- GITHUB_WIKI: category/subcategory/.../file_name -->
.docs/development/readme
Testing
make develop_test
README
d
Screenshot of output from example wiki on a personal fork: example wiki
Required Checklist
If Applicable Checklist
shared/docs/*
if I updatedshared/*
README(s)