Skip to content

Commit 0760c23

Browse files
author
m.prestel
committed
Merge branch 'feat/pin' of https://github.com/marci4/jira into feat/pin
2 parents 8ab609e + ff7424b commit 0760c23

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

jira/client.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -5653,9 +5653,9 @@ def pinned_comments(self, issue: int | str) -> list[PinnedComment]:
56535653
for raw_comment_json in r_json
56545654
]
56555655
return pinned_comments
5656-
5656+
56575657
@translate_resource_args
5658-
def pin_comment(self, issue: int | str , comment: int | str, pin: bool) -> Response:
5658+
def pin_comment(self, issue: int | str, comment: int | str, pin: bool) -> Response:
56595659
"""Pin/Unpin a comment on the issue.
56605660
56615661
Args:
@@ -5666,5 +5666,5 @@ def pin_comment(self, issue: int | str , comment: int | str, pin: bool) -> Respo
56665666
Returns:
56675667
Response
56685668
"""
5669-
url = self._get_url("issue/" + str(issue) + "/comment/"+ str(comment) + "/pin")
5670-
return self._session.put(url, data=str(pin).lower())
5669+
url = self._get_url("issue/" + str(issue) + "/comment/" + str(comment) + "/pin")
5670+
return self._session.put(url, data=str(pin).lower())

jira/resources.py

+2
Original file line numberDiff line numberDiff line change
@@ -955,6 +955,7 @@ def update( # type: ignore[override]
955955

956956
super().update(async_=async_, jira=jira, notify=notify, fields=data)
957957

958+
958959
class PinnedComment(Resource):
959960
"""Pinned comment on an issue."""
960961

@@ -969,6 +970,7 @@ def __init__(
969970
self._parse_raw(raw)
970971
self.raw: dict[str, Any] = cast(dict[str, Any], self.raw)
971972

973+
972974
class RemoteLink(Resource):
973975
"""A link to a remote application from an issue."""
974976

tests/resources/test_pinned_comment.py

-1
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,3 @@ def test_pincomments(self):
3232
self.jira.pin_comment(comment2.id, False)
3333
pinned_comments = self.jira.pinned_comments(issue)
3434
assert len(pinned_comments) == 0
35-

0 commit comments

Comments
 (0)