Skip to content

Commit 2d5bf36

Browse files
committed
Merge remote-tracking branch 'origin/main' into patch-1
2 parents 0948aa2 + 48ca890 commit 2d5bf36

File tree

189 files changed

+24537
-51616
lines changed

Some content is hidden

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

189 files changed

+24537
-51616
lines changed

.changeset/changelog-config.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
// Half-works to simplify the format but needs 'overwrite_changeset_changelog.py' in GHA to finish formatting
2-
31
const getReleaseLine = async (changeset) => {
42
const [firstLine] = changeset.summary
53
.split("\n")

.eslintrc.json

Lines changed: 0 additions & 25 deletions
This file was deleted.

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
demo.gif filter=lfs diff=lfs merge=lfs -text
22
assets/docs/demo.gif filter=lfs diff=lfs merge=lfs -text
3+
src/assets/docs/demo.gif filter=lfs diff=lfs merge=lfs -text

.github/actions/ai-release-notes/action.yml

Lines changed: 0 additions & 83 deletions
This file was deleted.

.github/scripts/ai-release-notes.py

Lines changed: 0 additions & 123 deletions
This file was deleted.

.github/scripts/get_prev_version_refs.py

Lines changed: 0 additions & 52 deletions
This file was deleted.

.github/scripts/overwrite_changeset_changelog.py

100755100644
Lines changed: 31 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,11 @@
2424
import os
2525

2626
CHANGELOG_PATH = os.environ.get("CHANGELOG_PATH", "CHANGELOG.md")
27-
VERSION = os.environ['VERSION']
27+
VERSION = os.environ["VERSION"]
2828
PREV_VERSION = os.environ.get("PREV_VERSION", "")
2929
NEW_CONTENT = os.environ.get("NEW_CONTENT", "")
3030

31+
3132
def overwrite_changelog_section(changelog_text: str, new_content: str):
3233
# Find the section for the specified version
3334
version_pattern = f"## {VERSION}\n"
@@ -36,27 +37,46 @@ def overwrite_changelog_section(changelog_text: str, new_content: str):
3637
print(f"prev_version: {PREV_VERSION}")
3738

3839
notes_start_index = changelog_text.find(version_pattern) + len(version_pattern)
39-
notes_end_index = changelog_text.find(prev_version_pattern, notes_start_index) if PREV_VERSION and prev_version_pattern in changelog_text else len(changelog_text)
40+
notes_end_index = (
41+
changelog_text.find(prev_version_pattern, notes_start_index)
42+
if PREV_VERSION and prev_version_pattern in changelog_text
43+
else len(changelog_text)
44+
)
4045

4146
if new_content:
42-
return changelog_text[:notes_start_index] + f"{new_content}\n" + changelog_text[notes_end_index:]
47+
return (
48+
changelog_text[:notes_start_index]
49+
+ f"{new_content}\n"
50+
+ changelog_text[notes_end_index:]
51+
)
4352
else:
4453
changeset_lines = changelog_text[notes_start_index:notes_end_index].split("\n")
4554
# Remove the first two lines from the regular changeset format, ex: \n### Patch Changes
46-
parsed_lines = "\n".join(changeset_lines[2:])
47-
updated_changelog = changelog_text[:notes_start_index] + parsed_lines + changelog_text[notes_end_index:]
48-
updated_changelog = updated_changelog.replace(f"## {VERSION}", f"## [{VERSION}]")
55+
parsed_lines = "\n".join(changeset_lines[2:])
56+
updated_changelog = (
57+
changelog_text[:notes_start_index]
58+
+ parsed_lines
59+
+ changelog_text[notes_end_index:]
60+
)
61+
updated_changelog = updated_changelog.replace(
62+
f"## {VERSION}", f"## [{VERSION}]"
63+
)
4964
return updated_changelog
5065

51-
with open(CHANGELOG_PATH, 'r') as f:
66+
67+
with open(CHANGELOG_PATH, "r") as f:
5268
changelog_content = f.read()
5369

5470
new_changelog = overwrite_changelog_section(changelog_content, NEW_CONTENT)
55-
print("----------------------------------------------------------------------------------")
71+
print(
72+
"----------------------------------------------------------------------------------"
73+
)
5674
print(new_changelog)
57-
print("----------------------------------------------------------------------------------")
75+
print(
76+
"----------------------------------------------------------------------------------"
77+
)
5878
# Write back to CHANGELOG.md
59-
with open(CHANGELOG_PATH, 'w') as f:
79+
with open(CHANGELOG_PATH, "w") as f:
6080
f.write(new_changelog)
6181

62-
print(f"{CHANGELOG_PATH} updated successfully!")
82+
print(f"{CHANGELOG_PATH} updated successfully!")

0 commit comments

Comments
 (0)