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

Validate industries GHA #711

Merged
merged 7 commits into from
Oct 29, 2024
Merged

Conversation

jsegal205
Copy link
Contributor

Adds custom validation so that new / updates to company files add a standard for industries.

Supports #671 in the long term

@jsegal205 jsegal205 requested a review from a team as a code owner October 22, 2024 15:38
@jsegal205 jsegal205 force-pushed the validate-industries branch from 39f554d to f2762b1 Compare October 22, 2024 15:52

@impl Mix.Task
@doc false
def run([file_path]) do
Copy link
Member

Choose a reason for hiding this comment

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

It might be worth doing a Path.wildcard so the function can run over all the files. It would be simpler to do it in Elixir than doing it via a bash shell, and it would be easier for devs to run locally.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was hesitant to run it over all the files as a good majority of the existing company will likely need to be updated. My thought was adding this so that new or updates to company files could have some data consistency for industries.

This was my attempt at something similar to an ecto changeset validation rule without having or adding ecto back to the project.

I'm open to other ideas or approaches.

lib/companies/industries.ex Show resolved Hide resolved
@doomspork doomspork added this pull request to the merge queue Oct 29, 2024
Merged via the queue into beam-community:main with commit 16de4c2 Oct 29, 2024
5 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.

4 participants