Improve PR Details job to use github-script and output labels (#2397)
* Improve PR Details job to use github-script and output labels
* Fix wrongly using github.ref in workflow_run actions which always refer to develop
* Update pr-details to be far more generic