menu
announcement

Spectrum is now read-only. Learn more about the decision in our official announcement.

Channels
Team

Setup DangerSwift on Bitrise CI can't get correct information from PRs

July 22, 2020 at 3:29pm

Setup DangerSwift on Bitrise CI can't get correct information from PRs

July 22, 2020 at 3:29pm
I'm using Bitrise CI and Bitbucket Cloud with a Swift Project. Then I'm trying to add a step on my workflow to check when there are some Pull Requests. So my step looks like:
inputs:
- content: |-
#!/usr/bin/env bash
# fail if any commands fails
set -ex
echo "Danger instalation"
brew install danger/tap/danger-swift
danger-swift ci
title: Run Danger
I'm also setting on Environment Variables both "DANGER_BITBUCKETCLOUD_OAUTH_KEY" and "DANGER_BITBUCKETCLOUD_OAUTH_SECRET" from Bitbucket's OAuth consumers.
But on my PR I receive this message:
[31mERROR: Failed to parse JSON: keyNotFound(CodingKeys(stringValue: "account_id", intValue: nil), Swift.DecodingError.Context(codingPath: [CodingKeys(stringValue: "danger", intValue: nil), CodingKeys(stringValue: "bitbucket_cloud", intValue: nil), CodingKeys(stringValue: "activities", intValue: nil), _JSONKey(stringValue: "Index 1", intValue: 1), CodingKeys(stringValue: "comment", intValue: nil), CodingKeys(stringValue: "user", intValue: nil)], debugDescription: "No value associated with key CodingKeys(stringValue: \"account_id\", intValue: nil) (\"account_id\").", underlyingError: nil))
ERROR: Dangerfile eval failed at Dangerfile.swift
ERROR: Could not get the results JSON file at /var/folders/6q/wgy6jtp12w5gzgm9lzcglpqw0000gn/T/danger-response.json

What am I missing?
No messages yet