-
Notifications
You must be signed in to change notification settings - Fork 2
/
Fastfile
46 lines (42 loc) · 968 Bytes
/
Fastfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
def jira_client
site = "https://your_jira_url"
context_path = ""
auth_type = :basic
username = "your_jira_email"
password = "your_jira_password"
options = {
site: site,
context_path: context_path,
auth_type: auth_type,
username: username,
password: password
}
lient = JIRA::Client.new(options)
client
end
lane :test do
client = jira_client()
ticket_id = "TEST-101"
# Can be matched with block
jira_transitions(
client: client,
ticket_id: ticket_id,
matching: lambda { |transition|
name = transition.name
name == 'Ready to Test' || name == 'Build is ready'
}
)
# or transition_id
# jira_transitions(
# client: client,
# ticket_id: ticket_id,
# transition_id: "151"
# )
# or transition_name
# jira_transitions(
# client: client,
# ticket_id: ticket_id,
# transition_name: "Ready to Test",
# fail_if_no_matching: true
# )
end