Skip to content

Commit

Permalink
Bugfix for asset mapping path (#17)
Browse files Browse the repository at this point in the history
  • Loading branch information
kshann authored Nov 18, 2024
1 parent c4f9f41 commit 689c9c8
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def self.get_release_automation_subtask_id(task_url, asana_access_token)
end

def self.get_asana_user_id_for_github_handle(github_handle)
mapping_file = File.expand_path('../assets/github-asana-user-id-mapping.yml', __dir__)
mapping_file = Helper::DdgAppleAutomationHelper.path_for_asset_file('asana_get_user_id_for_github_handle/github-asana-user-id-mapping.yml')
user_mapping = YAML.load_file(mapping_file)
asana_user_id = user_mapping[github_handle]

Expand Down
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.3"
VERSION = "0.11.4"
end
end
17 changes: 2 additions & 15 deletions spec/asana_helper_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -140,24 +140,11 @@ def get_release_automation_subtask_id(task_url)
end

describe "#get_asana_user_id_for_github_handle" do
let(:yaml_content) do
{
"duck" => "123",
"goose" => "456",
"pigeon" => nil,
"hawk" => ""
}
end

before do
allow(YAML).to receive(:load_file).and_return(yaml_content)
end

it "sets the user ID output and GHA output correctly" do
allow(Fastlane::Helper::GitHubActionsHelper).to receive(:set_output)

expect(get_asana_user_id_for_github_handle("duck")).to eq("123")
expect(Fastlane::Helper::GitHubActionsHelper).to have_received(:set_output).with("asana_user_id", "123")
expect(get_asana_user_id_for_github_handle("jotaemepereira")).to eq("1203972458584419")
expect(Fastlane::Helper::GitHubActionsHelper).to have_received(:set_output).with("asana_user_id", "1203972458584419")
end

it "shows warning when handle does not exist" do
Expand Down

0 comments on commit 689c9c8

Please sign in to comment.