Skip to content

Commit

Permalink
feat: complete github action
Browse files Browse the repository at this point in the history
  • Loading branch information
nejdetkadir committed Oct 11, 2023
1 parent 9b47e15 commit 959d30f
Show file tree
Hide file tree
Showing 22 changed files with 716 additions and 15 deletions.
3 changes: 2 additions & 1 deletion .github/linters/.eslintrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,5 +79,6 @@ rules:
'@typescript-eslint/semi': 'error',
'@typescript-eslint/space-before-function-paren': 'off',
'@typescript-eslint/type-annotation-spacing': 'error',
'@typescript-eslint/unbound-method': 'error'
'@typescript-eslint/unbound-method': 'error',
'import/no-unresolved': 'off',
}
29 changes: 29 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
## Checklist

<!-- checklist-start -->

- [ ] I've reviewed my code. (\*)
- [ ] Does this task have an ID?
- [ ] Should this task be tested by testers? (\*)
- [ ] Is there a need to add new translations
- [ ] I've placed all translations in the appropriate JSON files. (\*)
- [ ] I've verified that the translations work as expected in different languages. (\*)
- [ ] Are there any UI changes?
- [ ] Screenshots or screen recordings of the changes have been attached to the PR. (\*)
- [ ] No unnecessary console logs or commented out code remains. (\*)
- [ ] I didn't hard-code any sensitive information.(\*)
- [ ] I've tested browser compatibility. (e.g. Chrome, Safari, Mozilla, Opera) (\*)
- [ ] All new and existing tests have passed. (\*)
- [ ] I've checked for potential performance issues. (e.g. slow component mounting, too many HTTP requests, unnecessary re-renders) (\*)
- [ ] I've addressed accessibility concerns. (\*)
- [ ] I've added a new dependency.
- [ ] I've checked that all newly added dependencies are secure and up-to-date. (\*)
- [ ] The PR contains only changes related to the task at hand. If there are any changes outside of the task, I've mentioned them in the description. (\*)

<!-- checklist-end -->

---

**Related Issue Link(s):** ...

**Description:** ...
34 changes: 29 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,30 @@ name: Continuous Integration

on:
pull_request:
push:
branches:
- main
- 'releases/*'
types:
[
assigned,
unassigned,
labeled,
unlabeled,
opened,
edited,
closed,
reopened,
synchronize,
converted_to_draft,
ready_for_review,
locked,
unlocked,
review_requested,
review_request_removed,
auto_merge_enabled,
auto_merge_disabled
]

concurrency:
group: ${{ github.ref }}
cancel-in-progress: true

jobs:
test-typescript:
Expand Down Expand Up @@ -53,7 +73,11 @@ jobs:
id: test-action
uses: ./
with:
milliseconds: 1000
reviewerRequired: true
asigneeRequired: true
checklistRequired: true
semanticTitleRequired: true
repoToken: ${{ secrets.SECRET_TOKEN }}

- name: Print Output
id: output
Expand Down
180 changes: 176 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@
]
},
"dependencies": {
"@actions/core": "^1.10.1"
"@actions/core": "^1.10.1",
"@actions/github": "^5.1.1"
},
"devDependencies": {
"@types/jest": "^29.5.5",
Expand Down
6 changes: 6 additions & 0 deletions src/@types/checklist.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
type CheckListNodeType = {
q: string;
children: CheckListNodeType[];
isRequired: boolean;
isChecked: boolean;
};
6 changes: 6 additions & 0 deletions src/constants/checklistKeys.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
const CHECKLIST_KEYS = Object.freeze({
START: '<!-- checklist-start -->',
END: '<!-- checklist-end -->'
});

export default CHECKLIST_KEYS;
15 changes: 15 additions & 0 deletions src/constants/commitKeys.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
const COMMIT_KEYS = Object.freeze([
'build',
'chore',
'ci',
'docs',
'feat',
'fix',
'perf',
'refactor',
'revert',
'style',
'test'
]);

export default COMMIT_KEYS;
7 changes: 6 additions & 1 deletion src/constants/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
export {};
import CHECKLIST_KEYS from './checklistKeys';
import COMMIT_KEYS from './commitKeys';
import INPUT_KEYS from './inputKeys';
import QUESTIONS from './questions';

export { CHECKLIST_KEYS, COMMIT_KEYS, INPUT_KEYS, QUESTIONS };
Loading

0 comments on commit 959d30f

Please sign in to comment.