Skip to content

Commit bd93075

Browse files
committed
Merge scalar-generated into scalar-next (build IH3BDnxtHmM921XNjvyZj)
2 parents dc1f57e + bd41de9 commit bd93075

73 files changed

Lines changed: 1295 additions & 958 deletions

File tree

Some content is hidden

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

.claude/skills/scalar-api-python-sdk/SKILL.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ client = Scalar(
4141
)
4242

4343
registry = client.registry.list_all_api_documents()
44+
4445
print(registry)
4546
```
4647

.github/workflows/release-title-edit.yml

Lines changed: 34 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,24 @@ jobs:
1515
version-consistency:
1616
# Also the check name the release PR's footer tells maintainers to wait for.
1717
name: Release PR version
18-
# Only the platform's release PR carries a version in its title; every other pull request
19-
# skips this job, which GitHub reports as neutral. The release may be presented from
20-
# scalar-next itself or from the release-please branch rendered off it, so both heads
21-
# count as the release PR.
18+
# A release-shaped title against the release branch is the whole test here, with no clause
19+
# on who opened the pull request or what branch it is rendered onto. This job only reads,
20+
# and a pull request claiming to be a release is worth checking against the committed
21+
# version whoever opened it. Every other pull request skips this job, which GitHub reports
22+
# as neutral.
23+
#
24+
# Loose on purpose: the prefix, not the full semver pattern the script matches. A version
25+
# typo'd into the title still reaches the script and fails there, rather than falling out
26+
# of the guard and leaving no check at all — a missing check is not a failing one, and this
27+
# is the check the release PR's footer tells maintainers to wait for before merging.
28+
#
29+
# It is also what keeps the workflow from failing silently if the platform ever opens
30+
# release PRs from a different account: the bridge below stops firing, but this check still
31+
# runs, the retitled version and the committed one disagree, and it turns red. The merge is
32+
# blocked loudly instead of releasing the old version.
2233
if: >-
2334
${{ github.event.pull_request.base.ref == 'main'
24-
&& (github.event.pull_request.head.ref == 'scalar-next'
25-
|| startsWith(github.event.pull_request.head.ref, 'release-please--branches--scalar-next--')) }}
35+
&& startsWith(github.event.pull_request.title, 'release: ') }}
2636
runs-on: ubuntu-latest
2737
steps:
2838
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
@@ -60,14 +70,30 @@ jobs:
6070
# release PR from). `changes.title` is only set when the title itself changed, and bot
6171
# senders are ignored so the platform's own retitles cannot bounce back into another
6272
# commit.
73+
#
74+
# Both signals are required here, unlike the read-only check above, and each covers what the
75+
# other cannot. The author, because this job pushes with `contents: write` and a title is
76+
# free text — anyone able to open a pull request against main could otherwise
77+
# name a version and have it committed to scalar-next. `user.login` is set by GitHub when
78+
# the pull request is opened and cannot be forged by whoever edits the title afterwards.
79+
# The title, because those accounts open pull requests other than release PRs, and retitling
80+
# one of those must not push a release.
81+
#
82+
# One login per platform deployment, since a repo generated by staging carries staging's
83+
# app. Parenthesised because the group is ANDed with the title clause below: without the
84+
# parens that `&&` would bind to the last login alone, letting the other accounts push a
85+
# release off any title. Listed rather than matched on the shared `scalar-docs` stem — a
86+
# prefix test would also admit any future `scalar-docs-*[bot]`, including someone else's.
6387
if: >-
6488
${{ github.event.action == 'edited'
6589
&& github.event.changes.title != null
6690
&& github.event.sender.type != 'Bot'
6791
&& github.event.pull_request.state == 'open'
6892
&& github.event.pull_request.base.ref == 'main'
69-
&& (github.event.pull_request.head.ref == 'scalar-next'
70-
|| startsWith(github.event.pull_request.head.ref, 'release-please--branches--scalar-next--')) }}
93+
&& (github.event.pull_request.user.login == 'scalar-docs[bot]'
94+
|| github.event.pull_request.user.login == 'scalar-docs-staging[bot]'
95+
|| github.event.pull_request.user.login == 'scalar-docs-development[bot]')
96+
&& startsWith(github.event.pull_request.title, 'release: ') }}
7197
# One bridge run at a time per pull request, newest retitle wins. Two retitles in quick
7298
# succession (a version typo corrected seconds later) would otherwise start two runs that
7399
# both read the version committed on the PR head, both get past the no-op guard, and both

.github/workflows/sdk-ci.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,8 @@ jobs:
1414
python-version: "3.11"
1515
- run: python -m pip install --upgrade build
1616
- run: python -m build
17+
# Verification only, never auto-fix: the SDK is generated formatted, so a diff here means
18+
# either hand-edited custom code or a regenerate that was not committed. ruff is pinned to
19+
# the release that produced these bytes, since a formatter minor can change them.
20+
- run: python -m pip install "ruff==0.16.1"
21+
- run: ruff format --check .

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@
186186
same "printed page" as the copyright notice for easier
187187
identification within third-party archives.
188188

189-
Copyright [yyyy] [name of copyright owner]
189+
Copyright 2026 Scalar API
190190

191191
Licensed under the Apache License, Version 2.0 (the "License");
192192
you may not use this file except in compliance with the License.

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ client = Scalar(
4242
)
4343

4444
registry = client.registry.list_all_api_documents()
45+
4546
print(registry)
4647
```
4748

