Skip to content

Commit

Permalink
Merge branch 'CesiumGS:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
HapDragon authored Dec 25, 2024
2 parents 3354f5c + 47b5d29 commit 13cdb2d
Show file tree
Hide file tree
Showing 1,663 changed files with 68,247 additions and 60,238 deletions.
29 changes: 24 additions & 5 deletions .github/actions/check-for-CLA/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ const getValuesFromGoogleSheet = async (sheetId, cellRanges) => {
const checkIfIndividualCLAFound = async () => {
const response = await getValuesFromGoogleSheet(
GOOGLE_SHEETS_INFO.individualCLASheetId,
"D2:D"
"D2:D",
);

const rows = response.data.values;
Expand All @@ -68,7 +68,7 @@ const checkIfIndividualCLAFound = async () => {
const checkIfCorporateCLAFound = async () => {
const response = await getValuesFromGoogleSheet(
GOOGLE_SHEETS_INFO.corporateCLASheetId,
"H2:H"
"H2:H",
);

const rows = response.data.values;
Expand Down Expand Up @@ -107,9 +107,9 @@ const getCommentBody = (hasSignedCLA, errorFoundOnCLACheck) => {
const commentTemplate = fs.readFileSync(
join(
dirname(fileURLToPath(import.meta.url)),
"templates/pullRequestComment.hbs"
"templates/pullRequestComment.hbs",
),
"utf-8"
"utf-8",
);

const getCommentFromTemplate = Handlebars.compile(commentTemplate);
Expand Down Expand Up @@ -138,7 +138,23 @@ const postCommentOnPullRequest = async (hasSignedCLA, errorFoundOnCLACheck) => {
accept: "application/vnd.github+json",
"X-GitHub-Api-Version": "2022-11-28",
},
}
},
);
};

const addLabelToPullRequest = async () => {
const octokit = new Octokit();

return octokit.request(
`POST /repos/${PULL_REQUST_INFO.owner}/${PULL_REQUST_INFO.repoName}/issues/${PULL_REQUST_INFO.id}/labels`,
{
labels: ["PR - Needs Signed CLA"],
headers: {
authorization: `bearer ${PULL_REQUST_INFO.gitHubToken}`,
accept: "application/vnd.github+json",
"X-GitHub-Api-Version": "2022-11-28",
},
},
);
};

Expand All @@ -153,6 +169,9 @@ const main = async () => {
}

await postCommentOnPullRequest(hasSignedCLA, errorFoundOnCLACheck);
if (!hasSignedCLA) {
await addLabelToPullRequest();
}
};

main();
6 changes: 3 additions & 3 deletions .github/workflows/cla.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
run: node index.js
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PULL_REQUEST_ID: ${{ github.event.number }}
PULL_REQUEST_ID: ${{ github.event.number }}
GOOGLE_KEYS: ${{ secrets.GOOGLE_KEYS }}
INDIVIDUAL_CLA_SHEET_ID: ${{ secrets.INDIVIDUAL_CLA_SHEET_ID }}
CORPORATE_CLA_SHEET_ID: ${{ secrets.CORPORATE_CLA_SHEET_ID }}
INDIVIDUAL_CLA_SHEET_ID: ${{ secrets.INDIVIDUAL_CLA_SHEET_ID }}
CORPORATE_CLA_SHEET_ID: ${{ secrets.CORPORATE_CLA_SHEET_ID }}
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
steps:
- name: message result in slack
id: slack
uses: slackapi/slack-github-action@v1.26.0
uses: slackapi/slack-github-action@v2.0.0
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
with:
Expand Down
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,5 @@ Specs/jasmine/**
Apps/Sandcastle/ThirdParty
Tools/jsdoc/cesium_template/static/javascript/prism.js
Tools/jsdoc/cesium_template/static/styles/prism.css
**/LICENSE.md

1 change: 1 addition & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
2 changes: 1 addition & 1 deletion .slackbot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ releaseSchedule:
- jjhembd, 8/1/2024
- jjspace, 9/1/2024
- ggetz, 10/1/2024
- jjhembd, 11/1/2024
- lukemckinstry, 11/1/2024
- jjspace, 12/1/2024

90 changes: 90 additions & 0 deletions .vscode/.cspell/cspell-packages.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
cesium
engine
widgets
playwright
test
chokidar
cloc
compression
esbuild
eslint
config
plugin
html
express
globals
globby
glsl
strip
comments
gulp
clean
css
insert
rename
replace
tap
zip
husky
istanbul
lib
instrument
jasmine
core
jsdoc
karma
chrome
launcher
coverage
detect
browsers
edge
firefox
ie
longest
reporter
safari
sourcemap
loader
spec
markdownlint
cli
merge
stream
mkdirp
node
fetch
open
prettier
prismjs
request
rimraf
sinon
tsd
typescript
yargs
tweenjs
tween
autolinker
bitmap
sdf
dompurify
draco3d
earcut
grapheme
splitter
jsep
kdbush
ktx
parse
lerc
mersenne
twister
meshoptimizer
pako
protobufjs
rbush
topojson
client
urijs
nosleep
33 changes: 33 additions & 0 deletions .vscode/.cspell/gen-cspell-packages.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import { readFileSync, writeFileSync } from "fs";
import path from "path";
import { fileURLToPath } from "url";

