-
Notifications
You must be signed in to change notification settings - Fork 5
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
Migrated codebase to work as an action #48
Migrated codebase to work as an action #48
Conversation
Created the root of the action with a dockerfile so it can be built and easily tested
Created the required classes and wrapper for the system to handle project management and issue management.
Cleaned up old logs from the tests
Soo, should we also review the code in the feature branch then? Or was it reviewed already? |
No, as there are no changes. The feature branch has just been created for this PR. It's currently up to date with master so there isn't anything new in it. |
Ah, I was probably looking at the head branch, thinking it's the base... |
@@ -1 +0,0 @@ | |||
module.exports = require("opstooling-js-style/src/prettier/configuration") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we need this one back
}, | ||
}, | ||
], | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here, I think the codestyle config is still needed
- name: Install dependencies | ||
run: yarn install --immutable | ||
- name: Run tests | ||
run: yarn test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, codestyle integration here is missing
Other than that, looks good |
@mutantcornholio I'm planning on adding the linting rules again but in a different issue #47. Can we wait until that PR? |
Doesn't feel like something out of scope, but sure |
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.
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.
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 classesProjectKit
,IssueKit
andCoreLogger
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
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. 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.