Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion .github/scripts/count-reward.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,11 @@ let rawYAML = '';

for (const tag of rewardTags) rawYAML += (await $`git tag -l --format="%(contents)" ${tag}`) + '\n';

if (!rawYAML.trim()) throw new ReferenceError('No reward data is found for the last month.');
if (!rawYAML.trim()) {
console.warn('No reward data is found for the last month.');

process.exit(0);
}

const rewards = YAML.parse(rawYAML) as Reward[];

Expand Down Expand Up @@ -54,4 +58,7 @@ await $`git config user.email "github-actions[bot]@users.noreply.github.com"`;
await $`git tag -a ${tagName} $(git rev-parse HEAD) -m ${summaryText}`;
await $`git push origin --tags --no-verify`;

await $`git config unset user.name`;
await $`git config unset user.email`;

await $`gh release create ${tagName} --notes ${summaryText}`;
9 changes: 8 additions & 1 deletion .github/scripts/share-reward.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import 'npm:array-unique-proposal';

import { components } from 'npm:@octokit/openapi-types';
import { $, argv, YAML } from 'npm:zx';
Comment on lines +1 to 4
Copy link

Copilot AI Apr 3, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This script introduces an unpinned runtime dependency via import 'npm:array-unique-proposal'. Using npm: without an explicit version makes workflow behavior non-deterministic over time and increases supply-chain risk. Prefer pinning the version (e.g. npm:array-unique-proposal@x.y.z) or avoiding prototype-patching entirely by deduplicating with a local Set/utility function.

Suggested change
import 'npm:array-unique-proposal';
import { components } from 'npm:@octokit/openapi-types';
import { $, argv, YAML } from 'npm:zx';
import 'npm:array-unique-proposal@1.0.4';
import { components } from 'npm:@octokit/openapi-types@22.2.0';
import { $, argv, YAML } from 'npm:zx@8.1.9';

Copilot uses AI. Check for mistakes.

Expand Down Expand Up @@ -68,7 +70,8 @@ function isBotUser(login: string) {
}

// Filter out Bot users from the list
const allUsers = [author.login, ...assignees.map(({ login }) => login)];
const allUsers = [author.login, ...assignees.map(({ login }) => login)].uniqueBy();

const users = allUsers.filter(login => !isBotUser(login));

console.log(`All users: ${allUsers.join(', ')}`);
Expand Down Expand Up @@ -101,9 +104,13 @@ console.log(listText);

await $`git config user.name "github-actions[bot]"`;
await $`git config user.email "github-actions[bot]@users.noreply.github.com"`;

await $`git tag -a "reward-${issueNumber}" ${mergeCommitSha} -m ${listText}`;
await $`git push origin --tags --no-verify`;

await $`git config unset user.name`;
await $`git config unset user.email`;

const commentBody = `## Reward data

\`\`\`yml
Expand Down
2 changes: 2 additions & 0 deletions ReadMe.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ export class ClientModel extends BiDataTable<Client>() {

queryOptions: BiDataQueryOptions = { text_field_as_array: false };

keyMap = { name: '名称', type: '类型' } as const;

constructor(appId = LarkBaseId, tableId = CLIENT_TABLE) {
super(appId, tableId);
}
Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mobx-lark",
"version": "2.8.0",
"version": "2.8.1",
"license": "LGPL-3.0",
"author": "shiy2008@gmail.com",
"description": "Unofficial TypeScript SDK for FeiShu/Lark API, which is based on MobX-RESTful.",
Expand All @@ -25,7 +25,7 @@
"url": "https://github.com/idea2app/MobX-Lark/issues"
},
"dependencies": {
"@swc/helpers": "^0.5.20",
"@swc/helpers": "^0.5.21",
"@types/react": "^19.2.14",
"koajax": "^3.3.0",
"lodash.memoize": "^4.1.2",
Expand All @@ -42,10 +42,10 @@
"@parcel/transformer-typescript-tsc": "~2.16.4",
"@types/fs-extra": "^11.0.4",
"@types/lodash.memoize": "^4.1.9",
"@types/node": "^24.12.0",
"@types/node": "^24.12.2",
"@types/react-dom": "^19.2.3",
"@types/turndown": "^5.0.6",
"dotenv": "^17.3.1",
"dotenv": "^17.4.0",
"fs-extra": "^11.3.4",
"husky": "^9.1.7",
"lint-staged": "^16.4.0",
Expand All @@ -54,7 +54,7 @@
"react": "^19.2.4",
"react-dom": "^19.2.4",
"ts-node": "^10.9.2",
"turndown": "^7.2.2",
"turndown": "^7.2.3",
"typedoc": "^0.28.18",
"typedoc-plugin-mdn-links": "^5.1.1",
"typescript": "~5.8.3"
Expand Down
Loading
Loading