Skip to content

Commit

Permalink
handle empty asnaa url in mattermost
Browse files Browse the repository at this point in the history
  • Loading branch information
kshann committed Nov 19, 2024
1 parent 466fef6 commit fdf8436
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Notarized macOS app `<%= release_type %>` build is ready :goose_honk_tada: | [:github: Workflow run summary](<%= workflow_url %>)<% if defined?(asana_task_url) %> | [:asana: Asana Task](<%= asana_task_url %>)<% end %>
Notarized macOS app `<%= release_type %>` build is ready :goose_honk_tada: | [:github: Workflow run summary](<%= workflow_url %>)<% if defined?(asana_task_url) && !asana_task_url.to_s.strip.empty? %> | [:asana: Asana Task](<%= asana_task_url %>)<% end %>
Original file line number Diff line number Diff line change
@@ -1 +1 @@
:rotating_light: Notarized macOS app `<%= release_type %>` build failed | [:github: Workflow run summary](<%= workflow_url %>)<% if defined?(asana_task_url) %> | [:asana: Asana Task](<%= asana_task_url %>)<% end %>
:rotating_light: Notarized macOS app `<%= release_type %>` build failed | [:github: Workflow run summary](<%= workflow_url %>)<% if defined?(asana_task_url) && !asana_task_url.to_s.strip.empty? %> | [:asana: Asana Task](<%= asana_task_url %>)<% end %>
2 changes: 1 addition & 1 deletion lib/fastlane/plugin/ddg_apple_automation/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module Fastlane
module DdgAppleAutomation
VERSION = "0.11.6"
VERSION = "0.11.7"
end
end
20 changes: 20 additions & 0 deletions spec/mattermost_send_message_action_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,26 @@
})).to eq(expected)
end

it "processes notarized-build-complete template with a nil asana_task_url" do
expected = "Notarized macOS app `release` build is ready :goose_honk_tada: | [:github: Workflow run summary](https://workflow.com)"

expect(process_template("notarized-build-complete", {
"release_type" => "release",
"workflow_url" => "https://workflow.com",
"asana_task_url" => nil
})).to eq(expected)
end

it "processes notarized-build-complete template with an empty asana_task_url" do
expected = "Notarized macOS app `release` build is ready :goose_honk_tada: | [:github: Workflow run summary](https://workflow.com)"

expect(process_template("notarized-build-complete", {
"release_type" => "release",
"workflow_url" => "https://workflow.com",
"asana_task_url" => ""
})).to eq(expected)
end

it "processes notarized-build-complete template with Asana task URL" do
expected = "Notarized macOS app `release` build is ready :goose_honk_tada: | [:github: Workflow run summary](https://workflow.com) | [:asana: Asana Task](https://asana.com)"

Expand Down

0 comments on commit fdf8436

Please sign in to comment.