Skip to content

Commit

Permalink
Merge pull request #687 from OpenSPP/sync_issue_to_odoo-prefixed_title
Browse files Browse the repository at this point in the history
Updated sync_issue_to_odoo.py
  • Loading branch information
dasunhegoda authored Dec 10, 2024
2 parents 3492b9c + 9167e86 commit 016408b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions scripts/sync_issue_to_odoo.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ def sanitize(input_string):
issue_title = sanitize(os.getenv("TITLE", "")[:256])
issue_body = sanitize(os.getenv("BODY", "")[:256])
github_issue_id = sanitize(os.getenv("ISSUE", "")[:256])
prefixed_title = f"GH-{github_issue_id} - {issue_title}"

# XML-RPC endpoints for Odoo
common = xmlrpc.client.ServerProxy(f"{url}/xmlrpc/2/common")
Expand Down Expand Up @@ -60,7 +61,7 @@ def sanitize(input_string):
[
task_id,
{
"name": issue_title,
"name": prefixed_title,
"description": issue_body,
},
],
Expand All @@ -76,7 +77,7 @@ def sanitize(input_string):
"create",
[
{
"name": issue_title,
"name": prefixed_title,
"description": issue_body,
"project_id": project_id[0],
"x_github_issue_id": github_issue_id, # Set the GitHub issue ID
Expand Down

0 comments on commit 016408b

Please sign in to comment.