fastlane-plugin-create_bitbucket_pull_request 0.2.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 83c1e1c7c4d74636c528a3d0e5c59bbb9a9af3a1e744a3add43245189041ebd3
4
- data.tar.gz: e2ecb5d26a09acb9949a5e9074659df4d887c4f7c412d9763b0ef34f7bf02b1c
3
+ metadata.gz: 6b09eafbff0b7cff6f4664134ac1ee16a3ef6ea125260d1ecce4b7711c0bf2c5
4
+ data.tar.gz: 2bc3007e3ebd7714e9314204f407d261c3e23fc39103d6a59501982979d37c71
5
5
  SHA512:
6
- metadata.gz: ea833e1e25760bfe30adc4ea8f6703b3c934e5651d29b871b0dafd311a0bb154221e3dfb9e11f0ce337234332a82c2348e7dadc9ac7de03d55b04413cf03c5db
7
- data.tar.gz: e2f730fdfb605058b5968d0bbf1c29c830bae1290b2e575c76fbd508111b559b1067e67521802671117df6f5f6117178e7fe654c74d517dc2e6941e3c67a497f
6
+ metadata.gz: 38086db1254f651e09508d05120fddb6dee28aa955ec570517603a5f841a10133a8e2c8c725738c450be21ea022895472909a54585747a566331e7d4bb6006eb
7
+ data.tar.gz: f49ccc4e4bbf03554326d61b38caaa9651c91356e954fd703f28e1981bc42b0e1f972b367c4a7ffa565287aad6c79b931d4275ec1834e99dcb96524bd4bded78
@@ -7,17 +7,17 @@ require 'json'
7
7
  module Fastlane
8
8
  module Actions
9
9
  class CreateBitbucketPullRequestAction < Action
10
- def self.run(_params)
11
- UI.message("Creating new bitbucket pull request from '#{_params[:head]}' to branch '#{_params[:target]}' of '#{_params[:owner]}/#{_params[:repository]}'")
10
+ def self.run(params)
11
+ UI.message("Creating new bitbucket pull request from '#{params[:head]}' to branch '#{params[:target]}' of '#{params[:owner]}/#{params[:repository]}'")
12
12
  response = JSON.parse(Net::HTTP.post(
13
- URI("https://api.bitbucket.org/2.0/repositories/#{_params[:owner]}/#{_params[:repository]}/pullrequests"),
13
+ URI("https://api.bitbucket.org/2.0/repositories/#{params[:owner]}/#{params[:repository]}/pullrequests"),
14
14
  {
15
- "destination": { "branch": { "name": _params[:target] } },
16
- "source": { "branch": { "name": _params[:head] } },
17
- "title": _params[:title],
18
- "description": _params[:description]
15
+ "destination": { "branch": { "name": params[:target] } },
16
+ "source": { "branch": { "name": params[:head] } },
17
+ "title": params[:title],
18
+ "description": params[:description]
19
19
  }.to_json,
20
- "Authorization": "Basic #{Base64.encode64("#{_params[:username]}:#{_params[:password]}").gsub("\n", '')}",
20
+ "Authorization": "Basic #{Base64.encode64("#{params[:username]}:#{params[:password]}").gsub("\n", '')}",
21
21
  "Content-Type": 'application/json'
22
22
  ).body)
23
23
 
@@ -25,7 +25,7 @@ module Fastlane
25
25
  raise(response['error']['message'])
26
26
  else
27
27
  UI.message('The pull request has been created successfully')
28
- UI.message("#{response['links']['html']['href']}")
28
+ UI.message((response['links']['html']['href']).to_s)
29
29
  response['links']['html']['href']
30
30
  end
31
31
  end
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module CreateBitbucketPullRequest
3
- VERSION = '0.2.0'
3
+ VERSION = '0.3.0'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane-plugin-create_bitbucket_pull_request
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Issarapong Poesua