Skip to content

[DOCS] Add docs-preview-comment.yml #129485

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

Merged
merged 2 commits into from
Jun 17, 2025
Merged

[DOCS] Add docs-preview-comment.yml #129485

merged 2 commits into from
Jun 17, 2025

Conversation

leemthompo
Copy link
Contributor

@leemthompo leemthompo commented Jun 16, 2025

Note

This will probably eventually be built into the docs-build and we'll be able to remove this standalone workflow

Copies workflow added to docs-content repo in elastic/docs-content#1341

• triggers on pull request events (open, reopen, sync) to comment with URL preview links for changed docs
• fetches all files in the pr using github api
• filters for added/modified .md files, excluding removed files and _snippets/ directory
• checks for existing bot comment
• updates existing comment or creates new one if none exists

Copies workflow added to `docs-content` repo in elastic/docs-content#1341

• triggers on pull request events (open, reopen, sync)
• comments with URL preview links for changed docs
• fetches all files in the pr using github api
• filters for added/modified .md files, excluding removed files and _snippets/ directory
• transforms file paths into preview urls on docs-v3-preview.elastic.dev
• checks for existing bot comment
  • updates existing comment or creates new one if none exists
@leemthompo leemthompo requested a review from breskeby June 16, 2025 13:49
@leemthompo leemthompo self-assigned this Jun 16, 2025
@leemthompo leemthompo added >docs General docs changes Team:Docs Meta label for docs team labels Jun 16, 2025
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-docs (Team:Docs)

- changed event trigger from pull_request to pull_request_target
- added permissions for contents: read, issues: write, pull-requests: write
@leemthompo leemthompo merged commit 1ec4e0b into main Jun 17, 2025
25 checks passed
@leemthompo leemthompo deleted the leemthompo-patch-5 branch June 17, 2025 07:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>docs General docs changes Team:Docs Meta label for docs team v9.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants