forked from WordPress/gutenberg
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
90 changed files
with
1,043 additions
and
465 deletions.
There are no files selected for viewing
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
name: Sync Core Backport Issue | ||
|
||
on: | ||
push: | ||
branches: | ||
- trunk | ||
|
||
jobs: | ||
sync-backport-changelog: | ||
name: Sync Core Backport Issue | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | ||
with: | ||
fetch-depth: 2 # Fetch the last two commits to compare changes | ||
- name: Check for changes in backport-changelog | ||
run: | | ||
git diff --quiet HEAD^ HEAD -- backport-changelog || echo "changes=true" >> $GITHUB_OUTPUT | ||
- name: Sync Issue | ||
if: env.changes == 'true' | ||
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1 | ||
with: | ||
script: | | ||
const labelName = '🤖 Sync Backport Changelog'; | ||
const issues = await github.paginate(github.rest.issues.listForRepo, { | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
labels: [labelName], | ||
state: 'open', | ||
per_page: 1, | ||
}); | ||
if (issues.length === 0) { | ||
console.log(`No issues found with the "${labelName}" label.`); | ||
return; | ||
} | ||
const [latestIssue] = issues; | ||
const versionMatch = latestIssue.title.match(/(\d+\.\d+)/); | ||
if (!versionMatch) { | ||
console.log('Could not find a version number in the latest issue title.'); | ||
return; | ||
} | ||
const version = versionMatch[1]; | ||
console.log(`Latest version: ${version}`); | ||
const { execSync } = require('child_process'); | ||
const processedChangelog = execSync(`awk '/./ {print ($0 ~ /^[-*]/ ? " " : "- ") $0}' backport-changelog/${version}/*.md`).toString().trim(); | ||
const startDelimiter = '<!-- START TRUNK BACKPORT CHANGELOG -->'; | ||
const endDelimiter = '<!-- END TRUNK BACKPORT CHANGELOG -->'; | ||
const autoGeneratedContent = `${startDelimiter}\n${processedChangelog}\n${endDelimiter}`; | ||
const regex = new RegExp(`${startDelimiter}[\\s\\S]*${endDelimiter}`); | ||
let newBody; | ||
if (regex.test(latestIssue.body)) { | ||
// If delimiters exist, replace the content between them | ||
newBody = latestIssue.body.replace(regex, autoGeneratedContent); | ||
} else { | ||
// If delimiters don't exist, append the new content at the end | ||
newBody = `${latestIssue.body}\n\n${autoGeneratedContent}`; | ||
} | ||
if (newBody.trim() !== latestIssue.body.trim()) { | ||
await github.rest.issues.update({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
issue_number: latestIssue.number, | ||
body: newBody | ||
}); | ||
console.log('Issue description updated successfully.'); | ||
} else { | ||
console.log('Issue description is already up to date.'); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 5 additions & 1 deletion
6
packages/block-editor/src/components/font-appearance-control/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 3 additions & 5 deletions
8
packages/block-editor/src/components/font-appearance-control/style.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,6 @@ | ||
.components-font-appearance-control { | ||
ul { | ||
li { | ||
color: $gray-900; | ||
text-transform: capitalize; | ||
} | ||
[role="option"] { | ||
color: $gray-900; | ||
text-transform: capitalize; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.