You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Open your repo in Bitbucket and click on “Repository Settings” from the left navigation.
Under “Security” click on “Access Tokens”
Click on the “Create Repository Access Token”
Give the token a name (Pixee for example) and check the box for under “Pull request” for “write” access. This will add all the other necessary scopes automatically.
This will give you a key that you can copy for the next step.
Add the “Repository variables”
Click on “Repository variables”
Add a new one with the name “BITBUCKET_ACCESS_TOKEN_PIXEE” and the value from the step above.
Add the pipeline:
Under “Pipelines” Click settings and make sure pipelines are enabled for the branch.
Add the following bitbucket-pipelines.yml file to your project.
image: atlassian/default-image:3pipelines:
pull-requests:
'**': # This will run for pull requests targeting any branch
- step:
name: "Pixee PR"script:
- echo "Pixee PR run"
- | if [[ ${#BITBUCKET_PR_DESTINATION_BRANCH} > 0 ]] && [[ $BITBUCKET_PR_DESTINATION_BRANCH != 'main' ]]; then echo "This is not a PR on main so we're exiting." && exit 0; fi
- pipe: docker://codemodder/pixee-ci-bitbucket