-
Notifications
You must be signed in to change notification settings - Fork 78
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/dev' into benelan/element-internals
* origin/dev: (230 commits) chore: release next chore(sort-handle): add messages (#10474) feat(accordion-item): stretch slotted actions to fill its height (#9250) chore: release next feat(dialog, modal, popover, input-date-picker, input-time-picker, sheet): support stacked component sequential closing with escape (#9231) chore: remove commented-out code (#10478) chore: add cssrem VSCode extension recommendation (#10300) docs(accordion-item): fix deprecation tag (#10479) chore: release next feat(stepper-item): update component's active state background color. (#10475) refactor: use `requestAnimationFrame` to replace `readTask` (#10432) chore: release next fix(tip): fix rendering tied to named-slot content (#10470) ci: compile estimate totals per milestone (#10442) chore: release next fix(modal): fix rendering tied to named-slot content (#10469) chore: release next fix(shell-center-row): fix rendering tied to named-slot content (#10451) fix(inline-editable): fix rendering tied to default slot content (#10456) fix(input, input-number, input-text): should not set slotted actions to be disabled (#10458) ...
- Loading branch information
Showing
626 changed files
with
21,374 additions
and
6,495 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
// @ts-check | ||
const { writeFile } = require("fs/promises"); | ||
|
||
/** @param {import('github-script').AsyncFunctionArguments} AsyncFunctionArguments */ | ||
module.exports = async ({ github, context, core }) => { | ||
const { repo, owner } = context.repo; | ||
|
||
const outputJson = {}; | ||
let outputCsv = "id,title,due_on,open_issues,closed_issues,remaining_estimate,completed_estimate"; | ||
|
||
try { | ||
const milestones = await github.rest.issues.listMilestones({ | ||
owner: owner, | ||
repo: repo, | ||
state: "all", | ||
sort: "due_on", | ||
per_page: 100, | ||
direction: "desc", | ||
}); | ||
|
||
if (milestones.data.length === 0) { | ||
console.error("No milestones found."); | ||
process.exit(1); | ||
} | ||
|
||
for (const milestone of milestones.data) { | ||
outputJson[milestone.number] = { | ||
title: milestone.title, | ||
due_on: milestone.due_on, | ||
open_issues: milestone.open_issues, | ||
closed_issues: milestone.closed_issues, | ||
remaining_estimate: 0, | ||
completed_estimate: 0, | ||
}; | ||
|
||
const issues = await github.paginate(github.rest.issues.listForRepo, { | ||
// @ts-ignore milestone.number is valid: https://docs.github.com/en/rest/issues/issues#list-repository-issues--parameters | ||
milestone: milestone.number, | ||
owner: owner, | ||
repo: repo, | ||
state: "all", | ||
per_page: 100, | ||
}); | ||
|
||
for (const issue of issues) { | ||
if (issue.pull_request) { | ||
continue; | ||
} | ||
|
||
for (const label of issue.labels) { | ||
const estimateLabelMatch = (typeof label === "string" ? label : label?.name)?.match(/estimate - (\d+)/); | ||
|
||
if (estimateLabelMatch?.length > 1) { | ||
outputJson[milestone.number][issue.state === "open" ? "remaining_estimate" : "completed_estimate"] += | ||
Number.parseInt(estimateLabelMatch[1]); | ||
|
||
break; // assumes an issue will only have one estimate label | ||
} | ||
} | ||
} | ||
|
||
outputCsv = `${outputCsv}\n${milestone.number},${Object.values(outputJson[milestone.number]).join(",")}`; | ||
} | ||
|
||
const stringifiedOutputJson = JSON.stringify(outputJson, null, 2); | ||
|
||
core.debug(`JSON Output:\n${stringifiedOutputJson}`); | ||
core.debug(`CSV Output:\n${outputCsv}`); | ||
|
||
await writeFile("./milestone-estimates.csv", outputCsv); | ||
await writeFile("./milestone-estimates.json", stringifiedOutputJson); | ||
|
||
process.exit(0); | ||
} catch (error) { | ||
console.error(error); | ||
process.exit(1); | ||
} | ||
}; |
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,21 @@ | ||
name: Track Milestone Estimates | ||
on: | ||
workflow_dispatch: | ||
issues: | ||
types: [closed] | ||
jobs: | ||
estimates: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Create estimates data | ||
uses: actions/github-script@v7 | ||
with: | ||
script: | | ||
const action = require('${{ github.workspace }}/.github/scripts/trackMilestoneEstimates.js') | ||
await action({github, context, core}) | ||
- name: Upload estimates data | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: milestone-estimates | ||
path: milestone-estimates.* |
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,11 +1,67 @@ | ||
#!/usr/bin/env sh | ||
|
||
lint-staged | ||
|
||
types_path="packages/calcite-components/src/components.d.ts" | ||
ensure_types_are_up_to_date() { | ||
types_path="packages/calcite-components/src/components.d.ts" | ||
|
||
# make sure the types are always up to date | ||
if [ -n "$(git diff --name-only -- "$types_path")" ]; then | ||
if [ -n "$(git diff --name-only -- "$types_path")" ]; then | ||
echo "Automatically staging changes to \"$types_path\"" | ||
git add "$types_path" | ||
fi | ||
git add "$types_path" >/dev/null 2>&1 || true | ||
fi | ||
} | ||
|
||
update_stylelint_config_if_sass_file_edited() { | ||
staged_files="$( | ||
git diff --cached --name-only --diff-filter=ACM -- packages/**/*.scss | ||
)" | ||
|
||
if [ -n "$staged_files" ]; then | ||
npm run util:update-stylelint-custom-sass-functions | ||
git add "packages/calcite-components/.stylelintrc.cjs" >/dev/null 2>&1 || true | ||
fi | ||
|
||
unset staged_files | ||
} | ||
|
||
check_ui_icon_name_consistency() { | ||
# this pattern checks for `<iconName>-<size>.svg` or `<iconName>-<size>-f.svg` for filled icons | ||
# where `<iconName>` is kebab-case, `<size>` is 16, 24, or 32 | ||
valid_pattern="^[a-z0-9-]+-(16|24|32)(-f)?\\.svg$" | ||
|
||
# this pattern will check for invalid use of "-f-" anywhere except right before the size | ||
invalid_pattern="-[a-z0-9]+-f-" | ||
|
||
staged_files="$( | ||
git diff --cached --name-only --diff-filter=ACM -- packages/calcite-ui-icons/icons/*.svg | ||
)" | ||
|
||
if [ -n "$staged_files" ]; then | ||
for file in $staged_files; do | ||
filename="$(basename "$file")" | ||
|
||
# first, ensure the filename follows the valid pattern | ||
if ! echo "$filename" | grep -qE "$valid_pattern"; then | ||
printf "%s\n%s" \ | ||
"error: file '$file' does not follow the naming convention:" \ | ||
"(<iconname>-<size>.svg | <iconname>-<size>-f.svg)" | ||
exit 1 | ||
fi | ||
|
||
# then, ensure there's no invalid use of "-f-" anywhere except right before the size | ||
if echo "$filename" | grep -qE "$invalid_pattern"; then | ||
printf '%s\n%s' \ | ||
"error: file '$file' has an invalid '-f-' and does not follow the naming convention:" \ | ||
"(<iconname>-<size>.svg | <iconname>-<size>-f.svg)" | ||
exit 1 | ||
fi | ||
done | ||
fi | ||
|
||
unset staged_files | ||
} | ||
|
||
lint-staged | ||
check_ui_icon_name_consistency | ||
ensure_types_are_up_to_date | ||
update_stylelint_config_if_sass_file_edited | ||
|
||
exit 0 |
Oops, something went wrong.