Skip to content

Allow import_dangerfile to accept full path#1380

Merged
orta merged 2 commits into
danger:masterfrom
jkmathew:allow-import_dangerfile-full-path
Sep 2, 2022
Merged

Allow import_dangerfile to accept full path#1380
orta merged 2 commits into
danger:masterfrom
jkmathew:allow-import_dangerfile-full-path

Conversation

@jkmathew

@jkmathew jkmathew commented Sep 1, 2022

Copy link
Copy Markdown
Contributor

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

orta commented Sep 2, 2022

Copy link
Copy Markdown
Member

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