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 list support for subjectPath input #51

Merged
merged 2 commits into from
May 6, 2024
Merged

Conversation

bdehamer
Copy link
Collaborator

@bdehamer bdehamer commented May 3, 2024

Per: actions/attest-build-provenance#57

Allows the subjectPath input to accept a list of paths. Any of the list elements may itself be a glob representing multiple files.

The path list can be commas-separated:

subjectPath: foo,bar*,fizz

or newline separated:

subjectPath: |
  foo*
  bar

or any combination of the two:

subjectPath: |
  foo*,bar*
  fizz

@bdehamer bdehamer requested a review from a team as a code owner May 3, 2024 18:51
Signed-off-by: Brian DeHamer <bdehamer@github.com>
Signed-off-by: Brian DeHamer <bdehamer@github.com>
/* eslint-disable-next-line github/no-then */
const files = await glob.create(subPath).then(async g => g.glob())

for (const file of files) {

Choose a reason for hiding this comment

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

This is not new for this pr, but I'm thinking if we should have a limit of the number of subjects/attestations we store. I could think a low number like 64 ought to be enough. I would be a better experience to stop in the action and warn before the rate limit stops this:

Create too much content on GitHub in a short amount of time. In general, no more than 80 content-generating requests per minute and no more than 500 content-generating requests per hour are allowed

Source

Copy link

@kommendorkapten kommendorkapten left a comment

Choose a reason for hiding this comment

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

Looks good. The comment on rate limit can be done in a follow up PR.

@bdehamer bdehamer merged commit 94082a9 into main May 6, 2024
15 checks passed
@bdehamer bdehamer deleted the bdehamer/subject-array branch May 6, 2024 15:32
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.

None yet

2 participants