Skip to content

Commit

Permalink
fix(ocaml): Avoid hardcoding changelogSections to allow configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
phated committed Apr 19, 2021
1 parent f8b7e2c commit 5e8028b
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 70 deletions.
50 changes: 0 additions & 50 deletions __snapshots__/ocaml.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,6 @@ filename: CHANGELOG.md
* **deps:** update dependency com.google.cloud:google-cloud-spanner to v1.50.0 ([1f9663c](https://www.github.com/phated/ocaml-sample-repo/commit/1f9663cf08ab1cf3b68d95dee4dc99b7c4aac373))
* **deps:** update dependency com.google.cloud:google-cloud-storage to v1.120.0 ([fcd1c89](https://www.github.com/phated/ocaml-sample-repo/commit/fcd1c890dc1526f4d62ceedad561f498195c8939))
### Miscellaneous Chores
* update common templates ([3006009](https://www.github.com/phated/ocaml-sample-repo/commit/3006009a2b1b2cb4bd5108c0f469c410759f3a6a))
`

exports['OCaml run creates a release PR for non-monorepo (esy.json + sample.opam): options'] = `
Expand All @@ -83,11 +78,6 @@ description: :robot: I have created a release \\*beep\\* \\*boop\\*
* **deps:** update dependency com.google.cloud:google-cloud-spanner to v1.50.0 ([1f9663c](https://www.github.com/phated/ocaml-sample-repo/commit/1f9663cf08ab1cf3b68d95dee4dc99b7c4aac373))
* **deps:** update dependency com.google.cloud:google-cloud-storage to v1.120.0 ([fcd1c89](https://www.github.com/phated/ocaml-sample-repo/commit/fcd1c890dc1526f4d62ceedad561f498195c8939))
### Miscellaneous Chores
* update common templates ([3006009](https://www.github.com/phated/ocaml-sample-repo/commit/3006009a2b1b2cb4bd5108c0f469c410759f3a6a))
---
Expand Down Expand Up @@ -142,11 +132,6 @@ filename: CHANGELOG.md
* **deps:** update dependency com.google.cloud:google-cloud-spanner to v1.50.0 ([1f9663c](https://www.github.com/phated/ocaml-sample-repo/commit/1f9663cf08ab1cf3b68d95dee4dc99b7c4aac373))
* **deps:** update dependency com.google.cloud:google-cloud-storage to v1.120.0 ([fcd1c89](https://www.github.com/phated/ocaml-sample-repo/commit/fcd1c890dc1526f4d62ceedad561f498195c8939))
### Miscellaneous Chores
* update common templates ([3006009](https://www.github.com/phated/ocaml-sample-repo/commit/3006009a2b1b2cb4bd5108c0f469c410759f3a6a))
`

exports['OCaml run creates a release PR for non-monorepo (esy.json): options'] = `
Expand All @@ -164,11 +149,6 @@ description: :robot: I have created a release \\*beep\\* \\*boop\\*
* **deps:** update dependency com.google.cloud:google-cloud-spanner to v1.50.0 ([1f9663c](https://www.github.com/phated/ocaml-sample-repo/commit/1f9663cf08ab1cf3b68d95dee4dc99b7c4aac373))
* **deps:** update dependency com.google.cloud:google-cloud-storage to v1.120.0 ([fcd1c89](https://www.github.com/phated/ocaml-sample-repo/commit/fcd1c890dc1526f4d62ceedad561f498195c8939))
### Miscellaneous Chores
* update common templates ([3006009](https://www.github.com/phated/ocaml-sample-repo/commit/3006009a2b1b2cb4bd5108c0f469c410759f3a6a))
---
Expand Down Expand Up @@ -223,11 +203,6 @@ filename: CHANGELOG.md
* **deps:** update dependency com.google.cloud:google-cloud-spanner to v1.50.0 ([1f9663c](https://www.github.com/phated/ocaml-sample-repo/commit/1f9663cf08ab1cf3b68d95dee4dc99b7c4aac373))
* **deps:** update dependency com.google.cloud:google-cloud-storage to v1.120.0 ([fcd1c89](https://www.github.com/phated/ocaml-sample-repo/commit/fcd1c890dc1526f4d62ceedad561f498195c8939))
### Miscellaneous Chores
* update common templates ([3006009](https://www.github.com/phated/ocaml-sample-repo/commit/3006009a2b1b2cb4bd5108c0f469c410759f3a6a))
`

exports['OCaml run creates a release PR for non-monorepo (package.json): options'] = `
Expand All @@ -245,11 +220,6 @@ description: :robot: I have created a release \\*beep\\* \\*boop\\*
* **deps:** update dependency com.google.cloud:google-cloud-spanner to v1.50.0 ([1f9663c](https://www.github.com/phated/ocaml-sample-repo/commit/1f9663cf08ab1cf3b68d95dee4dc99b7c4aac373))
* **deps:** update dependency com.google.cloud:google-cloud-storage to v1.120.0 ([fcd1c89](https://www.github.com/phated/ocaml-sample-repo/commit/fcd1c890dc1526f4d62ceedad561f498195c8939))
### Miscellaneous Chores
* update common templates ([3006009](https://www.github.com/phated/ocaml-sample-repo/commit/3006009a2b1b2cb4bd5108c0f469c410759f3a6a))
---
Expand Down Expand Up @@ -292,11 +262,6 @@ filename: CHANGELOG.md
* **deps:** update dependency com.google.cloud:google-cloud-spanner to v1.50.0 ([1f9663c](https://www.github.com/phated/ocaml-sample-repo/commit/1f9663cf08ab1cf3b68d95dee4dc99b7c4aac373))
* **deps:** update dependency com.google.cloud:google-cloud-storage to v1.120.0 ([fcd1c89](https://www.github.com/phated/ocaml-sample-repo/commit/fcd1c890dc1526f4d62ceedad561f498195c8939))
### Miscellaneous Chores
* update common templates ([3006009](https://www.github.com/phated/ocaml-sample-repo/commit/3006009a2b1b2cb4bd5108c0f469c410759f3a6a))
`

exports['OCaml run creates a release PR for non-monorepo (sample.opam): options'] = `
Expand All @@ -314,11 +279,6 @@ description: :robot: I have created a release \\*beep\\* \\*boop\\*
* **deps:** update dependency com.google.cloud:google-cloud-spanner to v1.50.0 ([1f9663c](https://www.github.com/phated/ocaml-sample-repo/commit/1f9663cf08ab1cf3b68d95dee4dc99b7c4aac373))
* **deps:** update dependency com.google.cloud:google-cloud-storage to v1.120.0 ([fcd1c89](https://www.github.com/phated/ocaml-sample-repo/commit/fcd1c890dc1526f4d62ceedad561f498195c8939))
### Miscellaneous Chores
* update common templates ([3006009](https://www.github.com/phated/ocaml-sample-repo/commit/3006009a2b1b2cb4bd5108c0f469c410759f3a6a))
---
Expand All @@ -342,11 +302,6 @@ filename: CHANGELOG.md
* **deps:** update dependency com.google.cloud:google-cloud-spanner to v1.50.0 ([1f9663c](https://www.github.com/phated/ocaml-sample-repo/commit/1f9663cf08ab1cf3b68d95dee4dc99b7c4aac373))
* **deps:** update dependency com.google.cloud:google-cloud-storage to v1.120.0 ([fcd1c89](https://www.github.com/phated/ocaml-sample-repo/commit/fcd1c890dc1526f4d62ceedad561f498195c8939))
### Miscellaneous Chores
* update common templates ([3006009](https://www.github.com/phated/ocaml-sample-repo/commit/3006009a2b1b2cb4bd5108c0f469c410759f3a6a))
`

exports['OCaml run skips JSON files that don\'t contain a "version" field: options'] = `
Expand All @@ -364,11 +319,6 @@ description: :robot: I have created a release \\*beep\\* \\*boop\\*
* **deps:** update dependency com.google.cloud:google-cloud-spanner to v1.50.0 ([1f9663c](https://www.github.com/phated/ocaml-sample-repo/commit/1f9663cf08ab1cf3b68d95dee4dc99b7c4aac373))
* **deps:** update dependency com.google.cloud:google-cloud-storage to v1.120.0 ([fcd1c89](https://www.github.com/phated/ocaml-sample-repo/commit/fcd1c890dc1526f4d62ceedad561f498195c8939))
### Miscellaneous Chores
* update common templates ([3006009](https://www.github.com/phated/ocaml-sample-repo/commit/3006009a2b1b2cb4bd5108c0f469c410759f3a6a))
---
Expand Down
20 changes: 0 additions & 20 deletions src/releasers/ocaml.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,30 +22,10 @@ import {Changelog} from '../updaters/changelog';
import {Opam} from '../updaters/ocaml/opam';
import {EsyJson} from '../updaters/ocaml/esy-json';
import {DuneProject} from '../updaters/ocaml/dune-project';
import {ReleasePRConstructorOptions} from '..';

const notEsyLock = (path: string) => !path.startsWith('esy.lock');

const CHANGELOG_SECTIONS = [
{type: 'feat', section: 'Features'},
{type: 'fix', section: 'Bug Fixes'},
{type: 'perf', section: 'Performance Improvements'},
{type: 'revert', section: 'Reverts'},
{type: 'docs', section: 'Documentation'},
{type: 'chore', section: 'Miscellaneous Chores'},
{type: 'refactor', section: 'Code Refactoring'},
{type: 'test', section: 'Tests'},
{type: 'build', section: 'Build System'},
{type: 'ci', section: 'Continuous Integration'},
];

export class OCaml extends ReleasePR {
constructor(options: ReleasePRConstructorOptions) {
super(options);
// FIXME: this was previously hard-coded, do allow overriding?
this.changelogSections = CHANGELOG_SECTIONS;
}

protected async buildUpdates(
changelogEntry: string,
candidate: ReleaseCandidate,
Expand Down

0 comments on commit 5e8028b

Please sign in to comment.