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 import_dangerfile to accept full path #1380

Merged
merged 2 commits into from Sep 2, 2022

Conversation

jkmathew
Copy link
Contributor

@jkmathew jkmathew commented Sep 1, 2022

Currently import_dangerfile(path: '...') assumes the user provides the path to the directory containing a Dangerfile.
This is not the case when we are splitting large Dangerfiles into smaller ones. We have to place each Dangerfile in separate directories.
In this PR I modified the import_dangerfile_from_path method to check if the provided path is a file, if yes, then use that path to import. Otherwise, append Dangerfile to the path and import it.

Fixes #1379

@orta
Copy link
Member

orta commented Sep 2, 2022

Cool, thanks 👍🏻

@orta orta merged commit 37b46d1 into danger:master Sep 2, 2022
@jkmathew jkmathew deleted the allow-import_dangerfile-full-path branch September 6, 2022 08:46
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.

Allow danger.import_dangerfile(path:) with full file path
2 participants