Skip to content

Commit

Permalink
[BUGFIX] Utiliser le français dans les titres de groupe des changelogs
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] authored Feb 4, 2022
2 parents b0bef5d + 3b63277 commit 4ee774c
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 28 deletions.
6 changes: 3 additions & 3 deletions scripts/models/PullRequestGroupFactory.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,19 @@ class PullRequestGroupFactory {
return [
new PullRequestGroup({
tagToGrab: Tag.FEATURE,
groupTitle: '### :rocket: Enhancement',
groupTitle: '### :rocket: Amélioration',
}),
new PullRequestGroup({
tagToGrab: Tag.TECH,
groupTitle: '### :building_construction: Tech',
}),
new PullRequestGroup({
tagToGrab: Tag.BUGFIX,
groupTitle: '### :bug: Bug fix',
groupTitle: '### :bug: Correction',
}),
new PullRequestGroup({
tagToGrab: Tag.OTHERS,
groupTitle: '### :coffee: Various',
groupTitle: '### :coffee: Autre',
}),
];
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -254,16 +254,16 @@ describe('Unit | Script | GET Pull Request to release in Prod', () => {
const expectedNewChangeLogLines = [
'## v3.55.0 (12/05/2021)',
'',
'### :rocket: Enhancement',
'### :rocket: Amélioration',
'- [#100](https://github.com/foo/foo/pull/100) [FEATURE] PIX-1',
'',
'### :building_construction: Tech',
'- [#101](https://github.com/foo/foo/pull/101) [TECH] PIX-2',
'',
'### :bug: Bug fix',
'### :bug: Correction',
'- [#102](https://github.com/foo/foo/pull/102) [BUGFIX] PIX-3',
'',
'### :coffee: Various',
'### :coffee: Autre',
'- [#104](https://github.com/foo/foo/pull/104) Foo PIX-4',
'',
];
Expand Down
24 changes: 12 additions & 12 deletions test/unit/scripts/models/PartialChangeLogGenerator_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ describe('Unit | Script | Models | PartialChangeLogGenerator', () => {
const pullRequestGroups = [
new PullRequestGroup({
tagToGrab: Tag.FEATURE,
groupTitle: '### :rocket: Enhancement',
groupTitle: '### :rocket: Amélioration',
}),
new PullRequestGroup({
tagToGrab: Tag.BUGFIX,
groupTitle: '### :bug: Bug fix',
groupTitle: '### :bug: Correction',
}),
];

Expand All @@ -42,11 +42,11 @@ describe('Unit | Script | Models | PartialChangeLogGenerator', () => {
// given
const featurePullRequestGroup = new PullRequestGroup({
tagToGrab: Tag.FEATURE,
groupTitle: '### :rocket: Enhancement',
groupTitle: '### :rocket: Amélioration',
});
const bugfixPullRequestGroup = new PullRequestGroup({
tagToGrab: Tag.BUGFIX,
groupTitle: '### :bug: Bug fix',
groupTitle: '### :bug: Correction',
});
const pullRequestGroups = [featurePullRequestGroup, bugfixPullRequestGroup];

Expand All @@ -70,11 +70,11 @@ describe('Unit | Script | Models | PartialChangeLogGenerator', () => {
// given
const featurePullRequestGroup = new PullRequestGroup({
tagToGrab: Tag.FEATURE,
groupTitle: '### :rocket: Enhancement',
groupTitle: '### :rocket: Amélioration',
});
const bugfixPullRequestGroup = new PullRequestGroup({
tagToGrab: Tag.BUGFIX,
groupTitle: '### :bug: Bug fix',
groupTitle: '### :bug: Correction',
});
const pullRequestGroups = [featurePullRequestGroup, bugfixPullRequestGroup];

Expand All @@ -98,11 +98,11 @@ describe('Unit | Script | Models | PartialChangeLogGenerator', () => {
// given
const featurePullRequestGroup = new PullRequestGroup({
tagToGrab: Tag.FEATURE,
groupTitle: '### :rocket: Enhancement',
groupTitle: '### :rocket: Amélioration',
});
const bugfixPullRequestGroup = new PullRequestGroup({
tagToGrab: Tag.BUGFIX,
groupTitle: '### :bug: Bug fix',
groupTitle: '### :bug: Correction',
});
const pullRequestGroups = [featurePullRequestGroup, bugfixPullRequestGroup];

Expand Down Expand Up @@ -132,11 +132,11 @@ describe('Unit | Script | Models | PartialChangeLogGenerator', () => {
// given
const featurePullRequestGroup = new PullRequestGroup({
tagToGrab: Tag.FEATURE,
groupTitle: '### :rocket: Enhancement',
groupTitle: '### :rocket: Amélioration',
});
const bugfixPullRequestGroup = new PullRequestGroup({
tagToGrab: Tag.BUGFIX,
groupTitle: '### :bug: Bug fix',
groupTitle: '### :bug: Correction',
});
const pullRequestGroups = [featurePullRequestGroup, bugfixPullRequestGroup];

Expand All @@ -158,11 +158,11 @@ describe('Unit | Script | Models | PartialChangeLogGenerator', () => {

const featurePullRequestGroup = new PullRequestGroup({
tagToGrab: Tag.FEATURE,
groupTitle: '### :rocket: Enhancement',
groupTitle: '### :rocket: Amélioration',
});
const bugfixPullRequestGroup = new PullRequestGroup({
tagToGrab: Tag.BUGFIX,
groupTitle: '### :bug: Bug fix',
groupTitle: '### :bug: Correction',
});
const pullRequestGroups = [featurePullRequestGroup, bugfixPullRequestGroup];

Expand Down
6 changes: 3 additions & 3 deletions test/unit/scripts/models/PullRequestGroupFactory_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,19 @@ describe('Unit | Script | Models | PullRequestGroupFactory', () => {
const expectedPullRequestGroups = [
new PullRequestGroup({
tagToGrab: Tag.FEATURE,
groupTitle: '### :rocket: Enhancement',
groupTitle: '### :rocket: Amélioration',
}),
new PullRequestGroup({
tagToGrab: Tag.TECH,
groupTitle: '### :building_construction: Tech',
}),
new PullRequestGroup({
tagToGrab: Tag.BUGFIX,
groupTitle: '### :bug: Bug fix',
groupTitle: '### :bug: Correction',
}),
new PullRequestGroup({
tagToGrab: Tag.OTHERS,
groupTitle: '### :coffee: Various',
groupTitle: '### :coffee: Autre',
}),
];

Expand Down
14 changes: 7 additions & 7 deletions test/unit/scripts/models/PullRequestGroup_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ describe('Unit | Script | Models | PullRequestGroup', () => {
it('should not create an instance if parameter tag to grab is not valid', () => {
// given
const wrongTag = 'wrongTag';
const groupTitle = '### :bug: Bug fix';
const groupTitle = '### :bug: Correction';

// when
const instantiate = () => new PullRequestGroup({ tagToGrab: wrongTag, groupTitle });
Expand All @@ -24,7 +24,7 @@ describe('Unit | Script | Models | PullRequestGroup', () => {
it('should create an instance if parameter tag is valid', () => {
// given
const validTag = Tag.FEATURE;
const groupTitle = '### :rocket: Enhancement';
const groupTitle = '### :rocket: Amélioration';

// when
const createdInstance = new PullRequestGroup({ tagToGrab: validTag, groupTitle });
Expand All @@ -42,7 +42,7 @@ describe('Unit | Script | Models | PullRequestGroup', () => {
it('should return the initial Pull Request array if no Pull Request is grabbed', () => {
// given
const featureTag = Tag.FEATURE;
const groupTitle = '### :rocket: Enhancement';
const groupTitle = '### :rocket: Amélioration';
const pullRequestGroup = new PullRequestGroup({ tagToGrab: featureTag, groupTitle });
const initialPullRequests = [new PullRequest({ title: '' })];

Expand All @@ -57,7 +57,7 @@ describe('Unit | Script | Models | PullRequestGroup', () => {
it('should return an empty array if all Pull Requests are grabbed', () => {
// given
const featureTag = Tag.FEATURE;
const groupTitle = '### :rocket: Enhancement';
const groupTitle = '### :rocket: Amélioration';
const pullRequestGroup = new PullRequestGroup({ tagToGrab: featureTag, groupTitle });

const initialPullRequests = [
Expand All @@ -76,7 +76,7 @@ describe('Unit | Script | Models | PullRequestGroup', () => {
it('should return the initial Pull Requests array minus Pull Requests grabbed', () => {
// given
const featureTag = Tag.FEATURE;
const groupTitle = '### :rocket: Enhancement';
const groupTitle = '### :rocket: Amélioration';
const pullRequestGroup = new PullRequestGroup({ tagToGrab: featureTag, groupTitle });

const featurePullRequest = new PullRequest({ title: '[FEATURE] PIX-1' });
Expand All @@ -100,7 +100,7 @@ describe('Unit | Script | Models | PullRequestGroup', () => {
it('should return empty array if if no Pull Request is grabbed', () => {
// given
const featureTag = Tag.FEATURE;
const groupTitle = '### :rocket: Enhancement';
const groupTitle = '### :rocket: Amélioration';
const pullRequestGroup = new PullRequestGroup({ tagToGrab: featureTag, groupTitle });

// when
Expand All @@ -113,7 +113,7 @@ describe('Unit | Script | Models | PullRequestGroup', () => {
it('should return group title and list of Pull Requests grabbed', () => {
// given
const featureTag = Tag.FEATURE;
const groupTitle = '### :rocket: Enhancement';
const groupTitle = '### :rocket: Amélioration';
const pullRequestGroup = new PullRequestGroup({ tagToGrab: featureTag, groupTitle });

const featurePullRequest = new PullRequest({
Expand Down

0 comments on commit 4ee774c

Please sign in to comment.