Skip to content
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

Auto-generate preview links for PRs #2391

Merged
merged 2 commits into from
Aug 31, 2022
Merged

Conversation

joepeeples
Copy link
Contributor

@joepeeples joepeeples commented Aug 26, 2022

Addresses #2312. Adds a GitHub Action that will automatically create preview links when a pull request is created. Links are added in a comment on the PR.

image

Notes

  • The GitHub Action runs as a check alongside other checks (such as CI, Mergify, etc.) but only runs when the PR is first opened.
  • Heavily modeled after the GH Action that Enterprise Search recently implemented in https://github.com/elastic/enterprise-search-pubs/pull/2666.
  • Future enhancement possibilities:
    • Wait until CI has successfully built the preview, to ensure no dead links (Logstash's preview Action currently does this).
    • Create targeted links to the specific pages changed in the PR (currently the docs link is just top-level landing page).

Copy link
Member

@bmorelli25 bmorelli25 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks pretty good to me 🚀

@joepeeples joepeeples marked this pull request as ready for review August 26, 2022 18:04
@joepeeples
Copy link
Contributor Author

joepeeples commented Aug 26, 2022

Some teams are using path filters to create preview links only when PRs involve certain paths (such as docs/*) or file types (such as .asciidoc), but that doesn't seem necessary for the security-docs repo.

This repo is self-contained to focus only on docs, so we don't need to account for non-docs PRs the way other teams might if their docs cohabitate with code. We can always add filters later if we find the Action to be too noisy, but I think we'll want preview links for the vast majority of PRs in security-docs.

Copy link
Contributor

@jmikell821 jmikell821 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This LGTM! 👍 Thanks for getting this set up :)

Copy link
Contributor

@nastasha-solomon nastasha-solomon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀 🚀 🚀

@joepeeples joepeeples merged commit 7373755 into main Aug 31, 2022
mergify bot pushed a commit that referenced this pull request Aug 31, 2022
joepeeples added a commit that referenced this pull request Aug 31, 2022
(cherry picked from commit 7373755)

Co-authored-by: Joe Peeples <[email protected]>
@joepeeples joepeeples deleted the issue-2312-preview-links branch August 31, 2022 20:10
joepeeples added a commit to joepeeples/security-docs that referenced this pull request Aug 31, 2022
joepeeples added a commit to joepeeples/security-docs that referenced this pull request Aug 31, 2022
joepeeples added a commit to joepeeples/security-docs that referenced this pull request Aug 31, 2022
@joepeeples
Copy link
Contributor Author

💚 All backports created successfully

Status Branch Result
8.3
8.2
8.1
8.0
7.17

Questions ?

Please refer to the Backport tool documentation

joepeeples added a commit to joepeeples/security-docs that referenced this pull request Aug 31, 2022
joepeeples added a commit to joepeeples/security-docs that referenced this pull request Aug 31, 2022
joepeeples added a commit that referenced this pull request Aug 31, 2022
joepeeples added a commit that referenced this pull request Aug 31, 2022
joepeeples added a commit that referenced this pull request Aug 31, 2022
joepeeples added a commit that referenced this pull request Aug 31, 2022
joepeeples added a commit that referenced this pull request Aug 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants