-
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 6646-advanced-table
* origin/dev: (322 commits) chore: add ui icons package to enhancement template (#11344) chore(table): move workaround comment back to its usage (#11341) ci(actions): refine remove-issue-from-design-projects workflow (#11325) chore(actions): add icon leads notification for calcite-ui-icons requests (#11263) test(combobox): use async expect for non-throwing test case (#11332) fix(combobox, input-time-zone): fix initial item selection delay (#11326) build(deps): update dependency type-fest to v4.32.0 (#11308) chore(utility-network-layer, crosshair): add font codepoints (#11336) refactor(loadable): deprecate obsolete helpers (#11312) chore: release next feat: add crosshair (#11331) build(deps): update arcgis to ^4.32.0-next.81 (#11273) ci(actions): add action to remove issues from design projects (#11249) chore: release next fix(list-item): reflect the sortHandleOpen property (#11323) refactor(block): heading text color (#11314) chore: release next fix(list): only focus on row when clicking a list item (#11310) fix(tooltip, popover): honor prevented events (#11278) chore: release next ...
- Loading branch information
Showing
2,747 changed files
with
18,670 additions
and
90,063 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 was deleted.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
const baseConfig = require("../../.lintstagedrc.js"); | ||
|
||
module.exports = { | ||
...baseConfig, | ||
"*.{m,c,}js": ["eslint --fix", "prettier --write"], | ||
}; |
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,24 @@ | ||
const globals = require("globals"); | ||
const eslint = require("@eslint/js"); | ||
const tseslint = require("typescript-eslint"); | ||
const cspellPlugin = require("@cspell/eslint-plugin"); | ||
|
||
module.exports = tseslint.config({ | ||
files: ["**/*.{c,m,}js"], | ||
extends: [eslint.configs.recommended, tseslint.configs.recommended], | ||
plugins: { "@cspell": cspellPlugin }, | ||
|
||
languageOptions: { | ||
ecmaVersion: 2021, | ||
sourceType: "commonjs", | ||
globals: { | ||
...globals.node, | ||
}, | ||
}, | ||
|
||
rules: { | ||
"comma-dangle": "off", | ||
"@cspell/spellchecker": ["warn", {}], | ||
"@typescript-eslint/no-require-imports": "off", | ||
}, | ||
}); |
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,33 @@ | ||
// @ts-check | ||
|
||
// If the "calcite-ui-icons" label is added to an issue, generates a notification to the Icons team leads to review | ||
// The secret is formatted like so: icon-team-member-1, icon-team-member-2, icon-team-member-3 | ||
// Note the script automatically adds the "@" character in to notify the icon team lead(s) | ||
|
||
/** @param {import('github-script').AsyncFunctionArguments} AsyncFunctionArguments */ | ||
module.exports = async ({ github, context }) => { | ||
const { repo, owner } = context.repo; | ||
|
||
const payload = /** @type {import('@octokit/webhooks-types').IssuesLabeledEvent} */ (context.payload); | ||
const { | ||
issue: { number }, | ||
} = payload; | ||
|
||
const { ICONS_TEAM } = process.env; | ||
|
||
// Add a "@" character to notify the user | ||
const icon_leads = ICONS_TEAM?.split(",").map((v) => " @" + v.trim()); | ||
|
||
if (!icon_leads?.length) { | ||
console.error("unable to determine icon leads"); | ||
process.exit(1); | ||
} | ||
|
||
// Add a comment to issues with the 'calcite-ui-icons' label to notify icon team lead(s) | ||
await github.rest.issues.createComment({ | ||
owner, | ||
repo, | ||
issue_number: number, | ||
body: `cc ${icon_leads}`, | ||
}); | ||
}; |
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,45 @@ | ||
// @ts-check | ||
const { | ||
labels: { planning }, | ||
} = require("./support/resources"); | ||
|
||
/** @param {import('github-script').AsyncFunctionArguments} AsyncFunctionArguments */ | ||
module.exports = async ({ github, context }) => { | ||
const { repo, owner } = context.repo; | ||
const payload = /** @type {import('@octokit/webhooks-types').PullRequestLabeledEvent} */ (context.payload); | ||
const { | ||
label, | ||
pull_request: { number }, | ||
} = payload; | ||
|
||
const pullRequestBody = payload.pull_request.body; | ||
const omitComment = `\n\nBEGIN_COMMIT_OVERRIDE\nomitted from changelog\nEND_COMMIT_OVERRIDE`; | ||
const omitCommentRegex = /BEGIN_COMMIT_OVERRIDE/gm; | ||
|
||
if (!pullRequestBody) { | ||
console.log("No issue body was found, ending run."); | ||
return; | ||
} | ||
|
||
if (pullRequestBody.match(omitCommentRegex)) { | ||
console.log("This PR is already omitted from the changelog, ending run."); | ||
return; | ||
} | ||
|
||
if (label?.name === planning.noChangelogEntry) { | ||
const pullRequestProps = { | ||
owner, | ||
repo, | ||
pull_number: number, | ||
}; | ||
|
||
const newPullRequestBody = `${pullRequestBody}${omitComment}`; | ||
|
||
await github.rest.pulls.update({ | ||
...pullRequestProps, | ||
body: newPullRequestBody, | ||
}); | ||
} else { | ||
console.log(`The \`no changelog entry\` label is not present on this PR.`); | ||
} | ||
}; |
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,63 @@ | ||
const { execSync } = require("child_process"); | ||
|
||
// Environment variables from the GitHub Action | ||
const owner = process.env.OWNER; | ||
const repo = process.env.REPO; | ||
const issueNumber = process.env.ISSUE_NUMBER; | ||
|
||
// Function to execute a GitHub GraphQL command | ||
function runQuery(query) { | ||
const command = `gh api graphql -f query='${query}' -F owner="${owner}" -F repo="${repo}" -F issueNumber=${issueNumber}`; | ||
return execSync(command, { encoding: "utf-8" }); | ||
} | ||
|
||
// Function to create a comment | ||
async function createComment(body) { | ||
const command = `gh issue comment ${issueNumber} --body "${body}"`; | ||
return execSync(command, { encoding: "utf-8" }); | ||
} | ||
|
||
// GraphQL query to find the project associated with the issue | ||
const query = ` | ||
query($owner: String!, $repo: String!, $issueNumber: Int!) { | ||
repository(owner: $owner, name: $repo) { | ||
id | ||
nameWithOwner | ||
description | ||
issue(number: $issueNumber) { | ||
id | ||
title | ||
projectItems(first: 1) { | ||
nodes { | ||
id | ||
project { | ||
id | ||
title | ||
url | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
`; | ||
|
||
try { | ||
const result = runQuery(query); | ||
const parsedResult = JSON.parse(result); | ||
const projectItem = parsedResult.data.repository.issue.projectItems.nodes[0]; | ||
console.log("Project Item:", projectItem); | ||
|
||
if (projectItem) { | ||
const deleteQuery = `mutation { deleteProjectV2Item(input: {projectId: "${projectItem.project.id}", itemId: "${projectItem.id}"}) { clientMutationId } }`; | ||
runQuery(deleteQuery); | ||
createComment( | ||
`This issue has been removed from the [${projectItem.project.title}](${projectItem.project.url}) project.`, | ||
); | ||
console.log("Issue removed from project."); | ||
} else { | ||
console.log("No associated project found for this issue."); | ||
} | ||
} catch (error) { | ||
console.error("Error:", error.message); | ||
} |
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.