Open
Conversation
Add md/sync.py for syncing devnet spec notes between local markdown files and notes.ethereum.org HackMD team notes. Supports pull/push, adding GitHub PR links into pre-defined sections, and refreshing PR statuses in bulk.
Replace the implicit KeyError on os.environ['HACKMD_TOKEN'] with a SystemExit pointing the user at the API token settings page.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
md/sync.py, a small helper for syncing devnet spec notes between local markdown files andnotes.ethereum.orgHackMD team notes.from-remote <network>— pull a HackMD note intomd/<network>.mdto-remote <network>— push the local markdown back to HackMDpr <network> [<sync-to-remote>] <github-pr-url>— insert a PR link into the appropriate section, optionally pushing to HackMDsync-prs <network>— refresh status badges for every linked PR (logs only the ones that actually changed) and pushes to HackMD if there were updatesnotes.ethereum.org.Test plan
HACKMD_TOKEN=... python3 md/sync.py from-remote <some-team-note>pulls successfullypython3 md/sync.py to-remote <network>round-trips a note unchangedpython3 md/sync.py sync-prs <network>updates statuses and reports diffs