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

[action][danger] add GitHub Enterprise flags #20216

Merged

Conversation

alexanderwe
Copy link
Contributor

@alexanderwe alexanderwe commented Apr 25, 2022

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 missing configurations for using the danger action with GitHub Enterprise. This is a nice addition and makes it possible to omit the manual setting of Danger related environment variables before executing fastlane.

Description

This PR adds the corresponding ConfigItems and set the corresponding environment variables based on https://danger.systems/guides/getting_started.html#enterprise-github
Additionally I saw that there were no tests present for the fail-if-no-pr flag, so I also added them.

Testing Steps

  1. Checkout and install the following fastlane’s branch.
  2. Use the Danger action and test that the GitHub Enterprose environment variables are set correctly.

Add tests for  GitHub enterprise flags and fail-if-no-pr flag
@alexanderwe
Copy link
Contributor Author

@joshdholtz I am not sure if it is ok to directly ping you, but maybe you know someone who could help here :) I saw that one CI test is failing due to

==> Tapping homebrew/bundle
Cloning into '/usr/local/Homebrew/Library/Taps/homebrew/homebrew-bundle'...
Warning: Permanently added the ECDSA host key for IP address '140.82.112.3' to the list of known hosts.\r
Tapped 1 command (99 files, 1.9MB).
Installing swiftformat
==> Downloading https://ghcr.io/v2/homebrew/core/swiftformat/manifests/0.49.7
curl: (22) The requested URL returned error: 503 
Error: swiftformat: Failed to download resource "swiftformat_bottle_manifest"
Download failed: https://ghcr.io/v2/homebrew/core/swiftformat/manifests/0.49.7

But I couldn't figure out how my changes could cause this. Do you know what could be the root cause here ?

@crazymanish
Copy link
Member

@alexanderwe
Copy link
Contributor Author

Looks random CI failure, Retrigger failing job:

https://app.circleci.com/pipelines/github/fastlane/fastlane/4430/workflows/9e13bf7d-7fba-4cd2-8b6f-51a041904c6b/jobs/81751

Thanks for the retrigger - green now 👍

@joshdholtz joshdholtz changed the title [action][danger] Add GitHub Enterprise flags [action][danger] add GitHub Enterprise flags May 18, 2022
Copy link
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.

This looks great to me! Thank you so much for adding this 🥰

@joshdholtz joshdholtz merged commit 7bae3dc into fastlane:master May 18, 2022
@fastlane-bot
Copy link

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

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