Search…
How to contribute
    Create an issue or find an existing issue on https://github.com/SwipeWallet/swipechain-node/issues
    Assign the issue to yourself
    Create a branch using the issue id, for example if the issue you are working on is 600, then create a branch call 600-issue , this way , github will link your PR with the issue
    Raise a PR , and submit it for the team to review
    Make sure the pipeline is green
    Once PR get approved, you can merge it to master

the semantic version and release

SwipeNode manage changelog entry the same way like github, refer to (https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/creating-a-pull-request-template-for-your-repository) for more detail. Once a merge request get merged into master branch, if the merge request upgrade the version, then a new release will be created automatically, and the repository will be tagged with the new version by the release tool.

How to generate a changelog entry

A scripts/changelog is available to generate the changelog entry file automatically.
Its simplest usage is to provide the value for title:
1
./scripts/changelog "my super amazing change"
Copied!
At this point the script would ask you to select the category of the change (mapped to the type field in the entry):
1
>> Please specify the category of your change:
2
1. New feature
3
2. Bug fix
4
3. Feature change
5
4. New deprecation
6
5. Feature removal
7
6. Security fix
8
7. Performance improvement
9
8. Other
Copied!
The entry filename is based on the name of the current Git branch. If you run the command above on a branch called feature/hey-dz, it will generate a changelogs/unreleased/feature-hey-dz.yml file.
The command will output the path of the generated file and its contents:
1
create changelogs/unreleased/my-feature.yml
2
---
3
title: Hey DZ, I added a feature to GitLab!
4
merge_request:
5
author:
6
type:
Copied!
Arguments
Argument
Shorthand
Purpose
--amend
Amend the previous commit
--force
-f
Overwrite an existing entry
--merge-request
-m
Set merge request ID
--dry-run
-n
Don’t actually write anything, just print
--git-username
-u
Use Git user.name configuration as the author
--type
-t
The category of the change, valid options are: added, fixed, changed, deprecated, removed, security, performance, other
--help
-h
Print help message
--amend
You can pass the --amend argument to automatically stage the generated file and amend it to the previous commit.
If you use --amend and don’t provide a title, it will automatically use the “subject” of the previous commit, which is the first line of the commit message:
1
$ git show --oneline
2
ab88683 Added an awesome new feature to GitLab
3
4
$ scripts/changelog --amend
5
create changelogs/unreleased/feature-hey-dz.yml
6
---
7
title: Added an awesome new feature to GitLab
8
merge_request:
9
author:
10
type:
Copied!
--force or -f
Use --force or -f to overwrite an existing changelog entry if it already exists.
1
$ scripts/changelog 'Hey DZ, I added a feature to GitLab!'
2
error changelogs/unreleased/feature-hey-dz.yml already exists! Use `--force` to overwrite.
3
4
$ scripts/changelog 'Hey DZ, I added a feature to GitLab!' --force
5
create changelogs/unreleased/feature-hey-dz.yml
6
---
7
title: Hey DZ, I added a feature to GitLab!
8
merge_request: 1983
9
author:
10
type:
Copied!
--merge-request or -m
Use the --merge-request or -m argument to provide the merge_request value:
1
$ scripts/changelog 'Hey DZ, I added a feature to GitLab!' -m 1983
2
create changelogs/unreleased/feature-hey-dz.yml
3
---
4
title: Hey DZ, I added a feature to GitLab!
5
merge_request: 1983
6
author:
7
type:
Copied!
--dry-run or -n
Use the --dry-run or -n argument to prevent actually writing or committing anything:
1
$ scripts/changelog --amend --dry-run
2
create changelogs/unreleased/feature-hey-dz.yml
3
---
4
title: Added an awesome new feature to GitLab
5
merge_request:
6
author:
7
type:
8
9
$ ls changelogs/unreleased/
Copied!
--git-username or -u
Use the --git-username or -u argument to automatically fill in the author value with your configured Git user.name value:
1
$ git config user.name
2
Jane Doe
3
4
$ scripts/changelog -u 'Hey DZ, I added a feature to GitLab!'
5
create changelogs/unreleased/feature-hey-dz.yml
6
---
7
title: Hey DZ, I added a feature to GitLab!
8
merge_request:
9
author: Jane Doe
10
type:
Copied!
--type or -t
Use the --type or -t argument to provide the type value:
1
$ bin/changelog 'Hey DZ, I added a feature to GitLab!' -t added
2
create changelogs/unreleased/feature-hey-dz.yml
3
---
4
title: Hey DZ, I added a feature to GitLab!
5
merge_request:
6
author:
7
type: added
Copied!
Last modified 3mo ago
Copy link