Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: use the truncated short description #148

Merged
merged 1 commit into from
Apr 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -255,12 +255,13 @@ function run() {
if (truncatedShortDescription.length !== inputs.shortDescription.length) {
core.warning(`The short description exceeds DockerHub's limit and has been truncated to ${SHORT_DESCRIPTION_MAX_BYTES} bytes.`);
}
core.debug(`Truncated short description: ${truncatedShortDescription}`);
// Acquire a token for the Docker Hub API
core.info('Acquiring token');
const token = yield dockerhubHelper.getToken(inputs.username, inputs.password);
// Send a PATCH request to update the description of the repository
core.info('Sending PATCH request');
yield dockerhubHelper.updateRepositoryDescription(token, inputs.repository, inputs.shortDescription, readmeContent);
yield dockerhubHelper.updateRepositoryDescription(token, inputs.repository, truncatedShortDescription, readmeContent);
core.info('Request successful');
}
catch (error) {
Expand Down
3 changes: 2 additions & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ async function run(): Promise<void> {
`The short description exceeds DockerHub's limit and has been truncated to ${SHORT_DESCRIPTION_MAX_BYTES} bytes.`
)
}
core.debug(`Truncated short description: ${truncatedShortDescription}`)

// Acquire a token for the Docker Hub API
core.info('Acquiring token')
Expand All @@ -45,7 +46,7 @@ async function run(): Promise<void> {
await dockerhubHelper.updateRepositoryDescription(
token,
inputs.repository,
inputs.shortDescription,
truncatedShortDescription,
readmeContent
)
core.info('Request successful')
Expand Down