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

Feat/implement new properties in task #22

Merged
merged 6 commits into from
Apr 1, 2024
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
6 changes: 6 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ jobs:
run: npm install
- name: Run eslint
run: npm run lint
- name: Run tests
run: npm run test
env:
BOTCITY_SERVER: ${{ secrets.BOTCITY_SERVER }}
BOTCITY_LOGIN: ${{ secrets.BOTCITY_LOGIN }}
BOTCITY_KEY: ${{ secrets.BOTCITY_KEY }}
- name: Execute build 🔧
run: npm run build
- name: Publish package on NPM 📦
Expand Down
10 changes: 9 additions & 1 deletion .github/workflows/pull_request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,12 @@ jobs:
- name: Install dependencies
run: npm install
- name: Run eslint
run: npm run lint
run: npm run lint
- name: Run tests
run: npm run test
env:
BOTCITY_SERVER: ${{ secrets.BOTCITY_SERVER }}
BOTCITY_LOGIN: ${{ secrets.BOTCITY_LOGIN }}
BOTCITY_KEY: ${{ secrets.BOTCITY_KEY }}
- name: Execute build 🔧
run: npm run build
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
node_modules/
package-lock.json
package-lock.json
.env
5 changes: 5 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/** @type {import('ts-jest').JestConfigWithTsJest} */
module.exports = {
preset: 'ts-jest',
testEnvironment: 'node',
};
14 changes: 12 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
"lint:fix": "eslint --fix src/**/*.{js,ts,json}",
"format": "prettier --write src/**/*.{js,ts,md,json} --config ./.prettierrc",
"commit": "git-cz",
"prepare": "husky install"
"prepare": "husky install",
"test": "jest"
},
"release-it": {
"npm": {
Expand Down Expand Up @@ -44,7 +45,10 @@
"@commitlint/cli": "17.1.2",
"@commitlint/config-conventional": "17.1.0",
"@rocketseat/eslint-config": "1.1.3",
"@types/jest": "^29.5.12",
"@types/node": "^14.18.33",
"@types/tmp": "^0.2.6",
"@types/uuid": "^9.0.8",
"@typescript-eslint/eslint-plugin": "^5.36.2",
"@typescript-eslint/parser": "5.36.2",
"commitizen": "4.2.5",
Expand All @@ -58,13 +62,19 @@
"eslint-plugin-prettier": "4.2.1",
"eslint-plugin-promise": "^6.0.1",
"husky": "8.0.1",
"jest": "^29.7.0",
"moment": "^2.30.1",
"prettier": "2.7.1",
"release-it": "^15.4.1",
"rimraf": "^3.0.2",
"typescript": "^4.8.2"
"tmp": "^0.2.3",
"ts-jest": "^29.1.2",
"typescript": "^4.8.2",
"uuid": "^9.0.1"
},
"dependencies": {
"axios": "^1.6.0",
"dotenv": "^16.4.5",
"form-data": "^4.0.0"
},
"engines": {
Expand Down
12 changes: 12 additions & 0 deletions src/botcity/maestro/interfaces/task.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,27 @@ export interface Task {
state: string
parameters: object
activityId: number
userEmail: string | null
agentId: string
userCreationName: string
organizationLabel: string | null
organizationCreationId: number
dateCreation: string // TODO: Transform in date
dateLastModified: string // TODO: Transform in date
finishStatus?: string
finishMessage?: string
test: boolean
interrupted: boolean | null
machineId: string | number | null
activityLabel?: string
minExecutionDate: string | Date
killed: boolean | null
dateStartRunning: string | Date
priority: number | null
repositoryLabel: string
processedItems: number | null
failedItems: number | null
totalItems: number | null
}

// TODO: Implement endpoint getTasks
Loading
Loading