forked from pantheon-systems/drops-7
-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1530032847: Proposed release for 7.x-1.15.2 (#68)
* Update dkan to 7.x-1.15.2 release
- Loading branch information
Showing
1,027 changed files
with
31,287 additions
and
12,558 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
require 'json' | ||
require 'uri' | ||
require 'net/http' | ||
require 'fileutils' | ||
require 'git' | ||
|
||
include FileUtils | ||
include Git | ||
|
||
# Get the list of files from a PR | ||
def get_pr_files(user, repo, pr) | ||
uri = URI.parse("https://api.github.com/repos/#{user}/#{repo}/pulls/#{pr}/files") | ||
|
||
http = Net::HTTP.new(uri.host, uri.port) | ||
request = Net::HTTP::Get.new(uri.request_uri) | ||
http.use_ssl = true | ||
response = http.request(request) | ||
result = JSON.parse(response.body) | ||
files = Array.new | ||
|
||
result.each do |i| | ||
files.push(i['filename']) | ||
end | ||
|
||
return files | ||
end | ||
|
||
if 1==1 | ||
user = 'GetDKAN' | ||
repo = 'dkan' | ||
pr = '2454' | ||
files = get_pr_files(user, repo, pr) | ||
elsif ARGV.any? | ||
files = ARGV | ||
else | ||
FileUtils.cd 'dkan' | ||
g = Git.open('.') | ||
files = g.diff.name_status.select{|k,v| v != "D"}.keys | ||
FileUtils.cd '..' | ||
end | ||
|
||
if files.any? | ||
# Filter file list for approved file types | ||
files.select!{ |i| i[/\.*(\.php|\.inc|\.module|\.install|\.profile|\.info)$/] } | ||
if files.any? | ||
files.map! {|item| 'dkan/' + item} | ||
puts "Linting files:\n" + files.join("\n") | ||
puts `dkan/test/bin/phpcs --standard=Drupal,DrupalPractice -n --ignore=test/dkanextension/*,patches/* #{files.join(" ")}` | ||
else | ||
puts "No files available to lint; ending." | ||
end | ||
end |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.