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

Add support for GitHub bot users #251

Merged
merged 3 commits into from Jun 26, 2019

Conversation

@JosephDuffy
Copy link
Contributor

commented Jun 26, 2019

I have added Dependabot to one of my projects, and Danger Swift is failing because the PR was created by a bot user: JosephDuffy/Partial#14, https://travis-ci.com/JosephDuffy/Partial/jobs/211151759.

I used the GitHub API to request the data for the above PR and then used the value of theuser key to create a test for decoding this type of user.

It looks like the documentation should be updated to reflect the new UserType case. I have run make docs, but it only updates half of the docs, eventually failing in ./Scripts/update_docs.rb with:

The operation couldn’t be completed. (SourceKittenFramework.Request.Error error 2.)
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/json/common.rb:156:in `initialize': A JSON text must at least contain two octets! (JSON::ParserError)
	from /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/json/common.rb:156:in `new'
	from /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/json/common.rb:156:in `parse'
	from ./Scripts/update_docs.rb:27:in `<main>'

It would appear that SourceKitten is throwing an error, but I am unable to figure out how to debug/fix this! :(

JosephDuffy added some commits Jun 26, 2019

@f-meloni
Copy link
Member

left a comment

Amazing!
Thank you very much!
Just a small comment :)

@@ -0,0 +1,23 @@

public let GitHubBotJSON = """

This comment has been minimized.

Copy link
@f-meloni

f-meloni Jun 26, 2019

Member

Can you please format this JSON

This comment has been minimized.

Copy link
@JosephDuffy

JosephDuffy Jun 26, 2019

Author Contributor

I have indented it and started the commit (it is running pre-commit hook tests etc.). Hopefully it will be the desired format :) If not let me know!

@f-meloni

This comment has been minimized.

Copy link
Member

commented Jun 26, 2019

Documentation is automatically updated by Rocket on release, then is fine we can merge this, and figure out the doc problem later :)

@DangerCI

This comment has been minimized.

Copy link

commented Jun 26, 2019

Warnings
⚠️

Sources/Danger/GitHubDSL.swift#L154 - Enum element name should be between 3 and 40 characters long: 'id' (identifier_name)

⚠️

Sources/Danger/GitHubDSL.swift#L170 - Variable name should be between 3 and 40 characters long: 'id' (identifier_name)

⚠️

Sources/Danger/GitHubDSL.swift#L184 - Variable name should be between 3 and 40 characters long: 'id' (identifier_name)

⚠️

Sources/Danger/GitHubDSL.swift#L227 - Enum element name should be between 3 and 40 characters long: 'id' (identifier_name)

⚠️

Sources/Danger/GitHubDSL.swift#L240 - Variable name should be between 3 and 40 characters long: 'id' (identifier_name)

⚠️

Sources/Danger/GitHubDSL.swift#L271 - Enum element name should be between 3 and 40 characters long: 'id' (identifier_name)

⚠️

Sources/Danger/GitHubDSL.swift#L291 - Variable name should be between 3 and 40 characters long: 'id' (identifier_name)

⚠️

Sources/Danger/GitHubDSL.swift#L331 - Enum element name should be between 3 and 40 characters long: 'id' (identifier_name)

⚠️

Sources/Danger/GitHubDSL.swift#L359 - Variable name should be between 3 and 40 characters long: 'id' (identifier_name)

⚠️

Sources/Danger/GitHubDSL.swift#L410 - Variable name should be between 3 and 40 characters long: 'id' (identifier_name)

⚠️

Sources/Danger/GitHubDSL.swift#L434 - Enum element name should be between 3 and 40 characters long: 'id' (identifier_name)

⚠️

Sources/Danger/GitHubDSL.swift#L453 - Variable name should be between 3 and 40 characters long: 'id' (identifier_name)

⚠️

Sources/Danger/GitHubDSL.swift#L487 - File should contain 400 lines or less: currently contains 487 (file_length)

Generated by 🚫 Danger Swift against 70a2818

@JosephDuffy

This comment has been minimized.

Copy link
Contributor Author

commented Jun 26, 2019

Documentation is automatically updated by Rocket on release, then is fine we can merge this and figure it out the doc problem later :)

Ah brilliant, thanks! :)

@f-meloni

This comment has been minimized.

Copy link
Member

commented Jun 26, 2019

Nice!
Merge on green

@peril-staging peril-staging bot merged commit 80d5f91 into master Jun 26, 2019

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.