Commit 7510431
committed
Migrated codebase to work as an action (#48)
Updated codebase to run as an action instead of a application.
This PR mainly removes most of the boilerplate and code unrelated to the action itself and adapts everything to work in a more organized and abstract way.
It splits the architecture into an object oriented dependency injection system, having the class `Synchronizer` handling all the business logic and the classes `ProjectKit`,`IssueKit` and `CoreLogger` handling specific subtasks.
To be able to fine-grain the project permissions and keep the highest level of security possible while maintaining a sane codebase, the action of each token has been split into its own class:
- ProjectKit uses a PAT with organization access as it needs to interact with the project API (which is part of an organization instead of a repository).
- IssueKit uses the autogenerated GitHub token to fetch information from the issues API available in the repository.
`ProjectKit` is still in development, as it's missing the ability to update custom fields (#44) and it's using a deprecated API (#46) so it's prone to changes in the following PRs.
This PR is aimed at a feature branch and not at the master branch. The reason for this is because this task does not contemplate all the necessary features to launch this action. This is the first task of many which can be found in the milestone: [GitHub Action port](https://github.com/paritytech/github-issue-sync/milestone/1). Once all this tasks have been completed, the feature branch will be merged into master replacing the current functionality.
This PR also removes the ability to use custom labeling and custom fields. This will be added later to the feature branch.
The action was ported to work as a Docker image instead of a JavaScript image. This is because the docker image allows to build the action on demand (currently ~45 seconds). A more efficient method will be proposed later but for the current development process this satisfies the requirements.
This PR resolves #43.1 parent 1a81f7f commit 7510431
File tree
55 files changed
+2566
-4917
lines changed- .github
- workflows
- build
- dist
- helm
- src
- action
- github
- server
- migrations
- test
- templates
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
55 files changed
+2566
-4917
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | | - | |
4 | 2 | | |
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | | - | |
11 | 9 | | |
12 | 10 | | |
13 | 11 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | | - | |
| 5 | + | |
7 | 6 | | |
8 | 7 | | |
9 | 8 | | |
| |||
14 | 13 | | |
15 | 14 | | |
16 | 15 | | |
| 16 | + | |
This file was deleted.
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
0 commit comments