Label previous PRs
Is it possible to setup the workflow in such a way that it can also label old PRs with the same logic?
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.
You are welcome to try retrolabeler.
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 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, sure. We are working on the solution in this PR. Should be done soon.