Sometimes there's a need to backport a PR that's been locked (for example by an automatic locking App, because it's old). We've hit one case like this and the corresponding Sentry alert is linked below.
But what should we do in such cases, really? Clearly, if there was a request to create a backport, it came from a human, and most likely it is legit.
At the moment, I see only two solutions:
1) Ignore comment reporting and only keep the Checks API one — it's bound to a commit so shouldn't be affected by locking
2) Temporarily unlock the PR, do the backporting, and lock it again after the last comment. The bot should also mention this and the motivation in the reporting for traceability.
BadRequest: Unable to create comment because issue is locked.
CancelledError:
File "octomachinery/utils/asynctools.py", line 43, in _aio_gather_iter_pairs
yield await task_res_q.get()
File "anyio/_backends/_asyncio.py", line 724, in get
return await super().get()
File "asyncio/queues.py", line 163, in get
await getter
BadRequest: Unable to create comment because issue is locked.
(21 additional frame(s) were not displayed)
...
File "octomachinery/github/api/utils.py", line 45, in async_function_wrapper
return await coroutine_instance
File "gidgethub/abc.py", line 166, in post
data, _ = await self._make_request(
File "octomachinery/github/api/raw_client.py", line 66, in _make_request
return await super()._make_request(
File "gidgethub/abc.py", line 106, in _make_request
data, self.rate_limit, more = sansio.decipher_response(*response)
File "gidgethub/sansio.py", line 366, in decipher_response
raise exc_type(*args)
The underlying HTTP response contains
args:
[
<HTTPStatus.FORBIDDEN: 403>,
'Unable to create comment because issue is locked.'
]
data:
{
"documentation_url": "https://docs.github.com/articles/locking-conversations/",
"message": "Unable to create comment because issue is locked."
}
Upvote & Fund
We're using Polar.sh so you can upvote and help fund this issue.
We receive the funding once the issue is completed & confirmed by you.
Thank you in advance for helping prioritize & fund our backlog.
Sometimes there's a need to backport a PR that's been locked (for example by an automatic locking App, because it's old). We've hit one case like this and the corresponding Sentry alert is linked below.
But what should we do in such cases, really? Clearly, if there was a request to create a backport, it came from a human, and most likely it is legit. At the moment, I see only two solutions: 1) Ignore comment reporting and only keep the Checks API one — it's bound to a commit so shouldn't be affected by locking 2) Temporarily unlock the PR, do the backporting, and lock it again after the last comment. The bot should also mention this and the motivation in the reporting for traceability.
Sentry Issue: PATCHBACK-P
The underlying HTTP response contains args:
data:
Upvote & Fund