diff --git a/.all-contributorsrc b/.all-contributorsrc index 0f0388652..a3c401512 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -860,6 +860,25 @@ "test", "code" ] + }, + { + "login": "UpstartMPotnick", + "name": "Mark Potnick", + "avatar_url": "https://avatars.githubusercontent.com/u/105386012?v=4", + "profile": "https://github.com/UpstartMPotnick", + "contributions": [ + "test", + "code" + ] + }, + { + "login": "MichaelRyanWebber", + "name": "MichaelRyanWebber", + "avatar_url": "https://avatars.githubusercontent.com/u/7769437?v=4", + "profile": "https://github.com/MichaelRyanWebber", + "contributions": [ + "code" + ] } ], "commitConvention": "none" diff --git a/CHANGELOG.md b/CHANGELOG.md index 93686aac4..48f59e503 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,68 @@ +# v11.1.6 (Thu Apr 04 2024) + +#### ⚠️ Pushed to `main` + +- `@auto-it/slack` + - improve long slack message chunking by chunking at newlines ([@hipstersmoothie](https://github.com/hipstersmoothie)) + +#### Authors: 1 + +- Andrew Lisowski ([@hipstersmoothie](https://github.com/hipstersmoothie)) + +--- + +# v11.1.5 (Thu Apr 04 2024) + +#### 🐛 Bug Fix + +- `@auto-it/slack` + - fix chunking large changelogs [#2453](https://github.com/intuit/auto/pull/2453) ([@hipstersmoothie](https://github.com/hipstersmoothie)) + +#### Authors: 1 + +- Andrew Lisowski ([@hipstersmoothie](https://github.com/hipstersmoothie)) + +--- + +# v11.1.4 (Thu Apr 04 2024) + +#### 🐛 Bug Fix + +- `@auto-it/upload-assets` + - Fix uploading conflicting canary assets [#2451](https://github.com/intuit/auto/pull/2451) ([@hipstersmoothie](https://github.com/hipstersmoothie)) + +#### Authors: 1 + +- Andrew Lisowski ([@hipstersmoothie](https://github.com/hipstersmoothie)) + +--- + +# v11.1.3 (Wed Apr 03 2024) + +#### 🐛 Bug Fix + +- `@auto-it/core` + - Fix rare issue with canary id from git sha [#2448](https://github.com/intuit/auto/pull/2448) ([@MichaelRyanWebber](https://github.com/MichaelRyanWebber)) + +#### Authors: 1 + +- [@MichaelRyanWebber](https://github.com/MichaelRyanWebber) + +--- + +# v11.1.2 (Wed Mar 20 2024) + +#### 🐛 Bug Fix + +- `@auto-it/npm` + - fix: remove extra quotes surrounding commitMessage [#2445](https://github.com/intuit/auto/pull/2445) ([@UpstartMPotnick](https://github.com/UpstartMPotnick)) + +#### Authors: 1 + +- Mark Potnick ([@UpstartMPotnick](https://github.com/UpstartMPotnick)) + +--- + # v11.1.1 (Sat Feb 24 2024) #### 🐛 Bug Fix diff --git a/Formula/auto.rb b/Formula/auto.rb index 6eed514ca..a093fb727 100644 --- a/Formula/auto.rb +++ b/Formula/auto.rb @@ -1,9 +1,9 @@ class Auto < Formula desc "Generate releases based on semantic version labels on pull requests." homepage "https://intuit.github.io/auto" - url "https://github.com/intuit/auto/releases/download/v11.1.1/auto-macos.gz" - version "v11.1.1" - sha256 "e414e30408176d8b0b10de3b33283ac4680e5c6c62de49ebc97c68b541161724" + url "https://github.com/intuit/auto/releases/download/v11.1.6/auto-macos.gz" + version "v11.1.6" + sha256 "bd28829b13a3f5e62610e400b64f68546dd2ebdec79d7d2da82f9323c9ead953" def install libexec.install Dir["*"] diff --git a/README.md b/README.md index cead10cec..aab1c5a69 100644 --- a/README.md +++ b/README.md @@ -319,6 +319,8 @@ Thanks goes to these wonderful people ([emoji key](https://github.com/kentcdodds
Jack Westbrook

