fastlane/lib/fastlane/actions/create_pull_request.rb in fastlane-2.171.0 vs fastlane/lib/fastlane/actions/create_pull_request.rb in fastlane-2.172.0

- old
+ new

@@ -18,10 +18,11 @@ payload['draft'] = params[:draft] if params[:draft] GithubApiAction.run( server_url: params[:api_url], api_token: params[:api_token], + api_bearer: params[:api_bearer], http_method: 'POST', path: "repos/#{params[:repo]}/pulls", body: payload, error_handlers: { '*' => proc do |result| @@ -58,10 +59,11 @@ 'labels' => params[:labels] } GithubApiAction.run( server_url: params[:api_url], api_token: params[:api_token], + api_bearer: params[:api_bearer], http_method: 'PATCH', path: "repos/#{params[:repo]}/issues/#{number}", body: payload, error_handlers: { '*' => proc do |result| @@ -77,10 +79,11 @@ 'assignees' => params[:assignees] } GithubApiAction.run( server_url: params[:api_url], api_token: params[:api_token], + api_bearer: params[:api_bearer], http_method: 'POST', path: "repos/#{params[:repo]}/issues/#{number}/assignees", body: payload, error_handlers: { '*' => proc do |result| @@ -101,10 +104,11 @@ payload["team_reviewers"] = params[:team_reviewers] end GithubApiAction.run( server_url: params[:api_url], api_token: params[:api_token], + api_bearer: params[:api_bearer], http_method: 'POST', path: "repos/#{params[:repo]}/pulls/#{number}/requested_reviewers", body: payload, error_handlers: { '*' => proc do |result| @@ -122,10 +126,11 @@ end GithubApiAction.run( server_url: params[:api_url], api_token: params[:api_token], + api_bearer: params[:api_bearer], http_method: 'PATCH', path: "repos/#{params[:repo]}/issues/#{number}", body: payload, error_handlers: { '*' => proc do |result| @@ -159,10 +164,20 @@ sensitive: true, code_gen_sensitive: true, default_value: ENV["GITHUB_API_TOKEN"], default_value_dynamic: true, is_string: true, - optional: false), + conflicting_options: [:api_bearer], + optional: true), + FastlaneCore::ConfigItem.new(key: :api_bearer, + env_name: "GITHUB_PULL_REQUEST_API_BEARER", + description: "Use a Bearer authorization token. Usually generated by Github Apps, e.g. GitHub Actions GITHUB_TOKEN environment variable", + sensitive: true, + code_gen_sensitive: true, + is_string: true, + conflicting_options: [:api_token], + optional: true, + default_value: nil), FastlaneCore::ConfigItem.new(key: :repo, env_name: "GITHUB_PULL_REQUEST_REPO", description: "The name of the repository you want to submit the pull request to", is_string: true, optional: false),