Skip to content

Releases: danger/danger

3.2.0

06 Oct 20:52
Compare
Choose a tag to compare

Full Changelog

  • Added file and line optional parameters to methods on the messaging plugin - champo

This means that if you'd like to comment specifically on a line in a file inside the diff, you
can use an API like:

message("Please add your name to the CHANGELOG", file: "CHANGELOG.md", line: 4)

If you are using GitHub (who are the only ones with an API that supports line comments) you
will have the comments added inline. This makes changes to a lot of the logic inside the github
API, so we'd love bug reports (or PRs! :D) on things like "I expected this comment to be deleted."

On other platforms, it will ignore the file and line parameters.

  • Add Bitbucket Server aka. Stash integration - heeaad

    This adds a new object to the DSL, bitbucket_server which offers the following API:

    bitbucket_server.pr_title # The title of the Pull Request
    
    bitbucket_server.mr_body # The body text of the Pull Request
    
    bitbucket_server.mr_author # The username of the author of the Pull Request
    
    bitbucket_server.mr_labels # The labels assigned to the Pull Request
    
    bitbucket_server.branch_for_merge # The branch to which the PR is going to be merged into
    
    bitbucket_server.base_commit # The base commit to which the PR is going to be merged as a parent
    
    bitbucket_server.head_commit # The head commit to which the PR is requesting to be merged from
    
    bitbucket_server.mr_json # The hash that represents the PR's JSON
    
    bitbucket_server.html_link (paths: String or Array, full_path=true: Bool) # Returns a list of HTML anchors for a file, or files in the head repository.
  • Deprecated import_dangerfile(String) in favor of import_dangerfile(Hash) - dblock

    The new import_dangerfile method supports loading Dangerfile from Github.

    danger.import_dangerfile github: 'ruby-grape/danger'

    You can package a Dangerfile in a gem, add it to Gemfile and import it.

    danger.import_dangerfile gem: 'ruby-grape-danger'

    Use a local path for testing Dangerfile changes.

    danger.import_dangerfile path: '/Users/me/source/ruby-grape/danger'

    See #504 for details.

  • Prints updated danger message when installed danger is outdated - JuanitoFatas

  • Remove a variable assignment in comments_helper.rb - JuanitoFatas

  • Minor improvement to Danger.gem_path - JuanitoFatas

3.1.1

06 Oct 20:52
Compare
Choose a tag to compare

Full Changelog

  • Fixes for danger.import_dangerfile "org/repo" - orta re:#487

3.1.0

06 Oct 20:52
Compare
Choose a tag to compare

Full Changelog

  • Show appropriate error message when GitHub repo was moved - KrauseFx
  • danger plugins json [gem] will now give gem metadata too - orta
  • Crash fix for bundle exec danger - hanneskaeufler
  • Fix Buildkite repo slug URL generation - phillfarrugia
  • Added support for Bitrise - kylejm
  • Set LANG variable to en_US.UTF-8 before running git commands - bogren

3.0.3

06 Oct 20:52
Compare
Choose a tag to compare

Full Changelog

  • Add mr_diff/pr_diff for Danger::DangerfileGitLabPlugin - K0nserv
  • Fixes a bug where danger wouldn't work on Jenkins when setup with the GitHub Pull Request Builder plugin - vittoriom

3.0.2

06 Oct 20:52
Compare
Choose a tag to compare

Full Changelog

  • Spelling and grammar fixes. - connorshea
  • More crash fixes for danger local, maybe we need more tests here - orta

3.0.1

06 Oct 20:52
Compare
Choose a tag to compare

Full Changelog

  • Crash fix for danger local - hanneskaeufler

3.0.0

06 Oct 20:52
Compare
Choose a tag to compare

Full Changelog

  • GitLab support - k0nserv / deanpcmad / hjanuschka

    This started back in February, and is now shipping.
    Documentation has been updated on the Getting Started for those interested in the setup.

    This adds a new object to the DSL, gitlab which offers the following API:

    gitlab.mr_title # The title of the Merge Request
    
    gitlab.mr_body # The body text of the Merge Request
    
    gitlab.mr_author # The username of the author of the Merge Request
    
    gitlab.mr_labels # The labels assigned to the Merge Request
    
    gitlab.branch_for_merge # The branch to which the MR is going to be merged into
    
    gitlab.base_commit # The base commit to which the MR is going to be merged as a parent
    
    gitlab.head_commit # The head commit to which the MR is requesting to be merged from
    
    gitlab.mr_json # The hash that represents the MR's JSON
    
    gitlab.api # Provides access to the GitLab API client used inside Danger
    
    gitlab.html_link (paths: String or Array, full_path=true: Bool) # Returns a list of HTML anchors for a file, or files in the head repository.

    A lot of thanks for the GitLab team also, who helped handle updates for one of our dependencies.

  • Adapt CI Sources that support GitLab - k0nserv

  • BREAKING Removes the implicit Dangerfile support. - orta

    The implicit support was a feature that would check for an [org]/danger
    repo, and automatically parse that Dangerfile. Think it was a bit too magic,
    and the only person who I know is using it, said they think it should have
    been this way from the start. I'm cool with this.

    To handle the replacement, we've added a new object to the DSL.
    This is the danger API. It has two responsibilities at the moment,
    downloading a Dangerfile:

    danger.import_dangerfile = "artsy/danger"

    and importing local plugins:

    danger.import_plugin [path_or_url]

    Which the astute may have remembered used to be the purview of plugin.import.
    Which is now removed, in favour of the danger.import_plugin. Think there's more
    space for improvement inside the context of danger than plugin.

    I also removed plugin.download - couldn't see a use for it inside a Dangerfile. Happy
    to change that, if it's being used it.

  • Rename DANGER_GITHUB_API_HOST to DANGER_GITHUB_API_BASE_URL. - k0nserv
    Using DANGER_GITHUB_API_HOST is still supported to preserve backwards
    comaptibility, but using DANGER_GITHUB_API_BASE_URL is encouraged.

2.1.6

14 Feb 11:03
Compare
Choose a tag to compare

Full Changelog

  • Crash fix for danger init - marcelofabri

2.1.5

14 Feb 11:03
Compare
Choose a tag to compare

Full Changelog

  • Lols, more Circle CI stuff, and importantly - more documentation - orta

2.1.4

06 Oct 16:57
Compare
Choose a tag to compare

Full Changelog

  • Improve detection of PR content on CircleCI. - jamtur01