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

Add flag max-buffer-size #505

Merged
merged 4 commits into from
Jul 19, 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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,12 @@ When it launches it will send PR to update all the repos selected in step (2.2).
# Default: 2hours
cache-ttl: ''

# Size of the buffer for the output of an external process
# in lines.
#
# Default: 16384
max-buffer-size: ''

# Url to download the coursier linux CLI from.
#
# Default: https://github.com/coursier/launchers/raw/master/cs-x86_64-pc-linux.gz
Expand Down
6 changes: 6 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@ inputs:
metadata, set it to 0s to disable it.
default: 2hours
required: false
max-buffer-size:
description: |
Size of the buffer for the output of an external process
in lines. The default is 16384.
default: "16384"
required: false
coursier-cli-url:
description: |
Url to download the coursier linux CLI from.
Expand Down
1 change: 1 addition & 0 deletions src/action/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ async function run(): Promise<void> {
arg('--sign-commits', inputs.commits.sign.enabled),
arg('--git-author-signing-key', inputs.commits.sign.key),
arg('--cache-ttl', inputs.steward.cacheTtl),
arg('--max-buffer-size', inputs.steward.maxBufferSize),
arg('--scalafix-migrations', inputs.migrations.scalafix),
arg('--artifact-migrations', inputs.migrations.artifacts),
arg('--repo-config', inputs.steward.defaultConfiguration),
Expand Down
2 changes: 2 additions & 0 deletions src/modules/input.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ test('`Input.all` → returns all inputs', t => {
.with('author-name', () => 'Alex')
.with('github-api-url', () => 'github.my-org.com')
.with('cache-ttl', () => '20m')
.with('max-buffer-size', () => '16384')
.with('timeout', () => '60s')
.with('scala-steward-version', () => '1.0')
.with('artifact-migrations', () => '.github/artifact-migrations.conf')
Expand Down Expand Up @@ -50,6 +51,7 @@ test('`Input.all` → returns all inputs', t => {
defaultConfiguration: nonEmpty('.github/defaults/.scala-steward.conf'),
repos: '- owner/repo:1.0x\n- owner/repo:2.0x',
cacheTtl: nonEmpty('20m'),
maxBufferSize: nonEmpty('16384'),
version: nonEmpty('1.0'),
timeout: nonEmpty('60s'),
ignoreOptsFiles: true,
Expand Down
1 change: 1 addition & 0 deletions src/modules/input.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ export class Input {
defaultConfiguration: this.defaultRepoConf(),
repos: this.reposFile() ?? this.githubRepository(),
cacheTtl: nonEmpty(this.inputs.getInput('cache-ttl')),
maxBufferSize: nonEmpty(this.inputs.getInput('max-buffer-size')),
version: nonEmpty(this.inputs.getInput('scala-steward-version')),
timeout: nonEmpty(this.inputs.getInput('timeout')),
ignoreOptsFiles: this.inputs.getBooleanInput('ignore-opts-files'),
Expand Down