From 665918569a9ca34dc9552c1f9e2ceb803edf611d Mon Sep 17 00:00:00 2001 From: Mario Escobedo Date: Tue, 26 Apr 2022 16:21:30 +0200 Subject: [PATCH] Release 1.1.1 (#7) * fix: setting max length of branch correctly * chore: Bump version * chore: Update CHANGELOG --- CHANGELOG.md | 6 ++++++ src/helper.user.js | 7 ++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e2f4d48..af79834 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [1.1.1] - 2022-04-26 + +### Fixed + +- Max length of branch is now configured as 60 characters. + ## [1.1.0] - 2022-04-26 ### Improved diff --git a/src/helper.user.js b/src/helper.user.js index 00ac5f6..b125684 100644 --- a/src/helper.user.js +++ b/src/helper.user.js @@ -1,7 +1,7 @@ // ==UserScript== // @name Github helper // @namespace https://github.com/m4rii0 -// @version 1.1.0 +// @version 1.1.1 // @description Github helper to speed up your work // @author m4rii0 // @match https://github.com/* @@ -105,7 +105,6 @@ title = title .trim() .toLowerCase() - .substring(0, 60) .replaceAll(' ', '-') .replace(/[^\w\-]+/, ''); @@ -117,7 +116,9 @@ kind = kind.replace('kind/', ''); const prefix = getBranchPrefix(kind); - return `${prefix}/GH-${issueId}-${title}`; + + let branchName = `${prefix}/GH-${issueId}-${title}`; + return branchName.substring(0, 60); }