Skip to content

Commit 116dd54

Browse files
committed
Respect SKIP_SETTING_JIRA_FIELDS environment variable
Signed-off-by: Nikola Forró <[email protected]>
1 parent dc62dd9 commit 116dd54

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

mcp_server/jira_tools.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,8 @@ async def set_jira_fields(
101101
"""
102102
Updates the specified Jira issue, setting only the fields that are currently empty/unset.
103103
"""
104+
if os.getenv("SKIP_SETTING_JIRA_FIELDS", "False").lower() == "true":
105+
return "Skipping of setting Jira fields requested, not doing anything (this is expected, not an error)"
104106
if os.getenv("DRY_RUN", "False").lower() == "true":
105107
return "Dry run, not updating Jira fields (this is expected, not an error)"
106108

mcp_server/tests/unit/test_jira_tools.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ def mocked_env():
1414
flexmock(os).should_receive("getenv").with_args("JIRA_URL").and_return("http://jira")
1515
flexmock(os).should_receive("getenv").with_args("JIRA_TOKEN").and_return("12345")
1616
flexmock(os).should_receive("getenv").with_args("DRY_RUN", "False").and_return("false")
17+
flexmock(os).should_receive("getenv").with_args("SKIP_SETTING_JIRA_FIELDS", "False").and_return("false")
1718

1819

1920
@pytest.mark.asyncio

0 commit comments

Comments
 (0)