Skip to content

[Bitbucket Comment Reporter] Can't figure out PR comments not posted #7410

@yermulnik

Description

@yermulnik

I'm new to Megalinter and Bitbucket, although I'm willing to configure these both to work together, and I'm encountering an odd issue where Megalinter isn't posting comments to PR 😢

I followed the https://megalinter.io/latest/reporters/BitbucketCommentReporter/#configuration and created repository token and added it as repository secured var:
Image
Image

This is what I see in pipeline logs:
Image
Image

bitbucket-pipelines.yml:

# MegaLinter Bitbucket Pipelines configuration file
# More info at https://megalinter.io
---
image: atlassian/default-image:5

pipelines:
  default:
    - parallel:
        - step:
            name: Run MegaLinter
            image: oxsecurity/megalinter:v9
            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
              - |
                [[ -z "$BITBUCKET_REPO_ACCESS_TOKEN" ]] && echo "BITBUCKET_REPO_ACCESS_TOKEN is empty" || echo "BITBUCKET_REPO_ACCESS_TOKEN is set"
              - export DEFAULT_WORKSPACE=$BITBUCKET_CLONE_DIR && bash /entrypoint.sh
            artifacts:
              - megalinter-reports/**

.mega-linter.yml:

# Configuration file for MegaLinter
#
# See all available variables at https://megalinter.io/latest/config-file/ and
# in linters documentation
---
# all, none, or list of linter keys
APPLY_FIXES: none

# Formatter errors will be reported as errors (not warnings) if this variable
# is set to false
FORMATTERS_DISABLE_ERRORS: false

# Directory for all linter configuration rules
LINTER_RULES_PATH: .linters

# Enable printing alpaca image to console
PRINT_ALPACA: false

# Displays all disabled linters MegaLinter could have run
SHOW_SKIPPED_LINTERS: false

# When set to false, only new or edited files will be parsed for validation
VALIDATE_ALL_CODEBASE: false

Would appreciate any pointers 🙏🏻

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions