Skip to content

Commit 23015a7

Browse files
Adjusted max branch name length (#345)
1 parent ee18ce1 commit 23015a7

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/github.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ async function getBranchNameFromIssue (ctx, config) {
1818
const result = await getBranchName(ctx, config, title)
1919
// For magic number below see:
2020
// https://stackoverflow.com/questions/60045157/what-is-the-maximum-length-of-a-github-branch-name
21-
const MAX_BYTES_GITHUB_BRANCH_NAME = 250
21+
const MAX_BYTES_GITHUB_BRANCH_NAME = 243
2222
if (utils.getStringLengthInBytes(result) > MAX_BYTES_GITHUB_BRANCH_NAME) {
2323
return utils.trimStringToByteLength(result, MAX_BYTES_GITHUB_BRANCH_NAME)
2424
} else {

tests/github.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ test('get branch name from issue', async () => {
4343
expect(await github.getBranchNameFromIssue(ctx, config)).toBe(
4444
'issue-12-_Error_Mysqli_statement_execute_error_Cannot_add_or_update_a_child_row_a_foreign_key_constraint_fails' +
4545
'_omeka_omeka_super_eight_festivals_filmmaker_films_CONSTRAINT_omeka_super_eight_festivals_filmmaker_films_' +
46-
'ibfk_1_FOREIGN_KEY_filmmaker_id_RE')
46+
'ibfk_1_FOREIGN_KEY_filmmake')
4747
})
4848

4949
test('get branch configuration for issue', () => {

0 commit comments

Comments
 (0)