feat: truncate short description exceeding the byte limit (#143)
Some checks failed
Publish Docker Image / publish (push) Has been cancelled
Some checks failed
Publish Docker Image / publish (push) Has been cancelled
* feat: truncate short description exceeding the byte limit * fix tests
This commit is contained in:
@@ -1,8 +1,6 @@
|
||||
import * as core from '@actions/core'
|
||||
import * as fetch from 'node-fetch'
|
||||
|
||||
const DESCRIPTION_MAX_CHARS = 100
|
||||
|
||||
export async function getToken(
|
||||
username: string,
|
||||
password: string
|
||||
@@ -36,7 +34,7 @@ export async function updateRepositoryDescription(
|
||||
full_description: fullDescription
|
||||
}
|
||||
if (description) {
|
||||
body['description'] = description.slice(0, DESCRIPTION_MAX_CHARS)
|
||||
body['description'] = description
|
||||
}
|
||||
await fetch(`https://hub.docker.com/v2/repositories/${repository}`, {
|
||||
method: 'patch',
|
||||
|
||||
Reference in New Issue
Block a user