Access PR files on action #26522
-
If I have an action trigger on PR, is there a way I can clone that PR to then run tests against it? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
Hi @childishgiant , Thank you for being here! You can get the pull request files’ name via rest api, please check my answer in the ticket. Could you please explain more about ‘clone PR and run tests against it’? When pull_request is triggered, it will start related check runs, and if you have new commit on the source branch, the workflow will be triggered again, unless you define the types of the event, please refer to more details here. If the current PR exists, you CANNOT create a new PR for the same source/target branches. |
Beta Was this translation helpful? Give feedback.
-
When a PR is submitted I want to be able to clone that PR to the instance running from an action so I can then run unit tests on it. A way to read the files in the PR. Sorry if this doesn’t make much sense? |
Beta Was this translation helpful? Give feedback.
-
You can use the checkout action as usual (e.g. with a push event), it will automatically check out the latest commit in the pull request (unless you give another ref). |
Beta Was this translation helpful? Give feedback.
You can use the checkout action as usual (e.g. with a push event), it will automatically check out the latest commit in the pull request (unless you give another ref).