Skip to content

Commit 76bfc21

Browse files
authored
Jira toolkit documentation (#306)
1 parent 247f08b commit 76bfc21

File tree

73 files changed

+2987
-62
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+2987
-62
lines changed

pages/toolkits/productivity/jira.mdx

Lines changed: 907 additions & 62 deletions
Large diffs are not rendered by default.
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Jira Environment Variables
2+
3+
### `JIRA_MAX_CONCURRENT_REQUESTS`
4+
5+
Arcade uses asynchronous calls to request Jira API endpoints. In some tools, multiple concurrent HTTP requests may be made to speed up execution. This environment variable controls the maximum number of concurrent requests to Jira API in any tool execution.
6+
7+
The value must be a numeric string with an integer greater than or equal to 1.
8+
9+
**Default:** `3`
10+
11+
12+
### `JIRA_API_REQUEST_TIMEOUT`
13+
14+
Controls the maximum number of seconds to wait for a response from the Jira API. This is also applied, in some cases, as a global max timeout for multiple requests that are made in a single tool execution. For instance, when a tool needs to paginate results from a given endpoint, this timeout may apply to the entire pagination process in total, not only to the individual requests.
15+
16+
The value must be a numeric string with an integer greater than or equal to 1.
17+
18+
**Default:** `30`
19+
20+
21+
### `JIRA_CACHE_MAX_ITEMS`
22+
23+
<Note>
24+
The caching strategy does not involve caching Jira API responses that go into tool output, but only internal values.
25+
</Note>
26+
27+
The Arcade Jira toolkit will cache some values that are repeatedly used in tool execution to enable better performance. This environment variable controls the maximum number of items to hold in each cache.
28+
29+
The value must be a numeric string with an integer greater than or equal to 1.
30+
31+
**Default:** `5000`
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Jira Reference
2+
3+
Below is a reference of enumerations used by some tools in the Jira toolkit:
4+
5+
## PrioritySchemeOrderBy
6+
7+
- **NAME_ASCENDING**: `name ascending`
8+
- **NAME_DESCENDING**: `name descending`
9+
10+
## IssueCommentOrderBy
11+
12+
- **CREATED_DATE_ASCENDING**: `created_date_ascending`
13+
- **CREATED_DATE_DESCENDING**: `created_date_descending`
14+
15+
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
import { Arcade } from "@arcadeai/arcadejs";
2+
3+
const client = new Arcade(); // Automatically finds the `ARCADE_API_KEY` env variable
4+
5+
const USER_ID = "[email protected]"; // Unique identifier for your user (email, UUID, etc.)
6+
const TOOL_NAME = "Jira.AddCommentToIssue";
7+
8+
// Start the authorization process
9+
const authResponse = await client.tools.authorize({tool_name: TOOL_NAME});
10+
11+
if (authResponse.status !== "completed") {
12+
console.log(`Click this link to authorize: ${authResponse.url}`);
13+
}
14+
15+
// Wait for the authorization to complete
16+
await client.auth.waitForCompletion(authResponse);
17+
18+
const toolInput = {
19+
"issue": "PROJ-123",
20+
"body": "This is a comment on the issue.",
21+
"reply_to_comment": "456",
22+
"mention_users": [
23+
24+
25+
]
26+
};
27+
28+
const response = await client.tools.execute({
29+
tool_name: TOOL_NAME,
30+
input: toolInput,
31+
user_id: USER_ID,
32+
});
33+
34+
console.log(JSON.stringify(response.output.value, null, 2));
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
import json
2+
from arcadepy import Arcade
3+
4+
client = Arcade() # Automatically finds the `ARCADE_API_KEY` env variable
5+
6+
USER_ID = "[email protected]" # Unique identifier for your user (email, UUID, etc.)
7+
TOOL_NAME = "Jira.AddCommentToIssue"
8+
9+
auth_response = client.tools.authorize(tool_name=TOOL_NAME)
10+
11+
if auth_response.status != "completed":
12+
print(f"Click this link to authorize: {auth_response.url}")
13+
14+
# Wait for the authorization to complete
15+
client.auth.wait_for_completion(auth_response)
16+
17+
tool_input = {
18+
"issue": "PROJ-123",
19+
"body": "This is a comment on the issue.",
20+
"reply_to_comment": "456",
21+
"mention_users": [
22+
23+
24+
]
25+
}
26+
27+
response = client.tools.execute(
28+
tool_name=TOOL_NAME,
29+
input=tool_input,
30+
user_id=USER_ID,
31+
)
32+
print(json.dumps(response.output.value, indent=2))
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
import { Arcade } from "@arcadeai/arcadejs";
2+
3+
const client = new Arcade(); // Automatically finds the `ARCADE_API_KEY` env variable
4+
5+
const USER_ID = "[email protected]"; // Unique identifier for your user (email, UUID, etc.)
6+
const TOOL_NAME = "Jira.AddLabelsToIssue";
7+
8+
// Start the authorization process
9+
const authResponse = await client.tools.authorize({tool_name: TOOL_NAME});
10+
11+
if (authResponse.status !== "completed") {
12+
console.log(`Click this link to authorize: ${authResponse.url}`);
13+
}
14+
15+
// Wait for the authorization to complete
16+
await client.auth.waitForCompletion(authResponse);
17+
18+
const toolInput = {
19+
"issue": "JIRA-123",
20+
"labels": [
21+
"bug",
22+
"urgent"
23+
],
24+
"notify_watchers": true
25+
};
26+
27+
const response = await client.tools.execute({
28+
tool_name: TOOL_NAME,
29+
input: toolInput,
30+
user_id: USER_ID,
31+
});
32+
33+
console.log(JSON.stringify(response.output.value, null, 2));
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
import json
2+
from arcadepy import Arcade
3+
4+
client = Arcade() # Automatically finds the `ARCADE_API_KEY` env variable
5+
6+
USER_ID = "[email protected]" # Unique identifier for your user (email, UUID, etc.)
7+
TOOL_NAME = "Jira.AddLabelsToIssue"
8+
9+
auth_response = client.tools.authorize(tool_name=TOOL_NAME)
10+
11+
if auth_response.status != "completed":
12+
print(f"Click this link to authorize: {auth_response.url}")
13+
14+
# Wait for the authorization to complete
15+
client.auth.wait_for_completion(auth_response)
16+
17+
tool_input = {
18+
"issue": "JIRA-123",
19+
"labels": [
20+
"bug",
21+
"urgent"
22+
],
23+
"notify_watchers": True
24+
}
25+
26+
response = client.tools.execute(
27+
tool_name=TOOL_NAME,
28+
input=tool_input,
29+
user_id=USER_ID,
30+
)
31+
print(json.dumps(response.output.value, indent=2))
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
import { Arcade } from "@arcadeai/arcadejs";
2+
3+
const client = new Arcade(); // Automatically finds the `ARCADE_API_KEY` env variable
4+
5+
const USER_ID = "[email protected]"; // Unique identifier for your user (email, UUID, etc.)
6+
const TOOL_NAME = "Jira.AttachFileToIssue";
7+
8+
// Start the authorization process
9+
const authResponse = await client.tools.authorize({tool_name: TOOL_NAME});
10+
11+
if (authResponse.status !== "completed") {
12+
console.log(`Click this link to authorize: ${authResponse.url}`);
13+
}
14+
15+
// Wait for the authorization to complete
16+
await client.auth.waitForCompletion(authResponse);
17+
18+
const toolInput = {
19+
"issue": "ISSUE-123",
20+
"filename": "report.pdf",
21+
"file_content_base64": "[base64_encoded_content]"
22+
};
23+
24+
const response = await client.tools.execute({
25+
tool_name: TOOL_NAME,
26+
input: toolInput,
27+
user_id: USER_ID,
28+
});
29+
30+
console.log(JSON.stringify(response.output.value, null, 2));
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import json
2+
from arcadepy import Arcade
3+
4+
client = Arcade() # Automatically finds the `ARCADE_API_KEY` env variable
5+
6+
USER_ID = "[email protected]" # Unique identifier for your user (email, UUID, etc.)
7+
TOOL_NAME = "Jira.AttachFileToIssue"
8+
9+
auth_response = client.tools.authorize(tool_name=TOOL_NAME)
10+
11+
if auth_response.status != "completed":
12+
print(f"Click this link to authorize: {auth_response.url}")
13+
14+
# Wait for the authorization to complete
15+
client.auth.wait_for_completion(auth_response)
16+
17+
tool_input = {
18+
"issue": "ISSUE-123",
19+
"filename": "report.pdf",
20+
"file_content_base64": "[base64_encoded_content]"
21+
}
22+
23+
response = client.tools.execute(
24+
tool_name=TOOL_NAME,
25+
input=tool_input,
26+
user_id=USER_ID,
27+
)
28+
print(json.dumps(response.output.value, indent=2))
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
import { Arcade } from "@arcadeai/arcadejs";
2+
3+
const client = new Arcade(); // Automatically finds the `ARCADE_API_KEY` env variable
4+
5+
const USER_ID = "[email protected]"; // Unique identifier for your user (email, UUID, etc.)
6+
const TOOL_NAME = "Jira.CreateIssue";
7+
8+
// Start the authorization process
9+
const authResponse = await client.tools.authorize({tool_name: TOOL_NAME});
10+
11+
if (authResponse.status !== "completed") {
12+
console.log(`Click this link to authorize: ${authResponse.url}`);
13+
}
14+
15+
// Wait for the authorization to complete
16+
await client.auth.waitForCompletion(authResponse);
17+
18+
const toolInput = {
19+
"title": "Bug in login feature",
20+
"issue_type": "Bug",
21+
"project": "PROJ123",
22+
"due_date": "2025-01-15",
23+
"description": "There is a bug that prevents users from logging in.",
24+
"labels": [
25+
"login_issue",
26+
"urgent"
27+
],
28+
"assignee": "[email protected]"
29+
};
30+
31+
const response = await client.tools.execute({
32+
tool_name: TOOL_NAME,
33+
input: toolInput,
34+
user_id: USER_ID,
35+
});
36+
37+
console.log(JSON.stringify(response.output.value, null, 2));

0 commit comments

Comments
 (0)