📖 ⚠️ 💻
Atte Huhtakangas

📖 ⚠️ 💻
Patrick Ruhkopf

⚠️ 💻 +
Mark Potnick

⚠️ 💻 +
MichaelRyanWebber

💻 @@ -327,7 +329,7 @@ Thanks goes to these wonderful people ([emoji key](https://github.com/kentcdodds -This project follows the [all-contributors](https://github.com/kentcdodds/all-contributors) specification. Contributions of any kind welcome! +This project follows the [all-contributors](https://github.com/kentcdodds/all-contributors) specification, contributions of any kind welcome! ### Adding a Contributor diff --git a/docs/pages/docs/configuration/non-npm.mdx b/docs/pages/docs/configuration/non-npm.mdx index 15ea9f25a..f9ce98987 100644 --- a/docs/pages/docs/configuration/non-npm.mdx +++ b/docs/pages/docs/configuration/non-npm.mdx @@ -11,7 +11,7 @@ Simply download the appropriate version for your operating system and make it ex ```bash # Download a platform specific version of auto -curl -vkL -o - https://github.com/intuit/auto/releases/download/v11.1.1/auto-linux.gz | gunzip > ~/auto +curl -vkL -o - https://github.com/intuit/auto/releases/download/v11.1.6/auto-linux.gz | gunzip > ~/auto # Make auto executable chmod a+x ~/auto ``` diff --git a/lerna.json b/lerna.json index a56e8f20b..68d679f1e 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "11.1.1", + "version": "11.1.6", "npmClient": "yarn", "packages": [ "packages/*", diff --git a/packages/bot-list/package.json b/packages/bot-list/package.json index 3ce86b117..e634b0b21 100644 --- a/packages/bot-list/package.json +++ b/packages/bot-list/package.json @@ -2,7 +2,7 @@ "name": "@auto-it/bot-list", "main": "dist/index.js", "description": "A list of bots for auto plugins to ignore", - "version": "11.1.1", + "version": "11.1.6", "license": "MIT", "author": { "name": "Andrew Lisowski", diff --git a/packages/cli/package.json b/packages/cli/package.json index e369a0715..ff2c3bcdd 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -4,7 +4,7 @@ "main": "dist/bin/index.js", "types": "dist/index.d.ts", "description": "CLI tools to help facilitate semantic versioning based on GitHub PR labels", - "version": "11.1.1", + "version": "11.1.6", "license": "MIT", "author": { "name": "Andrew Lisowski", diff --git a/packages/core/CHANGELOG.md b/packages/core/CHANGELOG.md index 40fdbe84b..617ed17b8 100644 --- a/packages/core/CHANGELOG.md +++ b/packages/core/CHANGELOG.md @@ -1,3 +1,21 @@ +# v11.1.3 (Wed Apr 03 2024) + +:tada: This release contains work from a new contributor! :tada: + +Thank you, null[@MichaelRyanWebber](https://github.com/MichaelRyanWebber), for all your work! + +#### 🐛 Bug Fix + +- Fix rare issue with canary id from git sha [#2448](https://github.com/intuit/auto/pull/2448) ([@MichaelRyanWebber](https://github.com/MichaelRyanWebber)) +- add comment ([@MichaelRyanWebber](https://github.com/MichaelRyanWebber)) +- In the rare case that the first 7 characters of a git sha contains only numbers and begins with 0, SemVer will reject the canaryIdentifier. In such cases, make sure we include enough of the sha to get a letter. ([@MichaelRyanWebber](https://github.com/MichaelRyanWebber)) + +#### Authors: 1 + +- [@MichaelRyanWebber](https://github.com/MichaelRyanWebber) + +--- + # v11.1.1 (Sat Feb 24 2024) :tada: This release contains work from a new contributor! :tada: diff --git a/packages/core/package.json b/packages/core/package.json index 117a887bd..be6de8be9 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@auto-it/core", - "version": "11.1.1", + "version": "11.1.6", "description": "Node API for using auto.", "main": "dist/auto.js", "license": "MIT", diff --git a/packages/core/src/auto.ts b/packages/core/src/auto.ts index b52a3905b..c7253ebca 100644 --- a/packages/core/src/auto.ts +++ b/packages/core/src/auto.ts @@ -1310,9 +1310,14 @@ export default class Auto { } if (!pr || !build) { - canaryIdentifier = `${canaryIdentifier}.${( - await this.git.getSha(true) - ).slice(0, 7)}`; + const sha = await this.git.getSha(); + // If the commit sha is a 7 digit number starting with zero + // SemVer will reject the version. Include enough of the sha + // to include at least one letter in that case. + const endIndex = /^0\d{6}/.test(sha) ? + sha.search(/[a-zA-Z]/) + 1 + : 7; + canaryIdentifier = `${canaryIdentifier}.${sha.slice(0, endIndex)}`; } canaryIdentifier = `-canary${canaryIdentifier}`; diff --git a/packages/package-json-utils/package.json b/packages/package-json-utils/package.json index 8476a0728..653040fbd 100644 --- a/packages/package-json-utils/package.json +++ b/packages/package-json-utils/package.json @@ -3,7 +3,7 @@ "main": "dist/index.js", "types": "dist/index.d.ts", "description": "Shared utilities for parsing information from a package.json", - "version": "11.1.1", + "version": "11.1.6", "license": "MIT", "author": { "name": "Andrew Lisowski", diff --git a/plugins/all-contributors/package.json b/plugins/all-contributors/package.json index 0355f739c..494fb4f4c 100644 --- a/plugins/all-contributors/package.json +++ b/plugins/all-contributors/package.json @@ -1,6 +1,6 @@ { "name": "@auto-it/all-contributors", - "version": "11.1.1", + "version": "11.1.6", "main": "dist/index.js", "description": "Automatically add contributors as changelogs are produced.", "license": "MIT", diff --git a/plugins/brew/package.json b/plugins/brew/package.json index dbcde23ec..8701bdeaf 100644 --- a/plugins/brew/package.json +++ b/plugins/brew/package.json @@ -1,6 +1,6 @@ { "name": "@auto-it/brew", - "version": "11.1.1", + "version": "11.1.6", "main": "dist/index.js", "description": "Automate the creation of Homebrew formulae.", "license": "MIT", diff --git a/plugins/chrome/package.json b/plugins/chrome/package.json index ad15c94df..631d9f13e 100644 --- a/plugins/chrome/package.json +++ b/plugins/chrome/package.json @@ -1,6 +1,6 @@ { "name": "@auto-it/chrome", - "version": "11.1.1", + "version": "11.1.6", "main": "dist/index.js", "description": "Chrome publishing plugin for auto", "license": "MIT", diff --git a/plugins/cocoapods/package.json b/plugins/cocoapods/package.json index 6ab563987..bdd9d1e52 100644 --- a/plugins/cocoapods/package.json +++ b/plugins/cocoapods/package.json @@ -1,6 +1,6 @@ { "name": "@auto-it/cocoapods", - "version": "11.1.1", + "version": "11.1.6", "main": "dist/index.js", "description": "Use auto to version your cocoapod", "license": "MIT", diff --git a/plugins/conventional-commits/package.json b/plugins/conventional-commits/package.json index e3dd4907a..25c8002e5 100644 --- a/plugins/conventional-commits/package.json +++ b/plugins/conventional-commits/package.json @@ -1,6 +1,6 @@ { "name": "@auto-it/conventional-commits", - "version": "11.1.1", + "version": "11.1.6", "main": "dist/index.js", "description": "Conventional commit plugin for auto", "license": "MIT", diff --git a/plugins/crates/package.json b/plugins/crates/package.json index 13bd79668..f6990fc21 100644 --- a/plugins/crates/package.json +++ b/plugins/crates/package.json @@ -1,6 +1,6 @@ { "name": "@auto-it/crates", - "version": "11.1.1", + "version": "11.1.6", "main": "dist/index.js", "description": "Deploy Rust crates to crates.io", "license": "MIT", diff --git a/plugins/docker/package.json b/plugins/docker/package.json index e0a0da463..63805d5ad 100644 --- a/plugins/docker/package.json +++ b/plugins/docker/package.json @@ -1,6 +1,6 @@ { "name": "@auto-it/docker", - "version": "11.1.1", + "version": "11.1.6", "main": "dist/index.js", "description": "Facilitates publishing built images to a Docker Registry.", "license": "MIT", diff --git a/plugins/exec/package.json b/plugins/exec/package.json index 1dd4f14cd..aa2343867 100644 --- a/plugins/exec/package.json +++ b/plugins/exec/package.json @@ -1,6 +1,6 @@ { "name": "@auto-it/exec", - "version": "11.1.1", + "version": "11.1.6", "main": "dist/index.js", "description": "Tap into select hooks and run a command on the terminal", "license": "MIT", diff --git a/plugins/first-time-contributor/package.json b/plugins/first-time-contributor/package.json index 3db76594c..67cca1e9e 100644 --- a/plugins/first-time-contributor/package.json +++ b/plugins/first-time-contributor/package.json @@ -1,6 +1,6 @@ { "name": "@auto-it/first-time-contributor", - "version": "11.1.1", + "version": "11.1.6", "main": "dist/index.js", "description": "Thank first time contributors for their work right in your release notes.", "license": "MIT", diff --git a/plugins/gem/package.json b/plugins/gem/package.json index 92603e453..50dcbe106 100644 --- a/plugins/gem/package.json +++ b/plugins/gem/package.json @@ -1,6 +1,6 @@ { "name": "@auto-it/gem", - "version": "11.1.1", + "version": "11.1.6", "main": "dist/index.js", "description": "", "license": "MIT", diff --git a/plugins/gh-pages/package.json b/plugins/gh-pages/package.json index ac2601047..bb8ae921e 100644 --- a/plugins/gh-pages/package.json +++ b/plugins/gh-pages/package.json @@ -1,6 +1,6 @@ { "name": "@auto-it/gh-pages", - "version": "11.1.1", + "version": "11.1.6", "main": "dist/index.js", "description": "Automate publishing to your gh-pages documentation website", "license": "MIT", diff --git a/plugins/git-tag/package.json b/plugins/git-tag/package.json index 1e936bbd4..2d16601c7 100644 --- a/plugins/git-tag/package.json +++ b/plugins/git-tag/package.json @@ -1,6 +1,6 @@ { "name": "@auto-it/git-tag", - "version": "11.1.1", + "version": "11.1.6", "main": "dist/index.js", "description": "Manage your projects version through just a git tag", "license": "MIT", diff --git a/plugins/gradle/package.json b/plugins/gradle/package.json index b498ac0b6..f729decbb 100644 --- a/plugins/gradle/package.json +++ b/plugins/gradle/package.json @@ -1,6 +1,6 @@ { "name": "@auto-it/gradle", - "version": "11.1.1", + "version": "11.1.6", "main": "dist/index.js", "description": "A plugin that calls gradle-release-plugin with versioning information.", "license": "MIT", diff --git a/plugins/jira/package.json b/plugins/jira/package.json index a2ce3f356..aa7d2ceb3 100644 --- a/plugins/jira/package.json +++ b/plugins/jira/package.json @@ -1,6 +1,6 @@ { "name": "@auto-it/jira", - "version": "11.1.1", + "version": "11.1.6", "main": "dist/index.js", "description": "Jira plugin for auto", "license": "MIT", diff --git a/plugins/magic-zero/package.json b/plugins/magic-zero/package.json index 057b233cf..f36896318 100644 --- a/plugins/magic-zero/package.json +++ b/plugins/magic-zero/package.json @@ -1,6 +1,6 @@ { "name": "@auto-it/magic-zero", - "version": "11.1.1", + "version": "11.1.6", "main": "dist/index.js", "description": "A plugin that closely adheres to semver versioning for 0.0.x and 0.x.y releases", "license": "MIT", diff --git a/plugins/maven/package.json b/plugins/maven/package.json index cc353d4d3..88afb02fc 100644 --- a/plugins/maven/package.json +++ b/plugins/maven/package.json @@ -1,6 +1,6 @@ { "name": "@auto-it/maven", - "version": "11.1.1", + "version": "11.1.6", "main": "dist/index.js", "description": "Maven publishing plugin for auto", "license": "MIT", diff --git a/plugins/microsoft-teams/package.json b/plugins/microsoft-teams/package.json index f3f849cbb..514e99e50 100644 --- a/plugins/microsoft-teams/package.json +++ b/plugins/microsoft-teams/package.json @@ -1,6 +1,6 @@ { "name": "@auto-it/microsoft-teams", - "version": "11.1.1", + "version": "11.1.6", "main": "dist/index.js", "description": "Microsoft Teams plugin for auto", "license": "MIT", diff --git a/plugins/npm/CHANGELOG.md b/plugins/npm/CHANGELOG.md index 9034ea894..bb082bd6c 100644 --- a/plugins/npm/CHANGELOG.md +++ b/plugins/npm/CHANGELOG.md @@ -1,3 +1,21 @@ +# v11.1.2 (Wed Mar 20 2024) + +:tada: This release contains work from a new contributor! :tada: + +Thank you, Mark Potnick ([@UpstartMPotnick](https://github.com/UpstartMPotnick)), for all your work! + +#### 🐛 Bug Fix + +- fix: remove extra quotes surrounding commitMessage [#2445](https://github.com/intuit/auto/pull/2445) ([@UpstartMPotnick](https://github.com/UpstartMPotnick)) +- test: update test ([@UpstartMPotnick](https://github.com/UpstartMPotnick)) +- fix: remove extra quotes surrounding commitMessage ([@UpstartMPotnick](https://github.com/UpstartMPotnick)) + +#### Authors: 1 + +- Mark Potnick ([@UpstartMPotnick](https://github.com/UpstartMPotnick)) + +--- + # v11.1.0 (Fri Feb 23 2024) #### 🚀 Enhancement diff --git a/plugins/npm/__tests__/npm.test.ts b/plugins/npm/__tests__/npm.test.ts index 162eee718..15cd5a3b5 100644 --- a/plugins/npm/__tests__/npm.test.ts +++ b/plugins/npm/__tests__/npm.test.ts @@ -616,7 +616,7 @@ describe("publish", () => { "--yes", "--no-push", "-m", - "'\"Bump version to: %s [skip ci]\"'", + "\"Bump version to: %s [skip ci]\"", false, ]); }); @@ -645,7 +645,7 @@ describe("publish", () => { "--yes", "--no-push", "-m", - "'\"Bump version to: %s [skip ci]\"'", + "\"Bump version to: %s [skip ci]\"", false, ]); }); @@ -674,7 +674,7 @@ describe("publish", () => { "--yes", "--no-push", "-m", - "'\"Bump version to: %s [skip ci]\"'", + "\"Bump version to: %s [skip ci]\"", "--exact", ]); @@ -881,7 +881,7 @@ describe("publish", () => { "--yes", "--no-push", "-m", - "'\"Bump version to: %s [skip ci]\"'", + "\"Bump version to: %s [skip ci]\"", false, ]); }); @@ -924,7 +924,7 @@ describe("publish", () => { "--yes", "--no-push", "-m", - "'\"[skip ci] Custom version commit message\"'", + "\"[skip ci] Custom version commit message\"", false, ]); }); @@ -967,7 +967,7 @@ describe("publish", () => { "--yes", "--no-push", "-m", - "'\"Custom version commit message [skip ci]\"'", + "\"Custom version commit message [skip ci]\"", false, ]); }); @@ -1529,7 +1529,7 @@ describe("canary", () => { "--yes", "--no-push", "-m", - `'"Bump independent versions [skip ci]"'`, + "\"Bump independent versions [skip ci]\"", false, ]); }); diff --git a/plugins/npm/package.json b/plugins/npm/package.json index eac3953e1..a2c526857 100644 --- a/plugins/npm/package.json +++ b/plugins/npm/package.json @@ -1,6 +1,6 @@ { "name": "@auto-it/npm", - "version": "11.1.1", + "version": "11.1.6", "main": "dist/index.js", "description": "NPM publishing plugin for auto", "license": "MIT", diff --git a/plugins/npm/src/index.ts b/plugins/npm/src/index.ts index 8c7a95d26..92740e469 100644 --- a/plugins/npm/src/index.ts +++ b/plugins/npm/src/index.ts @@ -1034,7 +1034,7 @@ export default class NPMPlugin implements IPlugin { "--yes", "--no-push", "-m", - `'"${commitMessage}"'`, + `"${commitMessage}"`, this.exact && "--exact", ...verboseArgs, ]); diff --git a/plugins/omit-commits/package.json b/plugins/omit-commits/package.json index d18e1ca65..2ea77fe42 100644 --- a/plugins/omit-commits/package.json +++ b/plugins/omit-commits/package.json @@ -1,6 +1,6 @@ { "name": "@auto-it/omit-commits", - "version": "11.1.1", + "version": "11.1.6", "main": "dist/index.js", "description": "Omit commits plugin for auto", "license": "MIT", diff --git a/plugins/omit-release-notes/package.json b/plugins/omit-release-notes/package.json index 22b25f41a..86dc7f52b 100644 --- a/plugins/omit-release-notes/package.json +++ b/plugins/omit-release-notes/package.json @@ -1,6 +1,6 @@ { "name": "@auto-it/omit-release-notes", - "version": "11.1.1", + "version": "11.1.6", "main": "dist/index.js", "description": "Omit release notes plugin for auto", "license": "MIT", diff --git a/plugins/pr-body-labels/package.json b/plugins/pr-body-labels/package.json index ab64b955d..cddf0365e 100644 --- a/plugins/pr-body-labels/package.json +++ b/plugins/pr-body-labels/package.json @@ -1,6 +1,6 @@ { "name": "@auto-it/pr-body-labels", - "version": "11.1.1", + "version": "11.1.6", "main": "dist/index.js", "description": "Allow outside contributors to indicate what semver label should be applied to the Pull Request", "license": "MIT", diff --git a/plugins/protected-branch/package.json b/plugins/protected-branch/package.json index 96bc42e3a..106c5f270 100644 --- a/plugins/protected-branch/package.json +++ b/plugins/protected-branch/package.json @@ -1,6 +1,6 @@ { "name": "@auto-it/protected-branch", - "version": "11.1.1", + "version": "11.1.6", "main": "dist/index.js", "description": "Handle Github branch protections", "license": "MIT", diff --git a/plugins/released/package.json b/plugins/released/package.json index 5a25a9250..9cb528771 100644 --- a/plugins/released/package.json +++ b/plugins/released/package.json @@ -1,6 +1,6 @@ { "name": "@auto-it/released", - "version": "11.1.1", + "version": "11.1.6", "main": "dist/index.js", "description": "Released plugin for auto. Comments with version + extra", "license": "MIT", diff --git a/plugins/s3/package.json b/plugins/s3/package.json index ad0c09b7a..310f575cd 100644 --- a/plugins/s3/package.json +++ b/plugins/s3/package.json @@ -1,6 +1,6 @@ { "name": "@auto-it/s3", - "version": "11.1.1", + "version": "11.1.6", "main": "dist/index.js", "description": "Post your built artifacts to s3", "license": "MIT", diff --git a/plugins/sbt/package.json b/plugins/sbt/package.json index 61244b105..ce82f7389 100644 --- a/plugins/sbt/package.json +++ b/plugins/sbt/package.json @@ -1,6 +1,6 @@ { "name": "@auto-it/sbt", - "version": "11.1.1", + "version": "11.1.6", "main": "dist/index.js", "description": "Publish Scala projects with sbt", "license": "MIT", diff --git a/plugins/slack/CHANGELOG.md b/plugins/slack/CHANGELOG.md index f88aac058..2615da722 100644 --- a/plugins/slack/CHANGELOG.md +++ b/plugins/slack/CHANGELOG.md @@ -1,3 +1,28 @@ +# v11.1.6 (Thu Apr 04 2024) + +#### ⚠️ Pushed to `main` + +- improve long slack message chunking by chunking at newlines ([@hipstersmoothie](https://github.com/hipstersmoothie)) + +#### Authors: 1 + +- Andrew Lisowski ([@hipstersmoothie](https://github.com/hipstersmoothie)) + +--- + +# v11.1.5 (Thu Apr 04 2024) + +#### 🐛 Bug Fix + +- fix chunking large changelogs [#2453](https://github.com/intuit/auto/pull/2453) ([@hipstersmoothie](https://github.com/hipstersmoothie)) +- fix chunking large changelogs ([@hipstersmoothie](https://github.com/hipstersmoothie)) + +#### Authors: 1 + +- Andrew Lisowski ([@hipstersmoothie](https://github.com/hipstersmoothie)) + +--- + # v11.1.0 (Fri Feb 23 2024) #### 🚀 Enhancement diff --git a/plugins/slack/package.json b/plugins/slack/package.json index 7d80fd021..0a56f3234 100644 --- a/plugins/slack/package.json +++ b/plugins/slack/package.json @@ -1,6 +1,6 @@ { "name": "@auto-it/slack", - "version": "11.1.1", + "version": "11.1.6", "main": "dist/index.js", "description": "Slack plugin for auto", "license": "MIT", diff --git a/plugins/slack/src/index.ts b/plugins/slack/src/index.ts index 859036aa4..5d41d2240 100644 --- a/plugins/slack/src/index.ts +++ b/plugins/slack/src/index.ts @@ -92,13 +92,15 @@ const CHANGELOG_LINE = /^\s*•/; type Messages = [Block[], ...Array]; /** Split a long spring into chunks by character limit */ -const splitCharacterLimit = (line: string, charLimit: number) => { +const splitCharacterLimitAtNewline = (line: string, charLimit: number) => { const splitLines = []; let buffer = line; while (buffer) { - splitLines.push(buffer.slice(0, charLimit)); - buffer = buffer.slice(charLimit); + // get the \n closest to the char limit + const newlineIndex = buffer.lastIndexOf("\n", charLimit) || charLimit; + splitLines.push(buffer.slice(0, newlineIndex)); + buffer = buffer.slice(newlineIndex); } return splitLines; @@ -171,8 +173,8 @@ export function convertToBlocks( const fullSection = lines.join("\n"); - if (line.length > 3000) { - const splitLines = splitCharacterLimit(line, 3000); + if (fullSection.length > 3000) { + const splitLines = splitCharacterLimitAtNewline(fullSection, 3000); splitLines.forEach((splitLine) => { currentMessage.push(createSectionBlock(splitLine)); @@ -183,7 +185,7 @@ export function convertToBlocks( currentMessage.push(createSpacerBlock()); } else if (line.length > 3000) { - const splitLines = splitCharacterLimit(line, 3000); + const splitLines = splitCharacterLimitAtNewline(line, 3000); splitLines.forEach((splitLine) => { currentMessage.push(createSectionBlock(splitLine)); diff --git a/plugins/twitter/package.json b/plugins/twitter/package.json index 1630d86a3..f8d87c5ae 100644 --- a/plugins/twitter/package.json +++ b/plugins/twitter/package.json @@ -1,6 +1,6 @@ { "name": "@auto-it/twitter", - "version": "11.1.1", + "version": "11.1.6", "main": "dist/index.js", "description": "Twitter plugin for auto", "license": "MIT", diff --git a/plugins/upload-assets/CHANGELOG.md b/plugins/upload-assets/CHANGELOG.md index 36677d0c6..61bfd2050 100644 --- a/plugins/upload-assets/CHANGELOG.md +++ b/plugins/upload-assets/CHANGELOG.md @@ -1,3 +1,16 @@ +# v11.1.4 (Thu Apr 04 2024) + +#### 🐛 Bug Fix + +- Fix uploading conflicting canary assets [#2451](https://github.com/intuit/auto/pull/2451) ([@hipstersmoothie](https://github.com/hipstersmoothie)) +- fix uploading assets with the same name ([@hipstersmoothie](https://github.com/hipstersmoothie)) + +#### Authors: 1 + +- Andrew Lisowski ([@hipstersmoothie](https://github.com/hipstersmoothie)) + +--- + # v11.1.0 (Fri Feb 23 2024) #### 🚀 Enhancement diff --git a/plugins/upload-assets/package.json b/plugins/upload-assets/package.json index 84eccc714..2ec13f346 100644 --- a/plugins/upload-assets/package.json +++ b/plugins/upload-assets/package.json @@ -1,6 +1,6 @@ { "name": "@auto-it/upload-assets", - "version": "11.1.1", + "version": "11.1.6", "main": "dist/index.js", "description": "Upload assets plugin for auto", "license": "MIT", diff --git a/plugins/upload-assets/src/index.ts b/plugins/upload-assets/src/index.ts index 4bc0b3d21..f25fb01c0 100644 --- a/plugins/upload-assets/src/index.ts +++ b/plugins/upload-assets/src/index.ts @@ -149,6 +149,7 @@ export default class UploadAssetsPlugin implements IPlugin { dryRun = false, id?: string ) { + const releases = Array.isArray(release) ? release : [release]; const assets = await glob(this.options.assets); auto.logger.log.info(endent` @@ -162,18 +163,14 @@ export default class UploadAssetsPlugin implements IPlugin { return []; } - const responses = await Promise.all( + const assetUploadRequests = await Promise.all( assets.map(async (asset) => { - if (!auto.git) { - return; - } - const file = await readFile(asset); const stats = await stat(asset); const type = await FileType.fromBuffer(file); const DEFAULT_BASE_URL = "https://api.github.com"; - const baseUrl = auto.git.options.baseUrl || DEFAULT_BASE_URL; + const baseUrl = auto.git!.options.baseUrl || DEFAULT_BASE_URL; const fileName = path.basename(asset); const extension = path.extname(fileName); const options: RestEndpointMethodTypes["repos"]["uploadReleaseAsset"]["parameters"] = { @@ -185,8 +182,8 @@ export default class UploadAssetsPlugin implements IPlugin { ? fileName.replace(extension, `-${id}${extension}`) : `${fileName}-${id}` : fileName, - owner: auto.git.options.owner, - repo: auto.git.options.repo, + owner: auto.git!.options.owner, + repo: auto.git!.options.repo, headers: { "content-length": stats.size, "content-type": type ? type.mime : "application/octet-stream", @@ -198,34 +195,53 @@ export default class UploadAssetsPlugin implements IPlugin { options.baseUrl = `${origin}/api/uploads`; } - const assetResponses: AssetResponse[] = []; + return options; + }) + ); - // Multiple releases were made - if (Array.isArray(release)) { - await Promise.all( - release.map(async (r) => { - const { - data: releaseAsset, - } = await auto.git!.github.repos.uploadReleaseAsset({ - ...options, - release_id: r.data.id, - }); - - assetResponses.push(releaseAsset); - }) - ); - } else { - const { - data: releaseAsset, - } = await auto.git.github.repos.uploadReleaseAsset({ - ...options, + const assetNames = assetUploadRequests.map((o) => o.name); + await Promise.all( + releases.map(async (release) => { + const assetsInRelease = await auto.git!.github.paginate( + auto.git!.github.repos.listReleaseAssets, + { + owner: auto.git!.options.owner, + repo: auto.git!.options.repo, release_id: release.data.id, - }); + } + ); - assetResponses.push(releaseAsset); + for (const asset of assetsInRelease) { + if (assetNames.includes(asset.name)) { + // eslint-disable-next-line no-await-in-loop + await auto.git!.github.repos.deleteReleaseAsset({ + owner: auto.git!.options.owner, + repo: auto.git!.options.repo, + asset_id: asset.id, + }); + } } + }) + ); + + const responses = await Promise.all( + assetUploadRequests.map(async (options) => { + const assetResponses: AssetResponse[] = []; + + await Promise.all( + releases.map(async (r) => { + const { + data: releaseAsset, + } = await auto.git!.github.repos.uploadReleaseAsset({ + ...options, + release_id: r.data.id, + }); + + assetResponses.push(releaseAsset); + }) + ); - auto.logger.log.success(`Uploaded asset: ${asset}`); + auto.logger.log.success(`Uploaded asset: ${options.name}`); return assetResponses; }) ); diff --git a/plugins/version-file/package.json b/plugins/version-file/package.json index b68e71387..3574fd604 100644 --- a/plugins/version-file/package.json +++ b/plugins/version-file/package.json @@ -1,6 +1,6 @@ { "name": "@auto-it/version-file", - "version": "11.1.1", + "version": "11.1.6", "main": "dist/index.js", "description": "", "license": "MIT", diff --git a/plugins/vscode/package.json b/plugins/vscode/package.json index 693a9a696..97837965e 100644 --- a/plugins/vscode/package.json +++ b/plugins/vscode/package.json @@ -1,6 +1,6 @@ { "name": "@auto-it/vscode", - "version": "11.1.1", + "version": "11.1.6", "main": "dist/index.js", "description": "Publish an vscode extension", "license": "MIT",