Attaching commits to release not working

georgeboot
0
georgeboot
commented a year ago

Version

3.0.1

Reproduction link

https://jsfiddle.net

Steps to reproduce

  1. Make sure you are in an active git repo
  2. Install this package (yarn add @nuxtjs/sentry)
  3. In your nuxt.config.js, add the following:
export default {
    // ...

    modules: [
        // ...
        '@nuxtjs/sentry',
    ],

    sentry: {
        dsn: 'https://[email protected]/project-id',
        publishRelease: true
    },

    // ...
}
  1. run yarn build
  2. The script will create a release with Sentry using the current git commit hash, upload sourceMaps, set the release in the sentry client but not associate git commits to the release.

What is expected ?

It should also attach commits to the release (with the --auto flag)

What is actually happening?

It is not attaching any commits

Additional comments?

I have already looked at #65 but that didn't resolve my issue.

bug
0
georgeboot
0
georgeboot
commented a year ago

I figured out why it doesn't work. By default, Sentry will not attach commits to the release. If you want it, you need to add the following to your nuxt.config.js:

export default {
  // ...
  sentry: {
        dsn: 'https://[email protected]/project-id',
        disabled: process.env.NODE_ENV !== 'production',
        webpackConfig: {
            setCommits: {
                repo: 'organisation/repo-name',
                auto: true,
            },
        },
    },
}
0
Informations
Bug ReportOpen
#c74 - Created a year ago