Code changes for updating Drop comment in PR (#1837)
This commit is contained in:
Родитель
781e218660
Коммит
c6f9ceca44
1
Gemfile
1
Gemfile
|
@ -12,6 +12,7 @@ group :development, :test do
|
|||
gem 'vcr'
|
||||
end
|
||||
|
||||
gem 'octokit', '~> 4.0'
|
||||
gem 'azure_mgmt_analysis_services', path: 'management/azure_mgmt_analysis_services'
|
||||
gem 'azure_mgmt_api_management', path: 'management/azure_mgmt_api_management'
|
||||
gem 'azure_mgmt_authorization', path: 'management/azure_mgmt_authorization'
|
||||
|
|
|
@ -0,0 +1,24 @@
|
|||
# encoding: utf-8
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
|
||||
require 'octokit'
|
||||
|
||||
github_access_token = ARGV[0]
|
||||
pull_request_number = ARGV[1]
|
||||
build_number = ARGV[2]
|
||||
|
||||
comment_body = "
|
||||
# Ruby Build Drop - Direct download
|
||||
The Gem file (zipped version) could be downloaded [here](https://azuresdkci.westus2.cloudapp.azure.com/job/RubylangSDK_BuildDrop/#{build_number}/Azure/processDownloadRequest/azure-sdk-for-ruby/pullrequests/#{pull_request_number}/azure-sdk-for-ruby_pr#{pull_request_number}.tar.gz).
|
||||
"
|
||||
|
||||
gh_client = Octokit::Client.new(
|
||||
:access_token => github_access_token
|
||||
)
|
||||
|
||||
gh_client.add_comment(
|
||||
"Azure/azure-sdk-for-ruby",
|
||||
pull_request_number,
|
||||
comment_body
|
||||
)
|
Загрузка…
Ссылка в новой задаче