Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No commits found. Change commits range, initial depth or use --ignore-empty to allow empty patch sets. #136

Open
garrettg123 opened this issue Mar 30, 2023 · 9 comments

Comments

@garrettg123
Copy link

Github Sentry Action Release Bug Report

Environment

How do you use this action?
standard

Which version of the action?
v1

Steps to Reproduce

    steps:
      - uses: actions/checkout@v2
        with:
          fetch-depth: 0
      - name: Create Sentry release
        uses: getsentry/action-release@v1
        env:
          SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
          SENTRY_ORG: myorg
          SENTRY_PROJECT: myproj
          # SENTRY_URL: https://sentry.io/
        with:
          environment: production

Expected Result

Sentry release success

Actual Result

No commits found. Change commits range, initial depth or use --ignore-empty to allow empty patch sets.

@bifot
Copy link

bifot commented Apr 13, 2023

same for me

@aldy505
Copy link

aldy505 commented May 22, 2023

Also encountering this while using actions/checkout@v3 with and withoutfetch-depth: 0,

@laygir
Copy link

laygir commented May 26, 2023

is there way to enable debug logs for this action, couldn't find it in the docs.

@petrvecera
Copy link

Anyone solved this? Running into the same issue with pretty standard workflow:

Error: Command failed: /action-release/dist/sentry-cli releases set-commits sentry-release --auto
error: No commits found. Change commits range, initial depth or use --ignore-empty to allow empty patch sets.

Sometimes it passses/ sometime it fails. I am getting pretty annoyed by "releases" in sentry.

Errors are amazing in sentry, everything works just like that out of the box. But these releases man, I am couple of hours already in and still doesn't work as I would like. Bad experience.

@laygir
Copy link

laygir commented May 31, 2023

This action didn't work for me properly and I switched over to using sentry-cli directly.

# createSentryRelease.sh

# Retrieve package version and name from package.json
VERSION=$(node -p "require('./package.json').version")
PROJECT_NAME=$(node -p "require('./package.json').name")


printf "Will use $PROJECT_NAME@$VERSION\n"

# Replace with your organization slug
ORGANIZATION_SLUG="xxx"
# Accept environment as an argument with fallback to 'development'
ENVIRONMENT="${1:-development}"

# Create a new release with package name
RELEASE_NAME="$PROJECT_NAME@$VERSION"

# Create a new release
sentry-cli releases new "$RELEASE_NAME" --project "$PROJECT_NAME" --org "$ORGANIZATION_SLUG"

# Associate commits with the release, ignoring missing commits
sentry-cli releases set-commits "$RELEASE_NAME" --auto --ignore-missing --org "$ORGANIZATION_SLUG"

# Finalize the release
sentry-cli releases finalize "$RELEASE_NAME" --org "$ORGANIZATION_SLUG"

# Associate deployment with the release
sentry-cli releases deploys "$RELEASE_NAME" new -e "$ENVIRONMENT" --org "$ORGANIZATION_SLUG"

Then in my Github Actions, there is a step

- name: Create Sentry release
  env:
    SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
  run: |
    npm install -g @sentry/cli@2.18.1
    sentry-cli login --auth-token $SENTRY_AUTH_TOKEN
    chmod +x createSentryRelease.sh
    ./createSentryRelease.sh $ENV
  • I have the env the pipeline is running for stored in $ENV

@SpencerKaiser
Copy link

SpencerKaiser commented Jun 4, 2023

Solution

For those still struggling with this, the solution is super simple but obscure:

  1. Sentry > Settings > Integrations > GitHub
image
  1. Configurations tab: create a configuration if your org isn't listed

  2. Add the repository you are creating your release from

image
  1. Re-run your job and it should succeed

Credit to #75 (comment) and #75 (comment)

@laygir
Copy link

laygir commented Jun 5, 2023

I believe Github integration is a paid plan feature, so if you are on a free plan above solution might not work for you.

@shaunsaker
Copy link

Thanks @SpencerKaiser, worked for me 👍 FYI for anyone reading this, I'm on the free plan and was able to integrate with my Github repo.

@sebastianbuechler
Copy link

Solution

For those still struggling with this, the solution is super simple but obscure:

  1. Sentry > Settings > Integrations > GitHub
image 2. Configurations tab: create a configuration if your org isn't listed 3. Add the repository you are creating your release from image 4. Re-run your job and it should succeed

Credit to #75 (comment) and #75 (comment)

Thank you @SpencerKaiser, your solution also worked for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants