Repository: release-drafter/release-drafter
Pull request #1348 (2023-07-11 15:53:00)

feat: add latest input
Creates a new input `latest` to allow publish or update published releases with the github API parameter `make_latest`:
https://docs.github.com/en/rest/releases/releases?apiVersion=2022-11-28#create-a-release
Three values are possible:
- `true`
- `false`
- `legacy`*

It will only be applied if the release is not a draft or a prerelease
Nowadays all releases are published as `latest` by default

>*legacy specifies that the latest release should be determined based on the release creation date and higher semantic version

fixes #1348

o-mago: @jetersen could you review it, please? 😁

Patch:
diff --git a/README.md b/README.md
index 53bf3ad..2170659 100644
--- a/README.md
+++ b/README.md
@@ -139,6 +139,7 @@ You can configure Release Drafter using the following key in your `.github/relea
 | `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`.                                                                                                                            |
+| `latest`                   | Optional | Mark the release as latest. Only works for published releases. Can be one of: `true`, `false`, `legacy`. Default `true`.                                                           |
 | `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 or 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`.                                                                            |
@@ -356,6 +357,7 @@ The Release Drafter GitHub Action accepts a number of optional inputs directly i
 | `version`     | The version to be associated with the GitHub release that's created or updated. This will override any version calculated by the release-drafter.                                                                                                                                                                                                                  |
 | `publish`     | A boolean indicating whether the release being created or updated should be immediately published. This may be useful if the output of a previous workflow step determines that a new version of your project has been (or will be) released, as with [`salsify/action-detect-and-tag-new-version`](https://github.com/salsify/action-detect-and-tag-new-version). |
 | `prerelease`  | A boolean indicating whether the release being created or updated is a prerelease.                                                                                                                                                                                                                                                                                 |
+| `latest`      | A string indicating whether the release being created or updated should be marked as latest.                                                                                                                                                                                                                                                                       |
 | `commitish`   | A string specifying the target branch for the release being created.                                                                                                                                                                                                                                                                                               |
 | `header`      | A string that would be added before the template body.                                                                                                                                                                                                                                                                                                             |
 | `footer`      | A string that would be added after the template body.                                                                                                                                                                                                                                                                                                              |
diff --git a/action.yml b/action.yml
index 26bdbbd..546a96e 100644
--- a/action.yml
+++ b/action.yml
@@ -33,6 +33,11 @@ inputs:
       A boolean indicating whether the release being created or updated should be immediately published.
     required: false
     default: ''
+  latest:
+    description: |
+      A string indicating whether the release being created or updated should be marked as latest.
+    required: false
+    default: ''
   prerelease:
     description: |
       A boolean indicating whether the release being created or updated is a prerelease.
diff --git a/dist/index.js b/dist/index.js
index 2523f6a..f961794 100644
--- a/dist/index.js
+++ b/dist/index.js
@@ -142349,7 +142349,7 @@ module.exports = (app, { getRouter }) => {
       configName,
     })
 
-    const { isPreRelease } = getInput({ config })
+    const { isPreRelease, latest } = getInput({ config })
 
     if (config === null || disableReleaser) return
 
@@ -142410,6 +142410,7 @@ module.exports = (app, { getRouter }) => {
       tag,
       name,
       isPreRelease,
+      latest,
       shouldDraft,
       targetCommitish,
     })
@@ -142465,8 +142466,18 @@ function getInput({ config } = {}) {
   // the input takes precedence, because it's more easy to change at runtime
   const preRelease = core.getInput('prerelease').toLowerCase()
 
+  const isPreRelease =
+    preRelease === 'true' || (!preRelease && config.prerelease)
+
+  const latestInput = core.getInput('latest').toLowerCase()
+
+  const latest = isPreRelease
+    ? 'false'
+    : (!latestInput && config.latest) || latestInput || undefined
+
   return {
-    isPreRelease: preRelease === 'true' || (!preRelease && config.prerelease),
+    isPreRelease,
+    latest,
   }
 }
 
@@ -142800,6 +142811,7 @@ const DEFAULT_CONFIG = Object.freeze({
   'sort-by': SORT_BY.mergedAt,
   'sort-direction': SORT_DIRECTIONS.descending,
   prerelease: false,
+  latest: 'true',
   'filter-by-commitish': false,
   'include-pre-releases': false,
   commitish: '',
@@ -143221,6 +143233,7 @@ const generateReleaseInfo = ({
   tag,
   name,
   isPreRelease,
+  latest,
   shouldDraft,
   targetCommitish,
 }) => {
@@ -143294,6 +143307,7 @@ const generateReleaseInfo = ({
     body,
     targetCommitish,
     prerelease: isPreRelease,
+    make_latest: latest,
     draft: shouldDraft,
     resolvedVersion,
     majorVersion,
@@ -143311,6 +143325,7 @@ const createRelease = ({ context, releaseInfo }) => {
       body: releaseInfo.body,
       draft: releaseInfo.draft,
       prerelease: releaseInfo.prerelease,
+      make_latest: releaseInfo.make_latest,
     })
   )
 }
@@ -143328,6 +143343,7 @@ const updateRelease = ({ context, draftRelease, releaseInfo }) => {
       body: releaseInfo.body,
       draft: releaseInfo.draft,
       prerelease: releaseInfo.prerelease,
+      make_latest: releaseInfo.make_latest,
       ...updateReleaseParameters,
     })
   )
@@ -143444,6 +143460,10 @@ const schema = (context) => {
 
       prerelease: Joi.boolean().default(DEFAULT_CONFIG.prerelease),
 
+      latest: Joi.string()
+        .allow('', 'true', 'false', 'legacy')
+        .default(DEFAULT_CONFIG.latest),
+
       'filter-by-commitish': Joi.boolean().default(
         DEFAULT_CONFIG['filter-by-commitish']
       ),
diff --git a/docker/action.yml b/docker/action.yml
index b415b69..83dc6ca 100644
--- a/docker/action.yml
+++ b/docker/action.yml
@@ -33,6 +33,11 @@ inputs:
       A boolean indicating whether the release being created or updated should be immediately published.
     required: false
     default: ''
+  latest:
+    description: |
+      A string indicating whether the release being created or updated should be marked as latest.
+    required: false
+    default: ''
   prerelease:
     description: |
       A boolean indicating whether the release being created or updated is a prerelease.
diff --git a/index.js b/index.js
index 250116b..635efc9 100644
--- a/index.js
+++ b/index.js
@@ -146,7 +146,7 @@ module.exports = (app, { getRouter }) => {
       configName,
     })
 
-    const { isPreRelease } = getInput({ config })
+    const { isPreRelease, latest } = getInput({ config })
 
     if (config === null || disableReleaser) return
 
@@ -207,6 +207,7 @@ module.exports = (app, { getRouter }) => {
       tag,
       name,
       isPreRelease,
+      latest,
       shouldDraft,
       targetCommitish,
     })
@@ -262,8 +263,18 @@ function getInput({ config } = {}) {
   // the input takes precedence, because it's more easy to change at runtime
   const preRelease = core.getInput('prerelease').toLowerCase()
 
+  const isPreRelease =
+    preRelease === 'true' || (!preRelease && config.prerelease)
+
+  const latestInput = core.getInput('latest').toLowerCase()
+
+  const latest = isPreRelease
+    ? 'false'
+    : (!latestInput && config.latest) || latestInput || undefined
+
   return {
-    isPreRelease: preRelease === 'true' || (!preRelease && config.prerelease),
+    isPreRelease,
+    latest,
   }
 }
 
diff --git a/lib/default-config.js b/lib/default-config.js
index bc65a45..74611b8 100644
--- a/lib/default-config.js
+++ b/lib/default-config.js
@@ -25,6 +25,7 @@ const DEFAULT_CONFIG = Object.freeze({
   'sort-by': SORT_BY.mergedAt,
   'sort-direction': SORT_DIRECTIONS.descending,
   prerelease: false,
+  latest: 'true',
   'filter-by-commitish': false,
   'include-pre-releases': false,
   commitish: '',
diff --git a/lib/releases.js b/lib/releases.js
index e9c22f3..bcb6f4c 100644
--- a/lib/releases.js
+++ b/lib/releases.js
@@ -326,6 +326,7 @@ const generateReleaseInfo = ({
   tag,
   name,
   isPreRelease,
+  latest,
   shouldDraft,
   targetCommitish,
 }) => {
@@ -399,6 +400,7 @@ const generateReleaseInfo = ({
     body,
     targetCommitish,
     prerelease: isPreRelease,
+    make_latest: latest,
     draft: shouldDraft,
     resolvedVersion,
     majorVersion,
@@ -416,6 +418,7 @@ const createRelease = ({ context, releaseInfo }) => {
       body: releaseInfo.body,
       draft: releaseInfo.draft,
       prerelease: releaseInfo.prerelease,
+      make_latest: releaseInfo.make_latest,
     })
   )
 }
@@ -433,6 +436,7 @@ const updateRelease = ({ context, draftRelease, releaseInfo }) => {
       body: releaseInfo.body,
       draft: releaseInfo.draft,
       prerelease: releaseInfo.prerelease,
+      make_latest: releaseInfo.make_latest,
       ...updateReleaseParameters,
     })
   )
diff --git a/lib/schema.js b/lib/schema.js
index b17e406..023a609 100644
--- a/lib/schema.js
+++ b/lib/schema.js
@@ -77,6 +77,10 @@ const schema = (context) => {
 
       prerelease: Joi.boolean().default(DEFAULT_CONFIG.prerelease),
 
+      latest: Joi.string()
+        .allow('', 'true', 'false', 'legacy')
+        .default(DEFAULT_CONFIG.latest),
+
       'filter-by-commitish': Joi.boolean().default(
         DEFAULT_CONFIG['filter-by-commitish']
       ),
diff --git a/schema.json b/schema.json
index 66ab114..fdaa5f1 100644
--- a/schema.json
+++ b/schema.json
@@ -117,6 +117,18 @@
       "default": false,
       "type": "boolean"
     },
+    "latest": {
+      "anyOf": [
+        {
+          "type": "string",
+          "enum": ["", "true", "false", "legacy"]
+        },
+        {
+          "default": "true",
+          "type": "string"
+        }
+      ]
+    },
     "filter-by-commitish": {
       "default": false,
       "type": "boolean"


Test patch:
diff --git a/test/index.test.js b/test/index.test.js
index bba6dbe..4a44768 100644
--- a/test/index.test.js
+++ b/test/index.test.js
@@ -160,6 +160,7 @@ describe('release-drafter', () => {
                   * No changes
                   ",
                     "draft": true,
+                    "make_latest": "true",
                     "name": "",
                     "prerelease": false,
                     "tag_name": "",
@@ -227,6 +228,7 @@ describe('release-drafter', () => {
                   * 👽 Add alien technology (#1) @TimonVS
                   ",
                     "draft": true,
+                    "make_latest": "true",
                     "name": "",
                     "prerelease": false,
                     "tag_name": "",
@@ -278,6 +280,7 @@ describe('release-drafter', () => {
                 Previous tag: ''
                 ",
                   "draft": true,
+                  "make_latest": "true",
                   "name": "",
                   "prerelease": false,
                   "tag_name": "",
@@ -331,6 +334,7 @@ describe('release-drafter', () => {
                 * 👽 Add alien technology (#1) @TimonVS
                 ",
                   "draft": true,
+                  "make_latest": "true",
                   "name": "",
                   "prerelease": false,
                   "tag_name": "",
@@ -384,6 +388,7 @@ describe('release-drafter', () => {
                 * 👽 Add alien technology (#1) @TimonVS
                 ",
                   "draft": true,
+                  "make_latest": "true",
                   "name": "",
                   "prerelease": false,
                   "tag_name": "",
@@ -428,6 +433,7 @@ describe('release-drafter', () => {
                 Object {
                   "body": "Placeholder with example. Automatically calculated values are next major=3.0.0 (major=3, minor=0, patch=0), minor=2.1.0 (major=2, minor=1, patch=0), patch=2.0.1 (major=2, minor=0, patch=1)",
                   "draft": true,
+                  "make_latest": "true",
                   "name": "v2.0.1 (Code name: Placeholder)",
                   "prerelease": false,
                   "tag_name": "v2.0.1",
@@ -475,6 +481,7 @@ describe('release-drafter', () => {
                   * Change: #2 'Add big feature' @TimonVS
                   * Change: #1 '👽 Add alien technology' @TimonVS",
                     "draft": true,
+                    "make_latest": "true",
                     "name": "",
                     "prerelease": false,
                     "tag_name": "",
@@ -523,6 +530,7 @@ describe('release-drafter', () => {
                   * Change: #2 'Add big feature' ![I'm kind of a big deal](https://media.giphy.com/media/9LFBOD8a1Ip2M/giphy.gif)
                   * Change: #1 '👽 Add alien technology' Space invasion 👾",
                     "draft": true,
+                    "make_latest": "true",
                     "name": "",
                     "prerelease": false,
                     "tag_name": "",
@@ -571,6 +579,7 @@ describe('release-drafter', () => {
                   * Change: https://github.com/toolmantim/release-drafter-test-project/pull/2 'Add big feature' @TimonVS
                   * Change: https://github.com/toolmantim/release-drafter-test-project/pull/1 '👽 Add alien technology' @TimonVS",
                     "draft": true,
+                    "make_latest": "true",
                     "name": "",
                     "prerelease": false,
                     "tag_name": "",
@@ -615,6 +624,7 @@ describe('release-drafter', () => {
                   Object {
                     "body": "A big thanks to: @TimonVS and Ada Lovelace",
                     "draft": true,
+                    "make_latest": "true",
                     "name": "",
                     "prerelease": false,
                     "tag_name": "",
@@ -657,6 +667,7 @@ describe('release-drafter', () => {
                   Object {
                     "body": "A big thanks to: Nobody",
                     "draft": true,
+                    "make_latest": "true",
                     "name": "",
                     "prerelease": false,
                     "tag_name": "",
@@ -701,6 +712,7 @@ describe('release-drafter', () => {
                   Object {
                     "body": "A big thanks to: Ada Lovelace",
                     "draft": true,
+                    "make_latest": "true",
                     "name": "",
                     "prerelease": false,
                     "tag_name": "",
@@ -752,6 +764,7 @@ describe('release-drafter', () => {
                 * No changes
                 ",
                   "draft": true,
+                  "make_latest": "true",
                   "name": "",
                   "prerelease": false,
                   "tag_name": "",
@@ -794,6 +807,7 @@ describe('release-drafter', () => {
                   Object {
                     "body": "* No changes mmkay",
                     "draft": true,
+                    "make_latest": "true",
                     "name": "",
                     "prerelease": false,
                     "tag_name": "",
@@ -845,6 +859,7 @@ describe('release-drafter', () => {
                 * 👽 Add alien technology (#1) @TimonVS
                 ",
                   "draft": true,
+                  "make_latest": "true",
                   "name": "v3.0.0-beta",
                   "prerelease": false,
                   "tag_name": "v3.0.0-beta",
@@ -903,6 +918,7 @@ describe('release-drafter', () => {
                 **Full Changelog**: https://github.com/toolmantim/release-drafter-test-project/compare/v2.0.0...v2.0.1
                 ",
                   "draft": true,
+                  "make_latest": "true",
                   "name": "",
                   "prerelease": false,
                   "tag_name": "",
@@ -959,6 +975,7 @@ describe('release-drafter', () => {
                 * Bug fixes (#3) @TimonVS
                 ",
                   "draft": true,
+                  "make_latest": "true",
                   "name": "",
                   "prerelease": false,
                   "tag_name": "",
@@ -1015,6 +1032,7 @@ describe('release-drafter', () => {
                 * Update dependencies (#4) @TimonVS
                 ",
                   "draft": true,
+                  "make_latest": "true",
                   "name": "",
                   "prerelease": false,
                   "tag_name": "",
@@ -1069,6 +1087,7 @@ describe('release-drafter', () => {
                 * Bug fixes (#3) @TimonVS
                 ",
                   "draft": true,
+                  "make_latest": "true",
                   "name": "",
                   "prerelease": false,
                   "tag_name": "",
@@ -1123,6 +1142,7 @@ describe('release-drafter', () => {
                 * Bug fixes (#20) @jetersen
                 ",
                   "draft": true,
+                  "make_latest": "true",
                   "name": "",
                   "prerelease": false,
                   "tag_name": "",
@@ -1181,6 +1201,7 @@ describe('release-drafter', () => {
                 * Bug fixes (#20) @jetersen
                 ",
                   "draft": true,
+                  "make_latest": "true",
                   "name": "",
                   "prerelease": false,
                   "tag_name": "",
@@ -1236,6 +1257,7 @@ describe('release-drafter', () => {
                 </details>
                 ",
                   "draft": true,
+                  "make_latest": "true",
                   "name": "",
                   "prerelease": false,
                   "tag_name": "",
@@ -1286,6 +1308,7 @@ describe('release-drafter', () => {
                 * 👽 Add alien technology (#1) @TimonVS
                 ",
                   "draft": true,
+                  "make_latest": "true",
                   "name": "v1.5.0",
                   "prerelease": false,
                   "tag_name": "v1.5.0",
@@ -1341,6 +1364,7 @@ describe('release-drafter', () => {
                 * Bug fixes (#3) @TimonVS
                 ",
                   "draft": true,
+                  "make_latest": "true",
                   "name": "",
                   "prerelease": false,
                   "tag_name": "",
@@ -1390,6 +1414,7 @@ describe('release-drafter', () => {
                 * 👽 Add alien technology (#1) @TimonVS
                 ",
                   "draft": true,
+                  "make_latest": "true",
                   "name": "",
                   "prerelease": false,
                   "tag_name": "",
@@ -1433,6 +1458,7 @@ describe('release-drafter', () => {
                 Object {
                   "body": "Placeholder with example. Automatically calculated values are next major=3.0.0 (major=3, minor=0, patch=0), minor=2.1.0 (major=2, minor=1, patch=0), patch=2.0.1 (major=2, minor=0, patch=1)",
                   "draft": true,
+                  "make_latest": "true",
                   "name": "v2.0.1 (Code name: Placeholder)",
                   "prerelease": false,
                   "tag_name": "v2.0.1",
@@ -1474,6 +1500,7 @@ describe('release-drafter', () => {
                 Object {
                   "body": "Placeholder with example. Automatically calculated values are next major=3.0 (major=3, minor=0, patch=0), minor=2.1 (major=2, minor=1, patch=0), patch=2.0 (major=2, minor=0, patch=1)",
                   "draft": true,
+                  "make_latest": "true",
                   "name": "v2.1 (Code name: Placeholder)",
                   "prerelease": false,
                   "tag_name": "v2.1",
@@ -1515,6 +1542,7 @@ describe('release-drafter', () => {
                 Object {
                   "body": "Placeholder with example. Automatically calculated values are next major=3 (major=3, minor=0, patch=0), minor=2 (major=2, minor=1, patch=0), patch=2 (major=2, minor=0, patch=1)",
                   "draft": true,
+                  "make_latest": "true",
                   "name": "v3 (Code name: Placeholder)",
                   "prerelease": false,
                   "tag_name": "v3",
@@ -1560,6 +1588,7 @@ describe('release-drafter', () => {
                 This is the template in the middle
                 ",
                   "draft": true,
+                  "make_latest": "true",
                   "name": "",
                   "prerelease": false,
                   "tag_name": "",
@@ -1602,6 +1631,7 @@ describe('release-drafter', () => {
                 This is at bottom
                 ",
                   "draft": true,
+                  "make_latest": "true",
                   "name": "",
                   "prerelease": false,
                   "tag_name": "",
@@ -1645,6 +1675,7 @@ describe('release-drafter', () => {
                 This is at bottom
                 ",
                   "draft": true,
+                  "make_latest": "true",
                   "name": "",
                   "prerelease": false,
                   "tag_name": "",
@@ -1687,6 +1718,7 @@ describe('release-drafter', () => {
                 Object {
                   "body": "This is at topThis is the template in the middleThis is at bottom",
                   "draft": true,
+                  "make_latest": "true",
                   "name": "",
                   "prerelease": false,
                   "tag_name": "",
@@ -1733,6 +1765,7 @@ describe('release-drafter', () => {
                   "body": "I AM AWESOME_mockenv_strips_newline_and_trailing_spaces_This is the template in the middle
                 ",
                   "draft": true,
+                  "make_latest": "true",
                   "name": "",
                   "prerelease": false,
                   "tag_name": "",
@@ -1787,6 +1820,7 @@ describe('release-drafter', () => {
                   * 👽 Add alien technology (#1) @TimonVS
                   ",
                     "draft": true,
+                    "make_latest": "true",
                     "name": "",
                     "prerelease": false,
                     "tag_name": "",
@@ -1840,6 +1874,7 @@ describe('release-drafter', () => {
                   * 👽 Add alien technology (#6) @TimonVS
                   ",
                     "draft": true,
+                    "make_latest": "true",
                     "name": "",
                     "prerelease": false,
                     "tag_name": "",
@@ -1893,6 +1928,7 @@ describe('release-drafter', () => {
                   * 👽 Add alien technology (#11) @TimonVS
                   ",
                     "draft": true,
+                    "make_latest": "true",
                     "name": "",
                     "prerelease": false,
                     "tag_name": "",
@@ -1943,6 +1979,7 @@ describe('release-drafter', () => {
                   * Add big feature (#12) @TimonVS
                   ",
                     "draft": true,
+                    "make_latest": "true",
                     "name": "",
                     "prerelease": false,
                     "tag_name": "",
@@ -1995,6 +2032,7 @@ describe('release-drafter', () => {
                   * Update dependencies (#4) @TimonVS
                   ",
                     "draft": true,
+                    "make_latest": "true",
                     "name": "",
                     "prerelease": false,
                     "tag_name": "",
@@ -2062,6 +2100,7 @@ describe('release-drafter', () => {
                 * Create new-feature.md (#1) @toolmantim
                 ",
                   "draft": true,
+                  "make_latest": "true",
                   "name": "",
                   "prerelease": false,
                   "tag_name": "",
@@ -2115,6 +2154,7 @@ describe('release-drafter', () => {
                 * 👽 Add alien technology (#1) @TimonVS
                 ",
                   "draft": true,
+                  "make_latest": "true",
                   "name": "",
                   "prerelease": false,
                   "tag_name": "",
@@ -2184,6 +2224,7 @@ describe('release-drafter', () => {
               * 1️⃣ Switch to a monorepo (#9) @toolmantim
               ",
                 "draft": true,
+                "make_latest": "true",
                 "name": "",
                 "prerelease": false,
                 "tag_name": "",
@@ -2252,6 +2293,7 @@ describe('release-drafter', () => {
               * Added great distance (#16) @toolmantim
               ",
                 "draft": true,
+                "make_latest": "true",
                 "name": "",
                 "prerelease": false,
                 "tag_name": "",
@@ -2308,6 +2350,7 @@ describe('release-drafter', () => {
               * 👽 Add alien technology (#1) @TimonVS
               ",
                 "draft": true,
+                "make_latest": "true",
                 "name": "v$INPUT_VERSION (Code name: Placeholder)",
                 "prerelease": false,
                 "tag_name": "v$INPUT_VERSION",
@@ -2358,6 +2401,7 @@ describe('release-drafter', () => {
               * Add documentation (#5) @TimonVS
               ",
                 "draft": true,
+                "make_latest": "true",
                 "name": "v$INPUT_VERSION (Code name: Placeholder)",
                 "prerelease": false,
                 "tag_name": "v$INPUT_VERSION",
@@ -2456,6 +2500,7 @@ describe('release-drafter', () => {
                 "body": "# There's new stuff!
               ",
                 "draft": true,
+                "make_latest": "true",
                 "name": "",
                 "prerelease": false,
                 "tag_name": "",
@@ -2803,6 +2848,7 @@ describe('release-drafter', () => {
 
                 ",
                   "draft": true,
+                  "make_latest": "true",
                   "name": "v1.0.2 🌈",
                   "prerelease": false,
                   "tag_name": "v1.0.2",
@@ -2859,6 +2905,7 @@ describe('release-drafter', () => {
                 v2.0.0
                 ",
                   "draft": true,
+                  "make_latest": "true",
                   "name": "v1.0.2 🌈",
                   "prerelease": false,
                   "tag_name": "v1.0.2",
@@ -2913,6 +2960,7 @@ describe('release-drafter', () => {
 
                 ",
                   "draft": true,
+                  "make_latest": "true",
                   "name": "v0.1.0 🌈",
                   "prerelease": false,
                   "tag_name": "v0.1.0",
@@ -2965,6 +3013,7 @@ describe('release-drafter', () => {
                 v2.0.0
                 ",
                   "draft": true,
+                  "make_latest": "true",
                   "name": "v2.0.1 🌈",
                   "prerelease": false,
                   "tag_name": "v2.0.1",
@@ -3017,6 +3066,7 @@ describe('release-drafter', () => {
                 static-tag-prefix-v2.1.4-RC3
                 ",
                   "draft": true,
+                  "make_latest": "true",
                   "name": "static-tag-prefix-v2.1.4 🌈",
                   "prerelease": false,
                   "tag_name": "static-tag-prefix-v2.1.4",
@@ -3061,6 +3111,7 @@ describe('release-drafter', () => {
                 Object {
                   "body": "dummy",
                   "draft": true,
+                  "make_latest": "true",
                   "name": "v2.1.0",
                   "prerelease": false,
                   "tag_name": "v2.1.0",
@@ -3102,6 +3153,7 @@ describe('release-drafter', () => {
                 Object {
                   "body": "dummy",
                   "draft": true,
+                  "make_latest": "true",
                   "name": "v2.0.1",
                   "prerelease": false,
                   "tag_name": "v2.0.1",
@@ -3143,6 +3195,7 @@ describe('release-drafter', () => {
                 Object {
                   "body": "dummy",
                   "draft": true,
+                  "make_latest": "true",
                   "name": "v2.1.0",
                   "prerelease": false,
                   "tag_name": "v2.1.0",
@@ -3184,6 +3237,7 @@ describe('release-drafter', () => {
                 Object {
                   "body": "dummy",
                   "draft": true,
+                  "make_latest": "true",
                   "name": "v3.0.0",
                   "prerelease": false,
                   "tag_name": "v3.0.0",
@@ -3226,6 +3280,7 @@ describe('release-drafter', () => {
                 Object {
                   "body": "dummy",
                   "draft": true,
+                  "make_latest": "true",
                   "name": "v3.0.0",
                   "prerelease": false,
                   "tag_name": "v3.0.0",
@@ -3270,6 +3325,7 @@ describe('release-drafter', () => {
                 Object {
                   "body": "dummy",
                   "draft": true,
+                  "make_latest": "true",
                   "name": "",
                   "prerelease": false,
                   "tag_name": "",