Skip to content

Commit ac0e3bb

Browse files
authored
Add support for V0 Asana search URL (#41)
1 parent 8fbf6d2 commit ac0e3bb

3 files changed

Lines changed: 6 additions & 2 deletions

File tree

lib/fastlane/plugin/ddg_apple_automation/helper/asana_helper.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class AsanaHelper # rubocop:disable Metrics/ClassLength
1717
ASANA_TAG_URL_TEMPLATE = "https://app.asana.com/0/%s/list"
1818

1919
# https://app.asana.com/0/<project_id>/<task_id>
20-
ASANA_V0_TASK_URL_REGEX = %r{https://app.asana.com/0/[0-9]+/([0-9]+)(?:/f)?}
20+
ASANA_V0_TASK_URL_REGEX = %r{https://app.asana.com/0(?:/search)?/[0-9]+/([0-9]+)(?:/f)?}
2121
# https://app.asana.com/<url_format_version>/<workspace_id>/<object_name>/<object_id>/<subobject_name>/<subobject_id>
2222
ASANA_V1_TASK_URL_REGEX = %r{https://app.asana.com/1/[0-9]+(?:/[0-9a-z/]*)?/task/([0-9]+)(:?/[0-9a-z/]*)?(?:\?focus=true)?}
2323
ASANA_V1_INBOX_URL_REGEX = %r{https://app.asana.com/1/[0-9]+/inbox/[0-9]+/item/([0-9]+)/story/([0-9]+)}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module Fastlane
22
module DdgAppleAutomation
3-
VERSION = "2.2.3"
3+
VERSION = "2.2.4"
44
end
55
end

spec/asana_helper_spec.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ def asana_task_url(task_id)
3333
it "extracts task ID from a URL in focused mode" do
3434
expect(extract_asana_task_id("https://app.asana.com/0/0/1234/f")).to eq("1234")
3535
end
36+
37+
it "extracts task ID from search results" do
38+
expect(extract_asana_task_id("https://app.asana.com/0/search/753241/9999")).to eq("9999")
39+
end
3640
end
3741

3842
context "v1 task URL" do

0 commit comments

Comments
 (0)