Is it possible to somehow pass only the changed files in bitbucket-pipelines.yml? I want to run PHP Code Sniffer only on changed files while creating pull request. I couldn't find answer anywhere, all solutions where that I should hardcode the path to the project files. Thanks!
you should be able to generate an app password that allows you to call specific bitbucket APIs.
then possibly using the pullrequest API (https://developer.atlassian.com/bitbucket/api/2/reference/resource/repositories/%7Busername%7D/%7Brepo_slug%7D/pullrequests) and/or diffstat API you could be able to figure out what files changed in the given changesets that comprise the pull request?
@mkleintyeap, that API endpoint did the trick, thanks :)
To be correct I used this one -> https://developer.atlassian.com/bitbucket/api/2/reference/resource/repositories/%7Busername%7D/%7Brepo_slug%7D/pullrequests/%7Bpull_request_id%7D/diffstat as it provides a param for specific PR
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.