Skip to content

Commit 1d247a9

Browse files
authored
Merge branch 'main' into devalog/oauth
2 parents 3e2883f + 3992207 commit 1d247a9

File tree

233 files changed

+5861
-1550
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

233 files changed

+5861
-1550
lines changed
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# .github/workflows/auto-merge-on-release.yml in docs repo
2+
name: Auto-merge on Docs Release
3+
on:
4+
repository_dispatch:
5+
types: [docs_release]
6+
7+
jobs:
8+
merge-dependent-prs:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Find and merge dependent PRs
12+
uses: actions/github-script@v7
13+
with:
14+
script: |
15+
const version = context.payload.client_payload.version;
16+
17+
// Find PRs with matching labels
18+
const { data: prs } = await github.rest.pulls.list({
19+
owner: context.repo.owner,
20+
repo: context.repo.repo,
21+
state: 'open'
22+
});
23+
24+
for (const pr of prs) {
25+
const labels = pr.labels.map(l => l.name);
26+
const hasLatestLabel = labels.includes('depends-on: docs@latest');
27+
const hasVersionLabel = labels.includes(`depends-on: docs@${version}`);
28+
29+
if (hasLatestLabel || hasVersionLabel) {
30+
// Check if PR is approved and CI passes
31+
const { data: reviews } = await github.rest.pulls.listReviews({
32+
owner: context.repo.owner,
33+
repo: context.repo.repo,
34+
pull_number: pr.number
35+
});
36+
37+
const approved = reviews.some(r => r.state === 'APPROVED');
38+
39+
if (approved) {
40+
await github.rest.pulls.merge({
41+
owner: context.repo.owner,
42+
repo: context.repo.repo,
43+
pull_number: pr.number,
44+
merge_method: 'squash'
45+
});
46+
47+
console.log(`Merged PR #${pr.number}: ${pr.title}`);
48+
}
49+
}
50+
}

.github/workflows/vale.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Vale style check
2+
on:
3+
pull_request:
4+
paths:
5+
- '**.mdx'
6+
- '**.md'
7+
- '.vale/**'
8+
- '.vale.ini'
9+
- '!**/changelog/**'
10+
11+
jobs:
12+
vale:
13+
runs-on: ubuntu-latest
14+
if: |
15+
github.event.pull_request.user.login != 'fern-support' &&
16+
github.event.pull_request.user.login != 'github-actions'
17+
steps:
18+
- uses: actions/checkout@v4
19+
20+
- name: Get changed files
21+
id: changed-files
22+
uses: tj-actions/changed-files@v41
23+
with:
24+
files: |
25+
fern/**/*.md
26+
fern/**/*.mdx
27+
files_ignore: |
28+
**/changelog/**
29+
- uses: errata-ai/vale-action@reviewdog
30+
if: steps.changed-files.outputs.any_changed == 'true'
31+
with:
32+
files: ${{ steps.changed-files.outputs.all_changed_files }}
33+
version: 3.12.0
34+
reporter: github-pr-review
35+
fail_on_error: false
36+
env:
37+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

.pre-commit-config.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
repos:
2+
- repo: local
3+
hooks:
4+
- id: vale
5+
name: vale
6+
entry: bash -c 'vale --config=.vale.ini "$@"; exit 0' --
7+
language: system
8+
files: \.(md|mdx)$
9+
exclude: 'changelog/'
10+
pass_filenames: true
11+
verbose: true

.vale.ini

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
StylesPath = .vale/styles
2+
3+
MinAlertLevel = suggestion
4+
5+
Packages = Microsoft
6+
7+
[formats]
8+
mdx = md
9+
10+
[*.mdx]
11+
BasedOnStyles = Microsoft, FernStyles
12+
13+
# Disable specific rules
14+
# Not relevant for technical documentation
15+
Microsoft.GenderBias = NO
16+
17+
# Too granular
18+
Microsoft.Accessibility = NO
19+
Microsoft.Passive = NO
20+
Microsoft.Suspended = NO
21+
Microsoft.Vocab = NO
22+
Microsoft.Spacing = NO
23+
Microsoft.Semicolon = NO # Mostly just picks up code
24+
Microsoft.SentenceLength = NO # Mostly just picks up code
25+
Microsoft.Dashes = NO
26+
Microsoft.Foreign = NO
27+
28+
# Not relevant for Fern audience
29+
Microsoft.GeneralURL = NO
30+
Microsoft.HeadingAcronyms = NO
31+
Microsoft.Terms = NO
32+
33+
# Handled in FernStyles
34+
Microsoft.Acronyms = NO
35+
Microsoft.Adverbs = NO
36+
Microsoft.Ellipses = NO
37+
Microsoft.FirstPerson = NO
38+
Microsoft.Headings = NO
39+
Microsoft.HeadingPunctuation = NO
40+
Microsoft.Hyphens = NO
41+
Microsoft.We = NO
42+
43+
44+
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
extends: conditional
2+
message: "'%s' has no definition."
3+
link: https://docs.microsoft.com/en-us/style-guide/acronyms
4+
level: suggestion
5+
ignorecase: false
6+
# Ensures that the existence of 'first' implies the existence of 'second'.
7+
first: '\b([A-Z]{3,5})\b'
8+
second: '(?:\b[A-Z][a-z]+ )+\(([A-Z]{3,5})\)'
9+
# ... with the exception of these:
10+
exceptions:
11+
- API
12+
- ASP
13+
- CLI
14+
- CNAME
15+
- CPU
16+
- CSS
17+
- CSV
18+
- DEBUG
19+
- DNS
20+
- DOM
21+
- DPI
22+
- FAQ
23+
- GCC
24+
- GDB
25+
- GET
26+
- GPU
27+
- GTK
28+
- GUI
29+
- HTML
30+
- HTTP
31+
- HTTPS
32+
- IDE
33+
- JAR
34+
- JSON
35+
- JSX
36+
- LESS
37+
- LLDB
38+
- NET
39+
- NOTE
40+
- NVDA
41+
- OSS
42+
- PATH
43+
- PDF
44+
- PHP
45+
- POST
46+
- RAM
47+
- REPL
48+
- RSA
49+
- SCM
50+
- SCSS
51+
- SDK
52+
- SQL
53+
- SSH
54+
- SSL
55+
- SVG
56+
- TBD
57+
- TCP
58+
- TODO
59+
- TXT
60+
- URI
61+
- URL
62+
- USB
63+
- UTF
64+
- XML
65+
- XSS
66+
- YAML
67+
- ZIP
68+
- SEO
69+
- TLS
70+
- BCL
71+
- LLM
72+
- MDX
73+
- SEO
74+
- AWS
75+
- OpenRPC
76+
- gRPC
77+
- RPC

0 commit comments

Comments
 (0)