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

When PR already exists, no notification is sent #11

Open
2 tasks
vincent-fuchs opened this issue Aug 14, 2018 · 0 comments
Open
2 tasks

When PR already exists, no notification is sent #11

vincent-fuchs opened this issue Aug 14, 2018 · 0 comments

Comments

@vincent-fuchs
Copy link
Contributor

Summary

When PR already exists but we still try to create one, an exception is thrown. commit has happen, but we don't receive any notification

Ideally, we should use a DirectPush instead of PullRequestGitHubInteraction, but in case we didn't we should still receive a notification

Type of Issue

It is a :

  • [X ] bug
  • request
  • question regarding the documentation

Motivation

Current Behavior


2018-08-14 15:02:25.761 []  WARN 22828 --- [github-events-1] c.s.c.t.c.i.ActionToPerformListener      : some unexpected error happened

feign.FeignException: status 422 reading FeignRemoteGitHub#createPullRequest(String,PullRequestToCreate); content:
{"message":"Validation Failed","errors":[{"resource":"PullRequest","code":"custom","message":"A pull request already exists for ItecFccOsd:sonarMigrationAugust."}],"documentation_url":"https://developer.github.com/enterprise/2.13/v3/pulls/#create-a-pull-request"}
	at feign.FeignException.errorStatus(FeignException.java:62)
	at feign.codec.ErrorDecoder$Default.decode(ErrorDecoder.java:91)
	at feign.SynchronousMethodHandler.executeAndDecode(SynchronousMethodHandler.java:138)
	at feign.SynchronousMethodHandler.invoke(SynchronousMethodHandler.java:76)
	at feign.ReflectiveFeign$FeignInvocationHandler.invoke(ReflectiveFeign.java:103)
	at com.sun.proxy.$Proxy104.createPullRequest(Unknown Source)
	at com.societegenerale.cidroid.tasks.consumer.services.ActionToPerformService.createPrOnBranch(ActionToPerformService.java:207)
	at com.societegenerale.cidroid.tasks.consumer.services.ActionToPerformService.createPullRequest(ActionToPerformService.java:90)
	at com.societegenerale.cidroid.tasks.consumer.services.ActionToPerformService.perform(ActionToPerformService.java:74)
	at com.societegenerale.cidroid.tasks.consumer.infrastructure.ActionToPerformListener.onActionToPerform(ActionToPerformListener.java:70)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:483)
	at org.springframework.messaging.handler.invocation.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:180)


Expected Behavior

Exception should be caught (logged as warn), and flow should continue normally so that notification is sent.

Steps to Reproduce (for bugs)

Your Environment

  • Version used: 1.03
  • OS and version:
  • Version of libs used:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant