Skip to content

Commit 4838fb6

Browse files
committed
fix: Proper link to item in post (#7)
1 parent b5a1ce3 commit 4838fb6

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/tests/test_unit/test_bot.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ async def test_create_post(
2828
mock_shelf = MockShelf()
2929
mock_shelve_open.return_value = mock_shelf
3030
mock_create_forum_post.return_value = post_mock
31-
message = f"Nowy task stworzony audacity4 przez: {user_text_mention}.\n Link do taska: https://github.com/orgs/my-org/projects/1?pane=issue&item_id=1"
31+
message = f"Nowy task stworzony audacity4 przez: {user_text_mention}.\n Link do taska: https://github.com/orgs/my-org/projects/1?pane=issue&itemId=1"
3232
event = SimpleProjectItemEvent(1, "audacity4", "norbiros", "created")
3333
await bot.create_post(event, user_text_mention, shared_forum_channel_mock, rest_client_mock, [])
3434
mock_create_forum_post.assert_called_with(

src/utils/misc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def retrieve_discord_id(node_id: str) -> str | None:
2929
def create_item_link(item_id: int) -> str:
3030
organization_name = os.getenv("GITHUB_ORGANIZATION_NAME", "my-org")
3131
project_number = os.getenv("GITHUB_PROJECT_NUMBER", "1")
32-
return f"https://github.com/orgs/{organization_name}/projects/{project_number}?pane=issue&item_id={item_id}"
32+
return f"https://github.com/orgs/{organization_name}/projects/{project_number}?pane=issue&itemId={item_id}"
3333

3434

3535
def handle_task_exception(task: asyncio.Task, error_message: str):

0 commit comments

Comments
 (0)