@@ -60,10 +61,12 @@ import asyncio
6061

6162
from scalar_sdk import AsyncScalar
6263

64+
6365
async def main() -> None:
6466
client = AsyncScalar()
6567
registry = await client.registry.list_all_api_documents()
6668

69+
6770
asyncio.run(main())
6871
```
6972

SKILL.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ client = Scalar(
4141
)
4242

4343
registry = client.registry.list_all_api_documents()
44+
4445
print(registry)
4546
```
4647

api.md

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -482,8 +482,35 @@ Create a login portal for the current team.
482482
login_portal = client.login_portals.create(
483483
title="",
484484
slug="",
485-
email={"logo": "", "logo_size": "100", "button_text": "Login", "message": "Click to access private documentation hosted by scalar.com", "title": "Private Docs", "main_color": "#2a2f45", "main_background": "#f6f6f6", "card_color": "2a2f45", "card_background": "#fff", "button_color": "#fff", "button_background": "#0f0f0f"},
486-
page={"title": "Scalar Private Docs", "description": "Login to access your documentation", "head": "", "script": "", "theme": "", "company_name": "", "logo": "", "logo_url": "", "favicon": "", "terms_link": "", "privacy_link": "", "form_title": "Scalar Private Docs", "form_description": "Login to access your documentation", "form_image": ""},
485+
email={
486+
"logo": "",
487+
"logo_size": "100",
488+
"button_text": "Login",
489+
"message": "Click to access private documentation hosted by scalar.com",
490+
"title": "Private Docs",
491+
"main_color": "#2a2f45",
492+
"main_background": "#f6f6f6",
493+
"card_color": "2a2f45",
494+
"card_background": "#fff",
495+
"button_color": "#fff",
496+
"button_background": "#0f0f0f",
497+
},
498+
page={
499+
"title": "Scalar Private Docs",
500+
"description": "Login to access your documentation",
501+
"head": "",
502+
"script": "",
503+
"theme": "",
504+
"company_name": "",
505+
"logo": "",
506+
"logo_url": "",
507+
"favicon": "",
508+
"terms_link": "",
509+
"privacy_link": "",
510+
"form_title": "Scalar Private Docs",
511+
"form_description": "Login to access your documentation",
512+
"form_image": "",
513+
},
487514
)
488515
```
489516

0 commit comments

Comments
 (0)