Skip to content

Commit

Permalink
fix: reflect yoshi's use of minor version bumps (#220)
Browse files Browse the repository at this point in the history
  • Loading branch information
bcoe committed Aug 6, 2019
1 parent b05e3b0 commit 1f2d637
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 9 deletions.
2 changes: 1 addition & 1 deletion __snapshots__/commit-split.js
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ exports['CommitSplit partitions commits based on path from root directory by def
},
{
"sha": "8db7f3b19c46c873897d79c89ce35b8492e5fe60",
"message": "feat!: move speech from alpha -> beta (#1962)",
"message": "feat: move speech from alpha -> beta (#1962)",
"files": [
"README.md",
"Speech/README.md"
Expand Down
2 changes: 1 addition & 1 deletion __snapshots__/github.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ exports['GitHub commitsSinceSha returns commits immediately before sha 1'] = [
},
{
"sha": "8db7f3b19c46c873897d79c89ce35b8492e5fe60",
"message": "feat!: move speech from alpha -> beta (#1962)",
"message": "feat: move speech from alpha -> beta (#1962)",
"files": [
"README.md",
"Speech/README.md"
Expand Down
2 changes: 1 addition & 1 deletion __snapshots__/graphql-to-commits.js
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ exports['graphqlToCommits converts raw graphql response into Commits object 1']
},
{
"sha": "8db7f3b19c46c873897d79c89ce35b8492e5fe60",
"message": "feat!: move speech from alpha -> beta (#1962)",
"message": "feat: move speech from alpha -> beta (#1962)",
"files": [
"README.md",
"Speech/README.md"
Expand Down
6 changes: 1 addition & 5 deletions __snapshots__/release-pr.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,10 @@ exports['GitHub Yoshi PHP Mono-Repo generates CHANGELOG and aborts if duplicate
</details>
<details><summary>speech 2.0.0</summary>
<details><summary>speech 1.1.0</summary>
### ⚠ BREAKING CHANGES
* move speech from alpha -> beta (#1962)
### Features
* move speech from alpha -> beta ([#1962](https://www.github.com/googleapis/release-please/issues/1962)) ([8db7f3b](https://www.github.com/googleapis/release-please/commit/8db7f3b))
Expand Down
9 changes: 9 additions & 0 deletions src/conventional-commits.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,15 @@ export class ConventionalCommits {
result = {};
}

// we have slightly different logic than the default of conventional commits,
// the minor should be bumped when features are introduced for pre 1.x.x libs:
if (
result.reason.indexOf(' 0 features') === -1 &&
result.releaseType === 'patch'
) {
result.releaseType = 'minor';
}

return resolve(result);
})
);
Expand Down
2 changes: 1 addition & 1 deletion test/fixtures/commits-yoshi-php-monorepo.json
Original file line number Diff line number Diff line change
Expand Up @@ -698,7 +698,7 @@
},
{
"node": {
"message": "feat!: move speech from alpha -> beta (#1962)",
"message": "feat: move speech from alpha -> beta (#1962)",
"oid": "8db7f3b19c46c873897d79c89ce35b8492e5fe60",
"associatedPullRequests": {
"edges": [
Expand Down

0 comments on commit 1f2d637

Please sign in to comment.