labeler icon indicating copy to clipboard operation
labeler copied to clipboard

Label previous PRs

Open PythonCoderAS opened this issue 4 years ago • 2 comments

Is it possible to setup the workflow in such a way that it can also label old PRs with the same logic?

PythonCoderAS avatar Jan 05 '22 23:01 PythonCoderAS

I don't believe this is possible at the moment. This would require passing the PR_Number as Action input param. It is currently resolved here: https://github.com/actions/labeler/blob/3194b4b6cedfd6d7faad5a7a2dca889293fcff1b/src/labeler.ts#L65-L72

Passing PR_Number as input would be a huge improvement for this action.

rodik avatar Feb 05 '22 11:02 rodik

You are welcome to try retrolabeler.

vmarkovtsev avatar Mar 24 '22 10:03 vmarkovtsev

Hello @PythonCoderAS, I appreciate your patience with this issue. I'd like to suggest a potential workaround that we believe could be an effective solution. Once you've added the workflow to your main branch, you can then pull these changes into the branch you wish to label with the labeler. This action will in turn trigger the pull_request_target event, and as a result, the action will label the pull request as expected. I hope this proves to be helpful. Best regards!

andreilobanovich avatar Jun 14 '23 16:06 andreilobanovich

@AndreiLobanovich my issue is not labeling one PR, it's labeling everything before.

Let's say I have PRs 1-50, and on PR #51 I add the labeler workflow. How would I label PRs 1-50 now?

PythonCoderAS avatar Jun 17 '23 02:06 PythonCoderAS

@PythonCoderAS, sure. We are working on the solution in this PR. Should be done soon.

andreilobanovich avatar Jun 22 '23 10:06 andreilobanovich