Skip to content

Commit

Permalink
Auto-generate preview links for DOC PRs (#139593) (#139936)
Browse files Browse the repository at this point in the history
(cherry picked from commit 5ea3838)

Co-authored-by: Lisa Cawley <[email protected]>
  • Loading branch information
kibanamachine and lcawl authored Sep 1, 2022
1 parent af080d2 commit 0a230b2
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 3 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/docs-preview-links.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Docs Preview Links

on:
pull_request_target:
types: [opened]
paths:
- '**.asciidoc'

jobs:
doc-preview:
runs-on: ubuntu-latest
steps:
- uses: actions/github-script@v6
name: Add doc preview links
with:
script: |
const pr = context.payload.pull_request;
const comment = `Documentation preview:
- ✨ [Changed pages](https://${context.repo.repo}_${pr.number}.docs-preview.app.elstc.co/diff)`;
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: comment,
});
6 changes: 3 additions & 3 deletions docs/user/security/audit-logging.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
[[xpack-security-audit-logging]]
=== Audit logs

Audit logging is a https://www.elastic.co/subscriptions[subscription feature] that you can enable to keep track of security-related events,
Audit logging is a {subscriptions}[subscription feature] that you can enable to keep track of security-related events,
such as authorization success and failures. Logging these events enables you to monitor {kib} for suspicious activity and provides evidence
in the event of an attack.

Expand Down Expand Up @@ -410,7 +410,7 @@ Example: `[marketing]`
Example: `get`, `post`, `put`, `delete`

| `url.domain`
| Domain of the url.
| Domain of the URL.

Example: `www.elastic.co`

Expand Down Expand Up @@ -440,7 +440,7 @@ Example: `https`
| *Description*

| [[field-trace-id]] `trace.id`
| Unique identifier allowing events of the same transaction from {kib} and {es} to be be correlated.
| Unique identifier allowing events of the same transaction from {kib} and {es} to be correlated.

|======

Expand Down

0 comments on commit 0a230b2

Please sign in to comment.