Skip to content

[action][danger] Add fail-if-no-pr flag to Danger action#18657

Merged
joshdholtz merged 3 commits intofastlane:masterfrom
minuscorp:danger-add-fail-if-no-pr-flag
May 14, 2021
Merged

[action][danger] Add fail-if-no-pr flag to Danger action#18657
joshdholtz merged 3 commits intofastlane:masterfrom
minuscorp:danger-add-fail-if-no-pr-flag

Conversation

@minuscorp
Copy link
Copy Markdown
Collaborator

Checklist

  • I've run bundle exec rspec from the root directory to see all new and existing tests pass
  • I've followed the fastlane code style and run bundle exec rubocop -a to ensure the code style is valid
  • I've read the Contribution Guidelines
  • I've updated the documentation if necessary.

Motivation and Context

This PR adds the missing fail-if-no-pr flag of Danger action that was missing from the config.

Description

Added the corresponding ConfigItem and append it to the command in the Danger call.

Testing Steps

  1. Checkout and install the following fastlane’s branch.
  2. Use the Danger action and test that the fail-if-no-pr flag is added when configured like so.
  3. 🚀

@google-cla google-cla Bot added the cla: yes label May 7, 2021
Copy link
Copy Markdown
Contributor

@ainame ainame left a comment

Choose a reason for hiding this comment

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

🥇

FastlaneCore::ConfigItem.new(key: :fail_if_no_pr,
env_name: "FL_DANGER_FAIL_IF_NO_PR",
description: "Fail Danger execution if no PR is found",
type: Boolean,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

😉

Copy link
Copy Markdown
Member

@joshdholtz joshdholtz left a comment

Choose a reason for hiding this comment

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

Some small change otherwise 💯

Comment thread fastlane/lib/fastlane/actions/danger.rb Outdated
env_name: "FL_DANGER_FAIL_IF_NO_PR",
description: "Fail Danger execution if no PR is found",
type: Boolean,
optional: true,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Optional can be removed if there is a default_value for a type: Boolean 😊

@minuscorp minuscorp requested a review from joshdholtz May 14, 2021 09:19
Copy link
Copy Markdown
Member

@joshdholtz joshdholtz left a comment

Choose a reason for hiding this comment

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

Perfect! Thanks for adding this ❤️

@joshdholtz joshdholtz merged commit cec8771 into fastlane:master May 14, 2021
Copy link
Copy Markdown

@fastlane-bot fastlane-bot left a comment

Choose a reason for hiding this comment

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

Congratulations! 🎉 This was released as part of fastlane 2.183.0 🚀

@fastlane fastlane locked and limited conversation to collaborators Jul 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants