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

Convert dependency check annotation from h3 to p #1663

Open
wants to merge 4 commits into
base: trunk
Choose a base branch
from
Open
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions fastlane/lanes/release.rb
Original file line number Diff line number Diff line change
Expand Up @@ -312,9 +312,13 @@ def check_pods_references
# This will also print the result to STDOUT
result = ios_check_beta_deps(lockfile: File.join(PROJECT_ROOT_FOLDER, 'Podfile.lock'))

style = result[:pods].nil? || result[:pods].empty? ? 'success' : 'warning'
message = "### Checking Internal Dependencies are all on a **stable** version\n\n#{result[:message]}"
buildkite_annotate(context: 'pods-check', style: style, message: message) if is_ci
return unless is_ci

all_dependencies_stable = result[:pods].nil? || result[:pods].empty?
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 did this tidy because I thought I'd add an emoji an wanted to DRY the check.

I decided not to add the emoji to the text because Buildkite already has icons and colors for each annotation style. But I kept the code like this because I think it's a tiny readability improvements.

Also, since I'm on my way to write more commentary than code, I considered being explicit in the variable names and the message in mentioning CocoaPods. But, I'd say leaving it as generic "dependencies" makes it easier for us to update the logic to incorporate something that parses the Package.resolved JSON looking for dependencies that point to non stable versions.

style = all_dependencies_stable ? 'success' : 'warning'
# Notice the double new line to produce a new HTML paragraph from the Markdown formatting.
message = "Internal dependencies check result:\n\n#{result[:message]}"
mokagio marked this conversation as resolved.
Show resolved Hide resolved
buildkite_annotate(context: 'pods-check', style: style, message: message)
end

def trigger_buildkite_release_build(branch:, beta:)
Expand Down