You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This PR adds new property in Github PR struct. This property is mergeable. It indicates whether or not the pull request can be merged based on the existence of merge conflicts.
You can find more details in Github API documentation:
�[31mERROR: Failed to parse JSON: typeMismatch(Swift.String, Swift.DecodingError.Context(codingPath: [CodingKeys(stringValue: "danger", intValue: nil), CodingKeys(stringValue: "github", intValue: nil), CodingKeys(stringValue: "pr", intValue: nil), CodingKeys(stringValue: "mergeable", intValue: nil)], debugDescription: "Expected to decode String but found a number instead.", underlyingError: nil))
�[0;0m�[31mERROR: Dangerfile eval failed at Dangerfile.swift
�[0;0m�[31mERROR: Could not get the results JSON file at /var/folders/17/5mc7816d3mndxjqgplq6057w0000gn/T/danger-response.json
�[0;0m
I think mergeable is an optional Bool on the API that danger uses.
You can verify this by running danger-swift pr https://github.com/danger/swift/pull/318 --json > file.json this will generate the json that Danger decodes on file.json
MergeableState is an object defined in GraphQL API, which seems not to be not used on danger.
Danger uses REST API, and it says
The value of the mergeable attribute can be true, false, or null. If the value is null, then GitHub has started a background job to compute the mergeability. After giving the job time to complete, resubmit the request. When the job finishes, you will see a non-null value for the mergeable attribute in the response. If mergeable is true, then merge_commit_sha will be the SHA of the test merge commit.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds new property in Github PR struct. This property is
mergeable. It indicates whether or not the pull request can be merged based on the existence of merge conflicts.You can find more details in Github API documentation:
The motivation is that it could be useful to know if the PR is mergeable or not. For example to add a label like
merge conflicts