I have a heavy workflow that runs for some 30+ minutes. It is triggered by making a comment on a PR. Statuses are posted/updated as the workflow runs. As long as there is only one person touching the PR, this is fine. However, it's possible for two people to send the comment and thus trigger the workflow twice.
So, if I'm 25 minutes into the workflow and somebody dumps the magic comment from a stale browser tab, I want to just finish the run in progress and not repeat all the work.
How would I prevent starting the workflow a second time, when it already runs for a given combination of PR+hash?
I know about concurrency, but that cancels the previous run. I need the opposite...
(Detecting the posted statuses seems simple, but it isn't a reliable way of deciding if anything really runs, only if a status has been ever posted.)