Skip to content

Commit

Permalink
fix: limit size of status description to 140 char
Browse files Browse the repository at this point in the history
```ts
HttpError: Validation Failed: {"resource":"Status","code":"custom","field":"description","message":"description is too long (maximum is 140 characters)"} - https://docs.github.com/rest/commits/statuses#create-a-commit-status
    at file:///home/runner/work/_actions/sclorg/testing-farm-as-github-action/v2/node_modules/@octokit/core/node_modules/@octokit/request/dist-bundle/index.js:106:1
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at Job.doExecute (file:///home/runner/work/_actions/sclorg/testing-farm-as-github-action/v2/node_modules/bottleneck/light.js:405:1)
```
  • Loading branch information
jamacku authored and phracek committed May 23, 2024
1 parent 5e49921 commit 2c15ff2
Show file tree
Hide file tree
Showing 5 changed files with 57 additions and 3 deletions.
2 changes: 1 addition & 1 deletion dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

53 changes: 53 additions & 0 deletions dist/pull-request.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions dist/pull-request.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/pull-request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export class PullRequest {
sha: this.sha,
state,
context: `Testing Farm - ${getInput('pull_request_status_name')}`,
description,
description: description ? description.slice(0, 140) : description,
target_url: url,
}
);
Expand Down

0 comments on commit 2c15ff2

Please sign in to comment.