pronto icon indicating copy to clipboard operation
pronto copied to clipboard

Can pronto bitbucket_pr fallback to bitbucket if he can find PR

Open iggant opened this issue 7 years ago • 5 comments

After I merge PR into develop branch auto run bitbucket pipelines return with this error:

pronto run -f bitbucket_pr -c origin/develop

than I see this error:

`

pronto run -f bitbucket_pr -c origin/develop
/usr/local/lib/ruby/2.3.0/ostruct.rb:96:in 'initialize': undefined method each_pair for ["type", "error"]:Array (NoMethodError)
Did you mean?  each_slice
from /usr/local/bundle/gems/pronto-0.9.1/lib/pronto/clients/bitbucket_client.rb:36:in 'new'
from /usr/local/bundle/gems/pronto-0.9.1/lib/pronto/clients/bitbucket_client.rb:36:in 'block in openstruct'
from /usr/local/bundle/gems/pronto-0.9.1/lib/pronto/clients/bitbucket_client.rb:36:in 'each'
from /usr/local/bundle/gems/pronto-0.9.1/lib/pronto/clients/bitbucket_client.rb:36:in 'map'
from /usr/local/bundle/gems/pronto-0.9.1/lib/pronto/clients/bitbucket_client.rb:36:in 'openstruct'
from /usr/local/bundle/gems/pronto-0.9.1/lib/pronto/clients/bitbucket_client.rb:20:in 'pull_comments'
from /usr/local/bundle/gems/pronto-0.9.1/lib/pronto/bitbucket.rb:5:in 'pull_comments'
from /usr/local/bundle/gems/pronto-0.9.1/lib/pronto/formatter/pull_request_formatter.rb:6:in 'existing_comments'
from /usr/local/bundle/gems/pronto-0.9.1/lib/pronto/formatter/git_formatter.rb:6:in 'format'
from /usr/local/bundle/gems/pronto-0.9.1/lib/pronto.rb:67:in 'block in run'
from /usr/local/bundle/gems/pronto-0.9.1/lib/pronto.rb:66:in 'each'
from /usr/local/bundle/gems/pronto-0.9.1/lib/pronto.rb:66:in 'run'
from /usr/local/bundle/gems/pronto-0.9.1/lib/pronto/cli.rb:61:in 'block in run'
from /usr/local/bundle/gems/pronto-0.9.1/lib/pronto/cli.rb:60:in 'chdir'
from /usr/local/bundle/gems/pronto-0.9.1/lib/pronto/cli.rb:60:in 'run'
from /usr/local/bundle/gems/thor-0.19.4/lib/thor/command.rb:27:in 'run'
from /usr/local/bundle/gems/thor-0.19.4/lib/thor/invocation.rb:126:in 'invoke_command'
from /usr/local/bundle/gems/thor-0.19.4/lib/thor.rb:369:in 'dispatch'
from /usr/local/bundle/gems/thor-0.19.4/lib/thor/base.rb:444:in 'start'
from /usr/local/bundle/gems/pronto-0.9.1/bin/pronto:6:in '<top (required)>'
from /usr/local/bundle/bin/pronto:22:in 'load'
from /usr/local/bundle/bin/pronto:22:in '<main>'

`

iggant avatar Apr 26 '17 17:04 iggant

@iggant thanks. I think that we should start by making the error nicer and clearer. But I've never before considered a fallback mechanism for runners. That's an interesting idea!

mmozuras avatar Apr 26 '17 19:04 mmozuras

But do you have a solution for this error? I'm getting the same error.

hsyntnc avatar Nov 23 '17 07:11 hsyntnc

Any solution for this error?

jairojj avatar Jul 04 '18 17:07 jairojj

I ended up with this code: you create some executable file: pronto.sh inside put:

git fetch origin develop:refs/remotes/origin/develop NODE_ENV=development pronto run -f bitbucket_pr -c origin/develop if [ $? -gt 0 ]; then NODE_ENV=development pronto run -f bitbucket -c origin/develop fi echo 'Pronto Complete'

iggant avatar Jul 06 '18 07:07 iggant

I add a commit for fix it

https://github.com/run26kimo/pronto/commit/c16b1c3c78a3c3772d5a9e12e691817ab77f056b

run26kimo avatar Jul 13 '18 02:07 run26kimo