Open docs PR automatically when Pester releases - #448
Merged
Conversation
Adds a daily workflow that compares the Pester version in the generated command pages with the latest stable release on PSGallery, and calls the existing docs-update workflow when they differ. 🤖
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.
I keep forgetting to regenerate the docs after a Pester release, so this checks for me.
check-pester-release.ymlruns daily, asks PSGallery for the latest stable Pester in each line (latest overall for Current, 5.x for v5) and compares it to the version written into the generated command pages. If the docs are behind it callsgenerate-pester-docs.yml, which is unchanged except for now being callable, and the usual PR shows up. v4 is frozen at 4.10.1 so it is not checked.PSGallery is the source and not the GitHub release, because that is where
generate-command-reference.ps1installs Pester from. A release that is tagged but not on the gallery yet cannot be used to build the docs anyway.Two more things it handles: docs generated from a prerelease get updated once that same version goes stable, and a version is skipped when the
docs-update/...branch already has a pull request, including a closed one, so a PR you close on purpose does not come back the next morning. That is also why I droppedbranch-suffix: short-commit-hash, the branch name already contains the docs version and the Pester version, and without the suffix a re-run updates the existing PR instead of opening a second one.Nothing to regenerate right now, Current is at 6.1.0 and v5 at 5.9.1, both match the gallery. I ran the detection step locally against this repo and against a fake older checkout to see both paths, and actionlint is clean on the new file.
🤖