diff --git a/CHANGELOG.md b/CHANGELOG.md index 64ccf2dbed4..b366eaa6f58 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,6 +26,7 @@ Note: Can be used with `oxsecurity/megalinter@beta` in your GitHub Action mega-l - Fixes - Reporters + - Update Bitbucket pipeline generator template to trigger builds on pull requests from any branch, by @yermulnik in - Flavors diff --git a/mega-linter-runner/generators/mega-linter/templates/bitbucket-pipelines.yml b/mega-linter-runner/generators/mega-linter/templates/bitbucket-pipelines.yml index fcddf0368f8..9739cb59e10 100644 --- a/mega-linter-runner/generators/mega-linter/templates/bitbucket-pipelines.yml +++ b/mega-linter-runner/generators/mega-linter/templates/bitbucket-pipelines.yml @@ -4,22 +4,23 @@ image: atlassian/default-image:5 pipelines: - default: - - parallel: - - step: - name: Run MegaLinter - image: <%= DOCKER_IMAGE_NAME %>:<%= DOCKER_IMAGE_VERSION %> - script: - # Disable LLM Advisor for bot PRs (dependabot, renovate, etc.) - # Note: Bitbucket has limited access to PR metadata, this is a basic check - - | - if [[ "$BITBUCKET_BRANCH" =~ ^(dependabot|renovate)/ ]] || - [[ "$BITBUCKET_PR_TITLE" =~ ^(chore|fix|deps?|bump)(\(.*\))?: ]] || - [[ "$BITBUCKET_STEP_TRIGGERER_UUID" =~ dependabot|renovate ]]; then - export LLM_ADVISOR_ENABLED=false - else - export LLM_ADVISOR_ENABLED=true - fi - - export DEFAULT_WORKSPACE=$BITBUCKET_CLONE_DIR && bash /entrypoint.sh - artifacts: - - megalinter-reports/** + pull-requests: # Note: Bitbucket PR comment reporting requires pull request context + "**": # Run on PRs for any branch (the source branch of the pull request) + - parallel: + - step: + name: Run MegaLinter + image: <%= DOCKER_IMAGE_NAME %>:<%= DOCKER_IMAGE_VERSION %> + script: + # Disable LLM Advisor for bot PRs (dependabot, renovate, etc.) + # Note: Bitbucket has limited access to PR metadata, this is a basic check + - | + if [[ "$BITBUCKET_BRANCH" =~ ^(dependabot|renovate)/ ]] || + [[ "$BITBUCKET_PR_TITLE" =~ ^(chore|fix|deps?|bump)(\(.*\))?: ]] || + [[ "$BITBUCKET_STEP_TRIGGERER_UUID" =~ dependabot|renovate ]]; then + export LLM_ADVISOR_ENABLED=false + else + export LLM_ADVISOR_ENABLED=true + fi + - export DEFAULT_WORKSPACE=$BITBUCKET_CLONE_DIR && bash /entrypoint.sh + artifacts: + - megalinter-reports/**