Conversation
|
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.



Documentation Bot
An agentic GitHub workflow that automatically creates documentation PRs in
vaadin/docswhen code changes affect user-facing features, APIs, or behavior.Powered by GitHub Agentic Workflows (
gh-aw) and Claude.How It Works
vaadin/docswith the relevant changes.If no documentation changes are needed (internal/test/build-only changes), the bot comments accordingly and takes no further action.
Prerequisites
gh) installed and authenticatedgh-awextension:gh extension install github/gh-awInstallation
1. Copy the workflow file
Copy
.github/workflows/doc-bot.mdfrom this repository into the target repository:# From the target repository root mkdir -p .github/workflows cp /path/to/github-doc-bot/.github/workflows/doc-bot.md .github/workflows/2. Compile the workflow
This produces
.github/workflows/doc-bot.lock.yml— the compiled GitHub Actions workflow.3. Set secrets
The workflow requires two secrets:
ANTHROPIC_API_KEYDOCS_REPO_TOKENvaadin/docsCreating the
DOCS_REPO_TOKENCreate a Fine-grained Personal Access Token with:
vaadin/docsonly4. Commit and push
git add .github/workflows/doc-bot.md .github/workflows/doc-bot.lock.yml git commit -m "Add documentation bot workflow" git push5. Test
Open a PR with a user-facing change (e.g., adding a new public API method) and check the Actions tab. You should see:
vaadin/docsassigned to the PR authorAlso test with an internal-only change to verify the bot correctly skips documentation.
Organization-Wide Deployment
To deploy across multiple Vaadin repositories:
ANTHROPIC_API_KEYandDOCS_REPO_TOKENas organization secrets scoped to the relevant repositories.doc-bot.mdand rungh aw compilein each repository, then commit both files.Configuration
The workflow is configured in the frontmatter of
doc-bot.md. Key settings:timeout-minutes30drafttrueexpires14fallback-as-issuetruebase-branchmainvaadin/docsTroubleshooting
Workflow doesn't trigger
.lock.ymlfile is committed alongside the.mdfile.gh aw secrets list.PR creation fails
DOCS_REPO_TOKENhas write access tovaadin/docs.vaadin/docs.Duplicate docs PRs
synchronizeevents (PR updates), the bot searches for existing docs PRs before creating new ones. If duplicates appear, check that the branch naming pattern (doc-bot/<repo>/<pr-number>) is consistent.