// inspired by code in https://github.com/streetsidesoftware/cspell/issues/3215
// this file just generates the word list file in this directory that contains
// all our dependecy package names

const __filename = fileURLToPath(import.meta.url); // get the resolved path to the file
const __dirname = path.dirname(__filename); // get the name of the directory

const packageJsons = [
path.join(__dirname, "../package.json"),
path.join(__dirname, "../packages/engine/package.json"),
path.join(__dirname, "../packages/widgets/package.json"),
];
const words = packageJsons.reduce((acc, packageJsonPath) => {
const packageJson = JSON.parse(readFileSync(packageJsonPath, "utf-8"));
const packageNames = Object.keys(packageJson.dependencies ?? {}).concat(
Object.keys(packageJson.devDependencies ?? {}),
);
// remove the @ org symbol and dashes to get just words in package names
const setOfWords = packageNames
.flatMap((name) => name.replace(/[@]/g, "").split(/\/|\-/))
.map((word) => word.replace(".js", ""));
setOfWords.forEach((word) => acc.add(word));
return acc;
}, new Set());

// if https://github.com/streetsidesoftware/vscode-spell-checker/issues/3002
// ever gets addressed this can be used to auto-generate the list of package names
// to pass to cspell directly. Right now it works in the CLI but not in the extension
writeFileSync("./cspell-packages.txt", Array.from(words).join("\n"));
44 changes: 44 additions & 0 deletions .vscode/cesiumjs.code-snippets
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
// Place your workspace snippets here. Each snippet is defined under a snippet name and has a scope, prefix, body and
// description. Add comma separated ids of the languages where the snippet is applicable in the scope field. If scope
// is left empty or omitted, the snippet gets applied to all languages. The prefix is what is
// used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders.
// Placeholders with the same ids are connected.
// Example:
// "Print to console": {
// "scope": "javascript,typescript",
// "prefix": "log",
// "body": [
// "console.log('$1');",
// "$2"
// ],
// "description": "Log output to console"
// }
"Debug Pragma": {
"scope": "javascript",
"prefix": "pragdebug",
"description": "Insert or wrap selection with debug pragma comments",
"body": [
"//>>includeStart('debug', pragmas.debug);",
"${TM_SELECTED_TEXT}$0",
"//>>includeEnd('debug')"
]
},
"Check type": {
"prefix": "check",
"body": [
"Check.typeOf.${2:string}(\"${1:value}\", ${1:value});"
],
"description": "Check Type of a variable"
},
"Check type if defined": {
"prefix": "checkifdef",
"body": [
"if (defined(${1:value})) {",
" Check.typeOf.${2:string}(\"${1:value}\", ${1:value});",
"}"
],
"description": "Check type of a variable if it's defined"
}
}
99 changes: 99 additions & 0 deletions .vscode/cspell.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
{
"version": "0.2",
"language": "en",
"allowCompoundWords": true,
"caseSensitive": false,
"files": [
"**/*.js",
"**/*.html",
"**/*.css",
"**/*.md"
],
"ignorePaths": [
"node_modules/**",
"**/ThirdParty/**",
"**/Build/**",
"Source/**",
"CONTRIBUTORS.md",
"**/LICENSE.md"
],
"useGitignore": true,
"dictionaries": [
"typescript",
"node",
"html",
"css",
"packages"
],
"dictionaryDefinitions": [
{
"name": "packages",
"path": "./.cspell/cspell-packages.txt",
"addWords": false
}
],
"words": [
"3DTILES",
"aabb",
"Amato",
"bathymetric",
"bitangent",
"bitangents",
"bivariate",
"Bourke",
"brdf",
"cartesians",
"cartographics",
"cesiumjs",
"comms",
"cyclomatic",
"czml",
"dequantize",
"dequantized",
"dequantizes",
"dijit",
"DONT",
"ecef",
"EPSG",
"fxaa",
"glsl",
"gltf",
"iframes",
"iife",
"lerp",
"Lilli",
"maki",
"MAXAR",
"minifiers",
"mipmapped",
"mipmaps",
"msaa",
"noaa",
"Occluder",
"occluders",
"octree",
"octrees",
"OITFS",
"pako",
"phong",
"pjcozzi",
"pnts",
"quantizations",
"reproject",
"tada",
"topo",
"topojson",
"Transitioner",
"tridiagonal",
"tweens",
"uncentered",
"uncompress",
"unminified",
"unproject",
"unregisters",
"unrenderable",
"voxel",
"WEBG",
"xdescribe"
]
}
3 changes: 2 additions & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"slevesque.shader",
"cesium.gltf-vscode",
"bierner.github-markdown-preview",
"DavidAnson.vscode-markdownlint"
"DavidAnson.vscode-markdownlint",
"streetsidesoftware.code-spell-checker"
]
}
Loading

0 comments on commit 13cdb2d

Please sign in to comment.