eslint-config-moneyforward development plan #180
Locked
wakamsha
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
We are developing a new version of eslint-config-moneyforward. Our aim is to significantly improve our previous development process and transition to a more comfortable and sophisticated one.
Below is an overview of the new development process. We'll update it if there are any changes:
About the Development Repository
We'll continue to develop in this repository, fully replacing the current design and releasing it as v3. However, we'll continue to maintain v2 for the time belong.
There was an idea to create a new repository separately from this one, but we decided it wasn't appropriate fro the following reasons:
CHANGELOG
to decide if they want to update, so they don't need to know about a new repository.Code Owners
We will set up a new
.github/CODEOWNERS
.We'll create a new GitHub Team for the purpose of maintaining this repository and add core contributors to it as Code Owners. By setting up a dedicated GitHub Team, we can configure members flexibly, independent of our company's organizational structure.
For the time being, we won't set individual account names as members. This is to avoid the need to update the file every time someone leaves the team due to a transfer or resignation (the same applies when a new member joins).
References
Pull Request Template
We'll create a new template.
Code Review
Language
All pull request explanations and review comments will be in English.
Review Policy
We'll accept and merge Pull Requests from external contributers when all of the following requirements are met:
However, if the reviewer determines that the objectivity or rationality of the Pull Request itself is insufficient, they may request additional explanation.
If minor differences in code formatting or coding style are observed, we'll carry out refactoring within the team after the merge.
Conditions for merging
CI Design
Updating Dependent Packages
We'll transition from Dependabot to Renovate. Renovate can be considered a superior alternative to Dependabot.
We'll use Renovate to design and automate the continuous updating of dependent packages. Renovate is a tool specialized in automatically creating Pull Requests to update dependent packages, and its behavior can be very finely controlled, so it can be introduced in a way that suits the circumstances of the development team.
On the other hand, GitHub is equipped with a tool called Dependabot, which automatically detects packages with security risks and creates Pull Requests to update their versions. However, Dependabot is primarily intended for quick notification of security patches, and doesn't necessarily align with the goal of continues updating of dependent packages. Therefore, even if it's introduced, it may not lead to problem solving, and the wave of endlessly generated Pull Requests can easily be overwhelming and neglected. The main focus should be on the continuous updating of dependent packages, and it's necessary to establish a solution to achieve this at a low cost.
Pull Requests automatically generated by Dependabot detecting vulnerabilities in dependent packages are treated the same as Pull Requests from external contributors, and core contributors will handle them.
Renovate Settings
.json
.config:js-lib
.minor
andpatch
updates will be automatically merged if they pass the CI/CD..github/CODEOWNERS
settings takes precedence, so it won't work in the first place.Unit Test
Since Jest has already been introduced, we'll continue to use it to expand out unit tests.
Test perspective
References
CD Design
Release Workflow
The release of OSS packages generally encompasses the following processes:
CHANGELOG
.There are many tools to automate these processes, and we'll select the appropriate one. In this project, we'll adopt semantic-release. It has the following features:
The entire release workflow is executed as CI every time a build is successful on the release branch. You can also run a workflow at any time by using GitHub Action's
workflow_dispatch
as trigger.Upon receiving a push to any base branch (such as
main
,next
,beta
etc...), if it's judged that the difference will affect the functionality of the previous release workflow is executed.The following are the reasons for adopting semantic-release.
References
Branch Strategy
Trunk-Based Development
We define the
main
branch as the trunk and carry out all development work here as a principle.Trunk-based development is a development method where all developers work on a single
main
branch, break down the work needed for feature development into smaller tasks, and commit to themain
branch frequently in a short period of time (commits are made via Pull Requests, not directly).References
Node
If it becomes necessary to apply a patch to v2 after the v3 release, a separate trunk for v2 will be created and released from there.
Merge Strategy
We use "Squash merge".
References
Hotfix
We don't operate a Hotfix branch.
Pull Request Title
In this project, we adopt semantic-release to automate the release flow.
semantic-release determines the version number of the next release from commit messages, generates a changelog, and performs the release process. By default, it makes judgements from a format called Angular Commit Message Conventions. Therefore , developers are required to have commit messages in the appropriate format, and tools like commitizen or commitlint are usually introduced. However, since the merge strategy of this project is "Squash merge", a consistent format is required for the commit message when merging into the trunk (individual commit messages during development aren't inspected). The commit message when merging into the trunk with "Squash merge" is first suggested by the title of that Pull Request, so a support tool is needed to unify this into an appropriate format.
Reference: README - semantic-release
Checking the Format of Pull Request Titles with GitHub Action
We'll introduce amannn/action-semantic-pull-request.
This GitHub Action's README explicitly mentions its use with semantic-release.
In addition, when using "Squash and merge" for a Pull Request with only one commit, GitHub suggests the message of that single commit, not the PR title, but this GHA checks that as well. Specifically, it checks whether the message of that single commit is the same as the Pull Request title. If the two strings are different or do not comply with the conventional commit format, it will result in an error.
The default types only recognize fix and feat, so we will add the following defined in the Angular convention.
build
chore
ci
docs
style
refactor
perf
test
References:
https://github.com/angular/angular/blob/22b96b9/CONTRIBUTING.md#-commit-message-guidelines
Beta Was this translation helpful? Give feedback.
All reactions