From c9b1cd8c0ab5c0b6c130d093bf586ade9bd3477d Mon Sep 17 00:00:00 2001 From: Mikhail Bulash Date: Thu, 10 Feb 2022 15:45:29 +0100 Subject: [PATCH] Unify commit search and release targeting around `commitish`/`ref` --- README.md | 50 +++++++++++------------ dist/index.js | 45 +++++++++++---------- index.js | 12 ++++-- lib/commits.js | 12 +++--- lib/releases.js | 21 +++++----- test/index.test.js | 99 +++++++++++++++++++++++----------------------- 6 files changed, 123 insertions(+), 116 deletions(-) diff --git a/README.md b/README.md index d1d7d818d..a0a49797f 100644 --- a/README.md +++ b/README.md @@ -106,31 +106,31 @@ template: | You can configure Release Drafter using the following key in your `.github/release-drafter.yml` file: -| Key | Required | Description | -| -------------------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `template` | Required | The template for the body of the draft release. Use [template variables](#template-variables) to insert values. | -| `header` | Optional | Will be prepended to `template`. Use [template variables](#template-variables) to insert values. | -| `footer` | Optional | Will be appended to `template`. Use [template variables](#template-variables) to insert values. | -| `category-template` | Optional | The template to use for each category. Use [category template variables](#category-template-variables) to insert values. Default: `"## $TITLE"`. | -| `name-template` | Optional | The template for the name of the draft release. For example: `"v$NEXT_PATCH_VERSION"`. | -| `tag-template` | Optional | The template for the tag of the draft release. For example: `"v$NEXT_PATCH_VERSION"`. | -| `version-template` | Optional | The template to use when calculating the next version number for the release. Useful for projects that don't use semantic versioning. Default: `"$MAJOR.$MINOR.$PATCH"` | -| `change-template` | Optional | The template to use for each merged pull request. Use [change template variables](#change-template-variables) to insert values. Default: `"* $TITLE (#$NUMBER) @$AUTHOR"`. | -| `change-title-escapes` | Optional | Characters to escape in `$TITLE` when inserting into `change-template` so that they are not interpreted as Markdown format characters. Default: `""` | -| `no-changes-template` | Optional | The template to use for when there’s no changes. Default: `"* No changes"`. | -| `references` | Optional | The references to listen for configuration updates to `.github/release-drafter.yml`. Refer to [References](#references) to learn more about this | -| `categories` | Optional | Categorize pull requests using labels. Refer to [Categorize Pull Requests](#categorize-pull-requests) to learn more about this option. | -| `exclude-labels` | Optional | Exclude pull requests using labels. Refer to [Exclude Pull Requests](#exclude-pull-requests) to learn more about this option. | -| `include-labels` | Optional | Include only the specified pull requests using labels. Refer to [Include Pull Requests](#include-pull-requests) to learn more about this option. | -| `exclude-contributors` | Optional | Exclude specific usernames from the generated `$CONTRIBUTORS` variable. Refer to [Exclude Contributors](#exclude-contributors) to learn more about this option. | -| `no-contributors-template` | Optional | The template to use for `$CONTRIBUTORS` when there's no contributors to list. Default: `"No contributors"`. | -| `replacers` | Optional | Search and replace content in the generated changelog body. Refer to [Replacers](#replacers) to learn more about this option. | -| `sort-by` | Optional | Sort changelog by merged_at or title. Can be one of: `merged_at`, `title`. Default: `merged_at`. | -| `sort-direction` | Optional | Sort changelog in ascending or descending order. Can be one of: `ascending`, `descending`. Default: `descending`. | -| `prerelease` | Optional | Mark the draft release as pre-release. Default `false`. | -| `version-resolver` | Optional | Adjust the `$RESOLVED_VERSION` variable using labels. Refer to [Version Resolver](#version-resolver) to learn more about this | -| `filter-by-commitish` | Optional | Filter previous releases to consider only the target branch of the release. Default: `false`. | -| `commitish` | Optional | Specify the target branch of the release. Default: the default branch of the repo. | +| Key | Required | Description | +| -------------------------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `template` | Required | The template for the body of the draft release. Use [template variables](#template-variables) to insert values. | +| `header` | Optional | Will be prepended to `template`. Use [template variables](#template-variables) to insert values. | +| `footer` | Optional | Will be appended to `template`. Use [template variables](#template-variables) to insert values. | +| `category-template` | Optional | The template to use for each category. Use [category template variables](#category-template-variables) to insert values. Default: `"## $TITLE"`. | +| `name-template` | Optional | The template for the name of the draft release. For example: `"v$NEXT_PATCH_VERSION"`. | +| `tag-template` | Optional | The template for the tag of the draft release. For example: `"v$NEXT_PATCH_VERSION"`. | +| `version-template` | Optional | The template to use when calculating the next version number for the release. Useful for projects that don't use semantic versioning. Default: `"$MAJOR.$MINOR.$PATCH"` | +| `change-template` | Optional | The template to use for each merged pull request. Use [change template variables](#change-template-variables) to insert values. Default: `"* $TITLE (#$NUMBER) @$AUTHOR"`. | +| `change-title-escapes` | Optional | Characters to escape in `$TITLE` when inserting into `change-template` so that they are not interpreted as Markdown format characters. Default: `""` | +| `no-changes-template` | Optional | The template to use for when there’s no changes. Default: `"* No changes"`. | +| `references` | Optional | The references to listen for configuration updates to `.github/release-drafter.yml`. Refer to [References](#references) to learn more about this | +| `categories` | Optional | Categorize pull requests using labels. Refer to [Categorize Pull Requests](#categorize-pull-requests) to learn more about this option. | +| `exclude-labels` | Optional | Exclude pull requests using labels. Refer to [Exclude Pull Requests](#exclude-pull-requests) to learn more about this option. | +| `include-labels` | Optional | Include only the specified pull requests using labels. Refer to [Include Pull Requests](#include-pull-requests) to learn more about this option. | +| `exclude-contributors` | Optional | Exclude specific usernames from the generated `$CONTRIBUTORS` variable. Refer to [Exclude Contributors](#exclude-contributors) to learn more about this option. | +| `no-contributors-template` | Optional | The template to use for `$CONTRIBUTORS` when there's no contributors to list. Default: `"No contributors"`. | +| `replacers` | Optional | Search and replace content in the generated changelog body. Refer to [Replacers](#replacers) to learn more about this option. | +| `sort-by` | Optional | Sort changelog by merged_at or title. Can be one of: `merged_at`, `title`. Default: `merged_at`. | +| `sort-direction` | Optional | Sort changelog in ascending or descending order. Can be one of: `ascending`, `descending`. Default: `descending`. | +| `prerelease` | Optional | Mark the draft release as pre-release. Default `false`. | +| `version-resolver` | Optional | Adjust the `$RESOLVED_VERSION` variable using labels. Refer to [Version Resolver](#version-resolver) to learn more about this | +| `commitish` | Optional | The release target, i.e. branch/tag/commit it should point to. Default: the ref that release-drafter runs for, e.g. `refs/heads/master` if configured to run on pushes to `master`. | +| `filter-by-commitish` | Optional | Filter previous releases to consider only those with the target matching `commitish`. Default: `false`. | Release Drafter also supports [Probot Config](https://github.com/probot/probot-config), if you want to store your configuration files in a central repository. This allows you to share configurations between projects, and create a organization-wide configuration file by creating a repository named `.github` with the file `.github/release-drafter.yml`. diff --git a/dist/index.js b/dist/index.js index 4ab765973..a0b3c01b9 100644 --- a/dist/index.js +++ b/dist/index.js @@ -128604,15 +128604,19 @@ module.exports = (app, { getRouter }) => { return } + const targetCommitish = commitish || config['commitish'] || ref + const filterByCommitish = config['filter-by-commitish'] + const { draftRelease, lastRelease } = await findReleases({ - ref, context, - config, + targetCommitish, + filterByCommitish, }) + const { commits, pullRequests: mergedPullRequests } = await findCommitsWithAssociatedPullRequests({ context, - ref, + targetCommitish, lastRelease, config, }) @@ -128634,7 +128638,7 @@ module.exports = (app, { getRouter }) => { name, isPreRelease, shouldDraft, - commitish, + targetCommitish, }) let createOrUpdateReleaseResponse @@ -128725,7 +128729,7 @@ const findCommitsWithAssociatedPullRequestsQuery = /* GraphQL */ ` query findCommitsWithAssociatedPullRequests( $name: String! $owner: String! - $ref: String! + $targetCommitish: String! $withPullRequestBody: Boolean! $withPullRequestURL: Boolean! $since: GitTimestamp @@ -128734,7 +128738,7 @@ const findCommitsWithAssociatedPullRequestsQuery = /* GraphQL */ ` $withHeadRefName: Boolean! ) { repository(name: $name, owner: $owner) { - object(expression: $ref) { + object(expression: $targetCommitish) { ... on Commit { history(first: 100, since: $since, after: $after) { totalCount @@ -128786,7 +128790,7 @@ const findCommitsWithAssociatedPullRequestsQuery = /* GraphQL */ ` const findCommitsWithAssociatedPullRequests = async ({ context, - ref, + targetCommitish, lastRelease, config, }) => { @@ -128794,7 +128798,7 @@ const findCommitsWithAssociatedPullRequests = async ({ const variables = { name: repo, owner, - ref, + targetCommitish, withPullRequestBody: config['change-template'].includes('$BODY'), withPullRequestURL: config['change-template'].includes('$URL'), withBaseRefName: config['change-template'].includes('$BASE_REF_NAME'), @@ -128807,7 +128811,7 @@ const findCommitsWithAssociatedPullRequests = async ({ if (lastRelease) { log({ context, - message: `Fetching all commits for reference ${ref} since ${lastRelease.created_at}`, + message: `Fetching parent commits ${targetCommitish} since ${lastRelease.created_at}`, }) data = await paginate( @@ -128822,7 +128826,7 @@ const findCommitsWithAssociatedPullRequests = async ({ (commit) => commit.committedDate != lastRelease.created_at ) } else { - log({ context, message: `Fetching all commits for reference ${ref}` }) + log({ context, message: `Fetching parent commits of ${targetCommitish}` }) data = await paginate( context.octokit.graphql, @@ -129056,7 +129060,11 @@ const sortReleases = (releases) => { } } -const findReleases = async ({ ref, context, config }) => { +const findReleases = async ({ + context, + targetCommitish, + filterByCommitish, +}) => { let releases = await context.octokit.paginate( context.octokit.repos.listReleases.endpoint.merge( context.repo({ @@ -129067,9 +129075,8 @@ const findReleases = async ({ ref, context, config }) => { log({ context, message: `Found ${releases.length} releases` }) - const { 'filter-by-commitish': filterByCommitish } = config const filteredReleases = filterByCommitish - ? releases.filter((r) => ref.match(`/${r.target_commitish}$`)) + ? releases.filter((r) => targetCommitish.match(`/${r.target_commitish}$`)) : releases const sortedPublishedReleases = sortReleases( filteredReleases.filter((r) => !r.draft) @@ -129308,7 +129315,7 @@ const generateReleaseInfo = ({ name, isPreRelease, shouldDraft, - commitish, + targetCommitish, }) => { const { owner, repo } = context.repo() @@ -129358,15 +129365,11 @@ const generateReleaseInfo = ({ name = template(name, versionInfo) } - if (commitish === undefined) { - commitish = config['commitish'] || '' - } - return { name, tag, body, - commitish, + targetCommitish, prerelease: isPreRelease, draft: shouldDraft, } @@ -129375,7 +129378,7 @@ const generateReleaseInfo = ({ const createRelease = ({ context, releaseInfo }) => { return context.octokit.repos.createRelease( context.repo({ - target_commitish: releaseInfo.commitish, + target_commitish: releaseInfo.targetCommitish, name: releaseInfo.name, tag_name: releaseInfo.tag, body: releaseInfo.body, @@ -129389,7 +129392,7 @@ const updateRelease = ({ context, draftRelease, releaseInfo }) => { const updateReleaseParameters = updateDraftReleaseParameters({ name: releaseInfo.name || draftRelease.name, tag_name: releaseInfo.tag || draftRelease.tag_name, - target_commitish: releaseInfo.commitish, + target_commitish: releaseInfo.targetCommitish, }) return context.octokit.repos.updateRelease( diff --git a/index.js b/index.js index 5740e8960..a4babd9d7 100644 --- a/index.js +++ b/index.js @@ -158,15 +158,19 @@ module.exports = (app, { getRouter }) => { return } + const targetCommitish = commitish || config['commitish'] || ref + const filterByCommitish = config['filter-by-commitish'] + const { draftRelease, lastRelease } = await findReleases({ - ref, context, - config, + targetCommitish, + filterByCommitish, }) + const { commits, pullRequests: mergedPullRequests } = await findCommitsWithAssociatedPullRequests({ context, - ref, + targetCommitish, lastRelease, config, }) @@ -188,7 +192,7 @@ module.exports = (app, { getRouter }) => { name, isPreRelease, shouldDraft, - commitish, + targetCommitish, }) let createOrUpdateReleaseResponse diff --git a/lib/commits.js b/lib/commits.js index 37d171115..7364c5027 100644 --- a/lib/commits.js +++ b/lib/commits.js @@ -6,7 +6,7 @@ const findCommitsWithAssociatedPullRequestsQuery = /* GraphQL */ ` query findCommitsWithAssociatedPullRequests( $name: String! $owner: String! - $ref: String! + $targetCommitish: String! $withPullRequestBody: Boolean! $withPullRequestURL: Boolean! $since: GitTimestamp @@ -15,7 +15,7 @@ const findCommitsWithAssociatedPullRequestsQuery = /* GraphQL */ ` $withHeadRefName: Boolean! ) { repository(name: $name, owner: $owner) { - object(expression: $ref) { + object(expression: $targetCommitish) { ... on Commit { history(first: 100, since: $since, after: $after) { totalCount @@ -67,7 +67,7 @@ const findCommitsWithAssociatedPullRequestsQuery = /* GraphQL */ ` const findCommitsWithAssociatedPullRequests = async ({ context, - ref, + targetCommitish, lastRelease, config, }) => { @@ -75,7 +75,7 @@ const findCommitsWithAssociatedPullRequests = async ({ const variables = { name: repo, owner, - ref, + targetCommitish, withPullRequestBody: config['change-template'].includes('$BODY'), withPullRequestURL: config['change-template'].includes('$URL'), withBaseRefName: config['change-template'].includes('$BASE_REF_NAME'), @@ -88,7 +88,7 @@ const findCommitsWithAssociatedPullRequests = async ({ if (lastRelease) { log({ context, - message: `Fetching all commits for reference ${ref} since ${lastRelease.created_at}`, + message: `Fetching parent commits ${targetCommitish} since ${lastRelease.created_at}`, }) data = await paginate( @@ -103,7 +103,7 @@ const findCommitsWithAssociatedPullRequests = async ({ (commit) => commit.committedDate != lastRelease.created_at ) } else { - log({ context, message: `Fetching all commits for reference ${ref}` }) + log({ context, message: `Fetching parent commits of ${targetCommitish}` }) data = await paginate( context.octokit.graphql, diff --git a/lib/releases.js b/lib/releases.js index 950e81172..1e8143c04 100644 --- a/lib/releases.js +++ b/lib/releases.js @@ -17,7 +17,11 @@ const sortReleases = (releases) => { } } -const findReleases = async ({ ref, context, config }) => { +const findReleases = async ({ + context, + targetCommitish, + filterByCommitish, +}) => { let releases = await context.octokit.paginate( context.octokit.repos.listReleases.endpoint.merge( context.repo({ @@ -28,9 +32,8 @@ const findReleases = async ({ ref, context, config }) => { log({ context, message: `Found ${releases.length} releases` }) - const { 'filter-by-commitish': filterByCommitish } = config const filteredReleases = filterByCommitish - ? releases.filter((r) => ref.match(`/${r.target_commitish}$`)) + ? releases.filter((r) => targetCommitish.match(`/${r.target_commitish}$`)) : releases const sortedPublishedReleases = sortReleases( filteredReleases.filter((r) => !r.draft) @@ -269,7 +272,7 @@ const generateReleaseInfo = ({ name, isPreRelease, shouldDraft, - commitish, + targetCommitish, }) => { const { owner, repo } = context.repo() @@ -319,15 +322,11 @@ const generateReleaseInfo = ({ name = template(name, versionInfo) } - if (commitish === undefined) { - commitish = config['commitish'] || '' - } - return { name, tag, body, - commitish, + targetCommitish, prerelease: isPreRelease, draft: shouldDraft, } @@ -336,7 +335,7 @@ const generateReleaseInfo = ({ const createRelease = ({ context, releaseInfo }) => { return context.octokit.repos.createRelease( context.repo({ - target_commitish: releaseInfo.commitish, + target_commitish: releaseInfo.targetCommitish, name: releaseInfo.name, tag_name: releaseInfo.tag, body: releaseInfo.body, @@ -350,7 +349,7 @@ const updateRelease = ({ context, draftRelease, releaseInfo }) => { const updateReleaseParameters = updateDraftReleaseParameters({ name: releaseInfo.name || draftRelease.name, tag_name: releaseInfo.tag || draftRelease.tag_name, - target_commitish: releaseInfo.commitish, + target_commitish: releaseInfo.targetCommitish, }) return context.octokit.repos.updateRelease( diff --git a/test/index.test.js b/test/index.test.js index 569708e61..b836e15bf 100644 --- a/test/index.test.js +++ b/test/index.test.js @@ -134,7 +134,7 @@ describe('release-drafter', () => { }) describe('when configured for that branch', () => { - it('creates a release draft', async () => { + it('creates a release draft targeting that branch', async () => { getConfigMock('config-non-master-branch.yml') nock('https://api.github.com') @@ -160,7 +160,7 @@ describe('release-drafter', () => { "name": "", "prerelease": false, "tag_name": "", - "target_commitish": "", + "target_commitish": "refs/heads/some-branch", } `) return true @@ -227,7 +227,7 @@ describe('release-drafter', () => { "name": "", "prerelease": false, "tag_name": "", - "target_commitish": "", + "target_commitish": "refs/tags/v1.0.0", } `) return true @@ -278,7 +278,7 @@ describe('release-drafter', () => { "name": "", "prerelease": false, "tag_name": "", - "target_commitish": "", + "target_commitish": "refs/heads/master", } `) return true @@ -331,7 +331,7 @@ describe('release-drafter', () => { "name": "", "prerelease": false, "tag_name": "", - "target_commitish": "", + "target_commitish": "refs/heads/master", } `) return true @@ -384,7 +384,7 @@ describe('release-drafter', () => { "name": "", "prerelease": false, "tag_name": "", - "target_commitish": "", + "target_commitish": "refs/heads/master", } `) return true @@ -428,7 +428,7 @@ describe('release-drafter', () => { "name": "v2.0.1 (Code name: Placeholder)", "prerelease": false, "tag_name": "v2.0.1", - "target_commitish": "", + "target_commitish": "refs/heads/master", } `) return true @@ -475,7 +475,7 @@ describe('release-drafter', () => { "name": "", "prerelease": false, "tag_name": "", - "target_commitish": "", + "target_commitish": "refs/heads/master", } `) return true @@ -523,7 +523,7 @@ describe('release-drafter', () => { "name": "", "prerelease": false, "tag_name": "", - "target_commitish": "", + "target_commitish": "refs/heads/master", } `) return true @@ -571,7 +571,7 @@ describe('release-drafter', () => { "name": "", "prerelease": false, "tag_name": "", - "target_commitish": "", + "target_commitish": "refs/heads/master", } `) return true @@ -615,7 +615,7 @@ describe('release-drafter', () => { "name": "", "prerelease": false, "tag_name": "", - "target_commitish": "", + "target_commitish": "refs/heads/master", } `) return true @@ -657,7 +657,7 @@ describe('release-drafter', () => { "name": "", "prerelease": false, "tag_name": "", - "target_commitish": "", + "target_commitish": "refs/heads/master", } `) return true @@ -701,7 +701,7 @@ describe('release-drafter', () => { "name": "", "prerelease": false, "tag_name": "", - "target_commitish": "", + "target_commitish": "refs/heads/master", } `) return true @@ -752,7 +752,7 @@ describe('release-drafter', () => { "name": "", "prerelease": false, "tag_name": "", - "target_commitish": "", + "target_commitish": "refs/heads/master", } `) return true @@ -794,7 +794,7 @@ describe('release-drafter', () => { "name": "", "prerelease": false, "tag_name": "", - "target_commitish": "", + "target_commitish": "refs/heads/master", } `) return true @@ -845,6 +845,7 @@ describe('release-drafter', () => { "name": "v3.0.0-beta", "prerelease": false, "tag_name": "v3.0.0-beta", + "target_commitish": "refs/heads/master", } `) return true @@ -902,7 +903,7 @@ describe('release-drafter', () => { "name": "", "prerelease": false, "tag_name": "", - "target_commitish": "", + "target_commitish": "refs/heads/master", } `) return true @@ -958,7 +959,7 @@ describe('release-drafter', () => { "name": "", "prerelease": false, "tag_name": "", - "target_commitish": "", + "target_commitish": "refs/heads/master", } `) return true @@ -1014,7 +1015,7 @@ describe('release-drafter', () => { "name": "", "prerelease": false, "tag_name": "", - "target_commitish": "", + "target_commitish": "refs/heads/master", } `) return true @@ -1068,7 +1069,7 @@ describe('release-drafter', () => { "name": "", "prerelease": false, "tag_name": "", - "target_commitish": "", + "target_commitish": "refs/heads/master", } `) return true @@ -1122,7 +1123,7 @@ describe('release-drafter', () => { "name": "", "prerelease": false, "tag_name": "", - "target_commitish": "", + "target_commitish": "refs/heads/master", } `) return true @@ -1180,7 +1181,7 @@ describe('release-drafter', () => { "name": "", "prerelease": false, "tag_name": "", - "target_commitish": "", + "target_commitish": "refs/heads/master", } `) return true @@ -1235,7 +1236,7 @@ describe('release-drafter', () => { "name": "", "prerelease": false, "tag_name": "", - "target_commitish": "", + "target_commitish": "refs/heads/master", } `) return true @@ -1284,7 +1285,7 @@ describe('release-drafter', () => { "name": "", "prerelease": false, "tag_name": "", - "target_commitish": "", + "target_commitish": "refs/heads/master", } `) return true @@ -1327,7 +1328,7 @@ describe('release-drafter', () => { "name": "v2.0.1 (Code name: Placeholder)", "prerelease": false, "tag_name": "v2.0.1", - "target_commitish": "", + "target_commitish": "refs/heads/master", } `) return true @@ -1368,7 +1369,7 @@ describe('release-drafter', () => { "name": "v2.1 (Code name: Placeholder)", "prerelease": false, "tag_name": "v2.1", - "target_commitish": "", + "target_commitish": "refs/heads/master", } `) return true @@ -1409,7 +1410,7 @@ describe('release-drafter', () => { "name": "v3 (Code name: Placeholder)", "prerelease": false, "tag_name": "v3", - "target_commitish": "", + "target_commitish": "refs/heads/master", } `) return true @@ -1454,7 +1455,7 @@ describe('release-drafter', () => { "name": "", "prerelease": false, "tag_name": "", - "target_commitish": "", + "target_commitish": "refs/heads/master", } `) return true @@ -1496,7 +1497,7 @@ describe('release-drafter', () => { "name": "", "prerelease": false, "tag_name": "", - "target_commitish": "", + "target_commitish": "refs/heads/master", } `) return true @@ -1539,7 +1540,7 @@ describe('release-drafter', () => { "name": "", "prerelease": false, "tag_name": "", - "target_commitish": "", + "target_commitish": "refs/heads/master", } `) return true @@ -1581,7 +1582,7 @@ describe('release-drafter', () => { "name": "", "prerelease": false, "tag_name": "", - "target_commitish": "", + "target_commitish": "refs/heads/master", } `) return true @@ -1633,7 +1634,7 @@ describe('release-drafter', () => { "name": "", "prerelease": false, "tag_name": "", - "target_commitish": "", + "target_commitish": "refs/heads/master", } `) return true @@ -1686,7 +1687,7 @@ describe('release-drafter', () => { "name": "", "prerelease": false, "tag_name": "", - "target_commitish": "", + "target_commitish": "refs/heads/master", } `) return true @@ -1739,7 +1740,7 @@ describe('release-drafter', () => { "name": "", "prerelease": false, "tag_name": "", - "target_commitish": "", + "target_commitish": "refs/heads/master", } `) return true @@ -1789,7 +1790,7 @@ describe('release-drafter', () => { "name": "", "prerelease": false, "tag_name": "", - "target_commitish": "", + "target_commitish": "refs/heads/master", } `) return true @@ -1841,7 +1842,7 @@ describe('release-drafter', () => { "name": "", "prerelease": false, "tag_name": "", - "target_commitish": "", + "target_commitish": "refs/heads/master", } `) return true @@ -1908,7 +1909,7 @@ describe('release-drafter', () => { "name": "", "prerelease": false, "tag_name": "", - "target_commitish": "", + "target_commitish": "refs/heads/master", } `) return true @@ -1961,7 +1962,7 @@ describe('release-drafter', () => { "name": "", "prerelease": false, "tag_name": "", - "target_commitish": "", + "target_commitish": "refs/heads/master", } `) return true @@ -2030,7 +2031,7 @@ describe('release-drafter', () => { "name": "", "prerelease": false, "tag_name": "", - "target_commitish": "", + "target_commitish": "refs/heads/master", } `) return true @@ -2098,7 +2099,7 @@ describe('release-drafter', () => { "name": "", "prerelease": false, "tag_name": "", - "target_commitish": "", + "target_commitish": "refs/heads/master", } `) return true @@ -2196,7 +2197,7 @@ describe('release-drafter', () => { "name": "", "prerelease": false, "tag_name": "", - "target_commitish": "", + "target_commitish": "refs/heads/master", } `) return true @@ -2543,7 +2544,7 @@ describe('release-drafter', () => { "name": "v1.0.2 🌈", "prerelease": false, "tag_name": "v1.0.2", - "target_commitish": "", + "target_commitish": "refs/heads/master", } `) return true @@ -2599,7 +2600,7 @@ describe('release-drafter', () => { "name": "v1.0.2 🌈", "prerelease": false, "tag_name": "v1.0.2", - "target_commitish": "", + "target_commitish": "refs/heads/master", } `) return true @@ -2653,7 +2654,7 @@ describe('release-drafter', () => { "name": "", "prerelease": false, "tag_name": "", - "target_commitish": "", + "target_commitish": "refs/heads/master", } `) return true @@ -2705,7 +2706,7 @@ describe('release-drafter', () => { "name": "v2.0.1 🌈", "prerelease": false, "tag_name": "v2.0.1", - "target_commitish": "", + "target_commitish": "refs/heads/master", } `) return true @@ -2749,7 +2750,7 @@ describe('release-drafter', () => { "name": "v2.1.0", "prerelease": false, "tag_name": "v2.1.0", - "target_commitish": "", + "target_commitish": "refs/heads/master", } `) return true @@ -2790,7 +2791,7 @@ describe('release-drafter', () => { "name": "v2.0.1", "prerelease": false, "tag_name": "v2.0.1", - "target_commitish": "", + "target_commitish": "refs/heads/master", } `) return true @@ -2831,7 +2832,7 @@ describe('release-drafter', () => { "name": "v2.1.0", "prerelease": false, "tag_name": "v2.1.0", - "target_commitish": "", + "target_commitish": "refs/heads/master", } `) return true @@ -2872,7 +2873,7 @@ describe('release-drafter', () => { "name": "v3.0.0", "prerelease": false, "tag_name": "v3.0.0", - "target_commitish": "", + "target_commitish": "refs/heads/master", } `) return true @@ -2914,7 +2915,7 @@ describe('release-drafter', () => { "name": "v3.0.0", "prerelease": false, "tag_name": "v3.0.0", - "target_commitish": "", + "target_commitish": "refs/heads/master", } `) return true