Skip to content

Commit 579f64c

Browse files
authored
fix: use the truncated short description (#148)
1 parent 3f29bda commit 579f64c

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

dist/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,12 +255,13 @@ function run() {
255255
if (truncatedShortDescription.length !== inputs.shortDescription.length) {
256256
core.warning(`The short description exceeds DockerHub's limit and has been truncated to ${SHORT_DESCRIPTION_MAX_BYTES} bytes.`);
257257
}
258+
core.debug(`Truncated short description: ${truncatedShortDescription}`);
258259
// Acquire a token for the Docker Hub API
259260
core.info('Acquiring token');
260261
const token = yield dockerhubHelper.getToken(inputs.username, inputs.password);
261262
// Send a PATCH request to update the description of the repository
262263
core.info('Sending PATCH request');
263-
yield dockerhubHelper.updateRepositoryDescription(token, inputs.repository, inputs.shortDescription, readmeContent);
264+
yield dockerhubHelper.updateRepositoryDescription(token, inputs.repository, truncatedShortDescription, readmeContent);
264265
core.info('Request successful');
265266
}
266267
catch (error) {

src/main.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ async function run(): Promise<void> {
3333
`The short description exceeds DockerHub's limit and has been truncated to ${SHORT_DESCRIPTION_MAX_BYTES} bytes.`
3434
)
3535
}
36+
core.debug(`Truncated short description: ${truncatedShortDescription}`)
3637

3738
// Acquire a token for the Docker Hub API
3839
core.info('Acquiring token')
@@ -45,7 +46,7 @@ async function run(): Promise<void> {
4546
await dockerhubHelper.updateRepositoryDescription(
4647
token,
4748
inputs.repository,
48-
inputs.shortDescription,
49+
truncatedShortDescription,
4950
readmeContent
5051
)
5152
core.info('Request successful')

0 commit comments

Comments
 (0)