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

Reconfigure inputs for actions #37

Merged
merged 43 commits into from
Jul 4, 2024
Merged

Reconfigure inputs for actions #37

merged 43 commits into from
Jul 4, 2024

Conversation

emcfarlane
Copy link
Collaborator

@emcfarlane emcfarlane commented Jun 25, 2024

This PR updates the buf-action from feedback making large changes to the inputs for the action and updating the documentation to reflect those changes. Most users shouldn't see changes in behaviour as the default remain the same. Each commit mentions the affected input values. The following inputs have been changed:

  • comment: has been replaced by pr_comment
  • disable_symlinks: removed
  • breaking_against_config: removed
  • breaking_limit_to_input_files: removed
  • push_create: replaced by push_disable_create which defaults to false
  • push_create_visibility: removed, always unset with the default of private
  • push_labels: removed, covered by --git-metadata flag
  • push_git_metadata: removed, always set by default
  • push_source_control_url: removed, always set
  • archive_labels: removed, sets the ref by default

breaking_against now defaults to an empty string and is settable to override. This allows the action to use the declared input value (as presumably it's a path in the repository) and then configure the breaking_against to use that value for the subdir query param. This should avoid users having to configure the long expression value themselves.

@emcfarlane emcfarlane requested a review from nicksnyder June 25, 2024 16:33

This comment has been minimized.

Adds a table for the inputs of the action to be more discoverable in the
README. In additional some small cleanup, 'disable_symlinks' option has
been removed.
README.md Show resolved Hide resolved
@emcfarlane emcfarlane marked this pull request as draft June 28, 2024 15:48
@emcfarlane emcfarlane changed the title Document inputs in README Reconfigure inputs for actions Jun 28, 2024
@emcfarlane emcfarlane marked this pull request as ready for review July 2, 2024 15:15
src/inputs.ts Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
action.yml Outdated Show resolved Hide resolved
src/inputs.ts Outdated Show resolved Hide resolved
# On push github.ref_name, on delete github.event.ref_name.
archive_labels: ${{ github.ref_name }}
comment: false
test-archive-not-exists:
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this as labels can no longer be given to the action.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Depending on which merges first, I suppose it would affect #40, but that's okay :)

README.md Outdated
| `domain` | Domain for logging into the BSR, enterprise only.| `buf.build` |
| `input` | [Input](https://buf.build/docs/reference/inputs) for the `buf` command. | |
| `paths` | Limit to specific files or directories (separated by newlines). | |
| `exclude_imports` | Exclude imports. | |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Exclude imports from what specifically? Needs more explanation

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated.

README.md Outdated
| `input` | [Input](https://buf.build/docs/reference/inputs) for the `buf` command. | |
| `paths` | Limit to specific files or directories (separated by newlines). | |
| `exclude_imports` | Exclude imports. | |
| `exclude_paths` | Exclude specific files or directories (separated by newlines). | |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Exclude paths from what?

Going even further, perhaps neither of these options should exist either, as I think they only apply for lint and breaking (and build?)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Exclude imports is a requested feature for buf-breaking-action: bufbuild/buf-breaking-action#14

README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
# On push github.ref_name, on delete github.event.ref_name.
archive_labels: ${{ github.ref_name }}
comment: false
test-archive-not-exists:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Depending on which merges first, I suppose it would affect #40, but that's okay :)

Copy link
Member

@nicksnyder nicksnyder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(also merge conflicts to fix)

README.md Show resolved Hide resolved
emcfarlane and others added 3 commits July 3, 2024 17:54
It's confusing to not show the check was skipped, this is preferred over
not showing the value if the user explicitly disables it via the input
parameter.
@emcfarlane emcfarlane marked this pull request as draft July 3, 2024 22:25
@emcfarlane emcfarlane marked this pull request as ready for review July 3, 2024 22:42
@emcfarlane emcfarlane requested a review from nicksnyder July 3, 2024 22:42
Copy link
Member

@nicksnyder nicksnyder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am in favor of getting this merged sooner rather than later so we can move forward with tagging a release that includes the simpler config (and other recent improvements).

If there is any remaining feedback, can address in a followup PR

@emcfarlane emcfarlane merged commit d111e0a into main Jul 4, 2024
34 checks passed
@emcfarlane emcfarlane deleted the ed/docInputs branch July 4, 2024 00:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants