Skip to content

Commit

Permalink
Merge pull request #505 from FabioPinheiro/master
Browse files Browse the repository at this point in the history
Add flag max-buffer-size
  • Loading branch information
alejandrohdezma committed Jul 19, 2023
2 parents fe5e879 + bd63196 commit e8a85e9
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 0 deletions.
6 changes: 6 additions & 0 deletions README.md
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
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
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
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
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

0 comments on commit e8a85e9

Please sign in to comment.