Skip to content

Commit

Permalink
chore(ci): fix regression on release issue generation (#275)
Browse files Browse the repository at this point in the history
  • Loading branch information
eunjae-lee authored Mar 22, 2022
1 parent 4a28a66 commit 761b972
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
11 changes: 11 additions & 0 deletions scripts/release/__tests__/create-release-issue.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,20 @@ import {
parseCommit,
getVersionChangesText,
decideReleaseStrategy,
readVersions,
} from '../create-release-issue';

describe('create release issue', () => {
it('reads versions openapitools.json', () => {
expect(readVersions()).toEqual({
java: {
current: expect.any(String),
},
javascript: { current: expect.any(String) },
php: { current: expect.any(String) },
});
});

it('parses commit', () => {
expect(parseCommit(`abcdefg fix(javascript): fix the thing`)).toEqual({
hash: 'abcdefg',
Expand Down
4 changes: 2 additions & 2 deletions scripts/release/create-release-issue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ import type {

dotenv.config({ path: ROOT_ENV_PATH });

function readVersions(): VersionsWithoutReleaseType {
export function readVersions(): VersionsWithoutReleaseType {
return Object.keys(MAIN_GENERATOR).reduce((acc, lang) => {
return {
...acc,
[lang]: {
current: getPackageVersion(lang),
current: getPackageVersion(MAIN_GENERATOR[lang]),
},
};
}, {});
Expand Down

0 comments on commit 761b972

Please sign in to comment.