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

Feature/reject invalid filter format #401

Merged

Conversation

fenech
Copy link
Contributor

@fenech fenech commented May 3, 2023

I ran into this issue when I accidentally passed a single string to the "commit_filter.include" parameter. I was confused by the fact that the check appeared to work, but it returned the wrong commit.

Instead, this makes the check fail when the configuration of this parameter is incorrect.

@fenech fenech force-pushed the feature/reject-invalid-filter-format branch from 08d9029 to cc0575e Compare May 3, 2023 15:09
@fenech fenech force-pushed the feature/reject-invalid-filter-format branch 2 times, most recently from df38303 to c55ca6c Compare May 17, 2023 13:25
@fenech fenech force-pushed the feature/reject-invalid-filter-format branch 2 times, most recently from b5510cd to bef9d2f Compare May 25, 2023 13:16
Return an error from the check if the parameter is not an array,
rather than quietly failing to apply the filter.

Before this change, the jq command failed due to a parse error and no
filter was applied.

Signed-off-by: Tom Fenech <tomjwfenech@gmail.com>
Signed-off-by: Tom Fenech <tomjwfenech@gmail.com>
Install missing package, which provides netstat

Signed-off-by: Tom Fenech <tomjwfenech@gmail.com>
Signed-off-by: Tom Fenech <tomjwfenech@gmail.com>
@fenech fenech force-pushed the feature/reject-invalid-filter-format branch from bef9d2f to 139f4ad Compare May 26, 2023 14:12
@taylorsilva
Copy link
Member

Awesome enhancement! I'll review and merge or give feedback. At a quick glance, everything looks pretty good!

@fenech
Copy link
Contributor Author

fenech commented Oct 31, 2023

Thanks for the initial feedback @taylorsilva! Did you get a chance to look at it in the end?

Copy link
Member

@taylorsilva taylorsilva left a comment

Choose a reason for hiding this comment

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

Sorry for the delay @fenech IRL stuff pulled me away and I'm just getting back in the habit of checking stuff here. This PR is solid! Nice little improvements to the areas you had to touch and added a test too. THANK YOU for the PR!

@taylorsilva taylorsilva merged commit 06d08fc into concourse:master Mar 16, 2024
2 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