Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix block actions payload and test #1

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
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
2 changes: 2 additions & 0 deletions .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ jobs:
with:
node-version: ${{ matrix.node-version }}
- run: npm install
- name: Print eslint version
run: ./node_modules/.bin/eslint -v
- run: npm run build
- run: npm test
- run: npm run coverage
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"prepare": "npm run build",
"build": "tsc",
"build:clean": "shx rm -rf ./dist ./coverage ./.nyc_output",
"lint": "eslint --fix --ext .ts src",
"lint": "eslint --fix --ext .ts --debug src",
"mocha": "TS_NODE_PROJECT=tsconfig.json nyc mocha --config .mocharc.json \"src/**/*.spec.ts\"",
"test": "npm run lint && npm run mocha && npm run test:types",
"test:types": "tsd",
Expand Down
2 changes: 1 addition & 1 deletion src/types/actions/block-action.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ describe('Interactivity payload types', () => {
type: 'block_actions',
user: {
id: 'W111',
name: 'seratch',
username: 'seratch',
team_id: 'T111',
},
api_app_id: 'A02',
Expand Down
7 changes: 5 additions & 2 deletions src/types/actions/block-action.ts
Original file line number Diff line number Diff line change
Expand Up @@ -218,9 +218,12 @@ export interface BlockAction<ElementAction extends BasicElementAction = BlockEle
} | null;
user: {
id: string;
name: string;
/**
* name will be present if the block_action originates from the Home tab
*/
name?: string;
username: string;
team_id?: string; // undocumented
team_id?: string;
};
channel?: {
id: string;
Expand Down
Loading