Comments (15)
could you try only on pull-request and remove temporarily on push? because danger is made to work on pull requests only.. should check your code before merging something, in a pull-request, not when you push a branch..
from kotlin.
Also I wonder if is related to this danger/danger-js#1042
from kotlin.
#95 should solve, could you try from danger/kotlin@github-issue-optional please?
from kotlin.
Thanks!
I'll try it and let you know
(Probably on Sunday)
from kotlin.
We don't have issue
optional on danger-swift. https://github.com/danger/swift/blob/master/Sources/Danger/GitHubDSL.swift#L17
Danger-Swift is been around for a while now and we never hit a problem like that, I'm then curious to know why.
@pinkasey Is is possible (unless it is private), to share the PR where this is happening?
from kotlin.
It's a private repo from my work-place.
What does issue
represent? an issue in github?
if so, that explains it -
We don't work with github-issues in my company.
We work with Jira.
from kotlin.
AFAIK PR is always also an issue, if you try to get an issue (https://developer.github.com/v3/issues/#get-an-issue) using a PR number it will show you the issue data for that PR.
Take for example the PR @gianluz just opened https://api.github.com/repos/danger/kotlin/issues/95 this is the issue data related to that PR.
I don't understand why it is missing in your case.
from kotlin.
What you say makes sense.
If only there was more info in the output, we could understand better what's going on...
I've tried println("args: $args")
,
but that only gave me something like
args: [Ljava.lang.String;@50406145
from kotlin.
I've ran it with danger/kotlin@github-issue-optional
Now I get this error:
com.squareup.moshi.JsonDataException: Required value 'pullRequest' missing at $.danger.github
at com.squareup.moshi.kotlin.reflect.KotlinJsonAdapter.fromJson(KotlinJsonAdapter.kt:96)
at com.squareup.moshi.JsonAdapter$2.fromJson(JsonAdapter.java:137)
at com.squareup.moshi.kotlin.reflect.KotlinJsonAdapter.fromJson(KotlinJsonAdapter.kt:83)
at com.squareup.moshi.JsonAdapter$2.fromJson(JsonAdapter.java:137)
at com.squareup.moshi.kotlin.reflect.KotlinJsonAdapter.fromJson(KotlinJsonAdapter.kt:83)
at com.squareup.moshi.JsonAdapter$2.fromJson(JsonAdapter.java:137)
at com.squareup.moshi.JsonAdapter.fromJson(JsonAdapter.java:41)
at systems.danger.kotlin.DangerRunner.<init>(DangerRunner.kt:125)
at systems.danger.kotlin.DangerRunnerKt.Danger(DangerRunner.kt:238)
at Dangerfile_df.<init>(Dangerfile.df.kts:14)
Uncaught Kotlin exception: kotlin.Exception: Command kotlinc -script-templates systems.danger.kts.DangerFileScript -cp /usr/local/lib/danger/danger-kotlin.jar -script Dangerfile.df.kts /tmp/danger-dsl.json danger_out.json exited with code 768
Obviously, it's not about the issue
-
the content of /tmp/danger-dsl.json
is completely wrong. I'm guessing it's completely empty.
I'll try to output it's content to console and post it here.
I think a take-away from this thread, is that if deserializing the input json fails - better print a more verbose error message, something like
"something is wrong with the input-file for Danger (/tmp/danger-dsl.json), which is calculated in a previous step (which?). here's the error: "...missing issue...", here's the file content: ..."
from kotlin.
May i ask how you are triggering the job?? is against a pull request? i'm suspecting is failing because there is not pull request here..
from kotlin.
yes, on a pull-request:
name: danger-detekt
on:
push:
branches: [ my_branch ]
pull_request:
branches: [ my_branch ]
from kotlin.
I'm trying both -
removed 'push' and added DANGER_GITHUB_API_BASE_URL
For now, it seems like github doesn't think he needs to run the action at all:
It's been like that for ~10 minutes.
I'll update if it makes progress..
If you guys can point me to an example repo where danger/kotlin does work - that might also help.
from kotlin.
OK
I've changed my main.yml (workflow file) to the one in this repo (danger.yml
) - now it seems to run successfully.
I'll work my way from here.
I guess the problem was here, in my workflow yml:
on:
push:
fix:
on: [pull_request]
Thanks for the replies.
I still suggest a more helpful error-message in the case that I've encounter, I'll try to open a PR.
from kotlin.
I'll try to open a PR
Thanks ✨ 👍
from kotlin.
Looks like this issue was solved! closing
from kotlin.
Related Issues (20)
- JsonDecodingException on approvals_before_merge
- Cannot install Kotlin Danger neither from git clone or ssh HOT 6
- Improve debugging capabilities HOT 1
- Consider editing repository setings to remove "Packages" section HOT 1
- Could not find a DangerFile HOT 3
- Kotlinc not found HOT 15
- New release date question HOT 1
- Danger Kotlin API Documentation
- Upgrade to newer JDK HOT 1
- Add label on a PR HOT 3
- Can't find Kotlin Compiler in Android Studio Preferences HOT 3
- MacOS Catalina default shell change to zsh causing issue in Bitrise HOT 2
- Autocomplete and Syntax Highlighting are not working on latest Android Studio HOT 3
- Could not find pull request information for private repo HOT 3
- Add binaries into release artifacts
- GitHubCommit: author and commiter can be empty objects HOT 1
- Git.changedLines returns empty values for PullRequestChangedLines object
- Custom args in yml file
- PRs opened from a non collaborator fork can't post a comment
- What are the basic steps to run a gitlab pipeline for Danger Kotlin? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kotlin.