Skip to content
Closed
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
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ Add these parameters under the `with` section of the `uses` step in the workflow
| `token` | API token for [logging into the BSR](https://buf.build/docs/bsr/authentication). | |
| `domain` | Domain for logging into the BSR, enterprise only.| `buf.build` |
| `input` | [Input](https://buf.build/docs/reference/inputs) for the `buf` command. | |
| `filter` | The [`filter`](https://buf.build/docs/reference/inputs/#git) parameter for `breaking_against` | |
| `paths` | Limit to specific files or directories (separated by newlines). | |
| `exclude_imports` | Exclude files imported by the target modules. | False |
| `exclude_paths` | Exclude specific files or directories, e.g. "proto/a/a.proto", "proto/a" (separated by newlines). | |
Expand Down
4 changes: 4 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@ inputs:
description: |-
Input for the buf command.
required: false
filter:
description: |-
Value to be passed as the `filter` option. e.g `tree:0`
required: false
paths:
description: |-
Limit to specific files or directories (separated by newlines).
Expand Down
7 changes: 7 additions & 0 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -47743,6 +47743,7 @@ function getInputs() {
paths: core.getMultilineInput("paths"),
exclude_paths: core.getMultilineInput("exclude_paths"),
exclude_imports: core.getBooleanInput("exclude_imports"),
filter: core.getInput("filter"),
// Inputs specific to buf steps.
lint: core.getBooleanInput("lint"),
format: core.getBooleanInput("format"),
Expand All @@ -47760,6 +47761,9 @@ function getInputs() {
if (inputs.input) {
inputs.breaking_against += `,subdir=${inputs.input}`;
}
if (inputs.filter) {
inputs.breaking_against += `,filter=${inputs.filter}`;
}
}
inputs.archive_labels.push(lib_github.context.ref);
}
Expand All @@ -47770,6 +47774,9 @@ function getInputs() {
if (inputs.input) {
inputs.breaking_against += `,subdir=${inputs.input}`;
}
if (inputs.filter) {
inputs.breaking_against += `,filter=${inputs.filter}`;
}
}
inputs.archive_labels.push(lib_github.context.ref);
}
Expand Down
7 changes: 7 additions & 0 deletions dist/post/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -31868,6 +31868,7 @@ function getInputs() {
paths: core.getMultilineInput("paths"),
exclude_paths: core.getMultilineInput("exclude_paths"),
exclude_imports: core.getBooleanInput("exclude_imports"),
filter: core.getInput("filter"),
// Inputs specific to buf steps.
lint: core.getBooleanInput("lint"),
format: core.getBooleanInput("format"),
Expand All @@ -31885,6 +31886,9 @@ function getInputs() {
if (inputs.input) {
inputs.breaking_against += `,subdir=${inputs.input}`;
}
if (inputs.filter) {
inputs.breaking_against += `,filter=${inputs.filter}`;
}
}
inputs.archive_labels.push(github.context.ref);
}
Expand All @@ -31895,6 +31899,9 @@ function getInputs() {
if (inputs.input) {
inputs.breaking_against += `,subdir=${inputs.input}`;
}
if (inputs.filter) {
inputs.breaking_against += `,filter=${inputs.filter}`;
}
}
inputs.archive_labels.push(github.context.ref);
}
Expand Down
8 changes: 8 additions & 0 deletions src/inputs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ export interface Inputs {
paths: string[];
exclude_paths: string[];
exclude_imports: boolean;
filter: string;

lint: boolean;
format: boolean;
Expand Down Expand Up @@ -62,6 +63,7 @@ export function getInputs(): Inputs {
paths: core.getMultilineInput("paths"),
exclude_paths: core.getMultilineInput("exclude_paths"),
exclude_imports: core.getBooleanInput("exclude_imports"),
filter: core.getInput("filter"),
// Inputs specific to buf steps.
lint: core.getBooleanInput("lint"),
format: core.getBooleanInput("format"),
Expand All @@ -79,6 +81,9 @@ export function getInputs(): Inputs {
if (inputs.input) {
inputs.breaking_against += `,subdir=${inputs.input}`;
}
if (inputs.filter) {
inputs.breaking_against += `,filter=${inputs.filter}`;
}
}
inputs.archive_labels.push(github.context.ref);
}
Expand All @@ -89,6 +94,9 @@ export function getInputs(): Inputs {
if (inputs.input) {
inputs.breaking_against += `,subdir=${inputs.input}`;
}
if (inputs.filter) {
inputs.breaking_against += `,filter=${inputs.filter}`;
}
}
inputs.archive_labels.push(github.context.ref);
}
Expand Down