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

Allow excluding just the action name #53

Merged
merged 1 commit into from
Dec 19, 2023

Conversation

jhrozek
Copy link
Contributor

@jhrozek jhrozek commented Dec 18, 2023

Frizbee allowed to exclude the whole action name including the tag e.g. actions/checkout@v4. But this is not user-friendly for cases where the exclude would be upgraded over time as the exclude would have to be kept in sync.

Let's also support the case where the exclude is just in the form of owner/action_name.

JAORMX
JAORMX previously approved these changes Dec 19, 2023
@jhrozek
Copy link
Contributor Author

jhrozek commented Dec 19, 2023

@JAORMX sorry but can you re-approve? There was a copy-paste bug in the tests, nothing else had changed.

if shouldExclude(cfg, v.Value, act) {
continue
}

Copy link
Contributor

Choose a reason for hiding this comment

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

Actually, after giving it some thought... what about having two exclude checks? One for the raw value + tag and another one for just the action name?

that would make the shouldExclude code simpler, but also improve performance (we don't do parsing if the action was already excluded).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ha, I didn't think about it!

Frizbee allowed to exclude the whole action name including the tag e.g.
`actions/checkout@v4`. But this is not user-friendly for cases where the
exclude would be upgraded over time as the exclude would have to be kept
in sync.

Let's also support the case where the exclude is just in the form of
`owner/action_name`.
@jhrozek jhrozek merged commit c72bf21 into stacklok:main Dec 19, 2023
7 checks passed
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