whimsical-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject [whimsy] branch master updated: Give access to :git section of repository.yml
Date Mon, 25 Nov 2019 20:11:51 GMT
This is an automated email from the ASF dual-hosted git repository.

sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git


The following commit(s) were added to refs/heads/master by this push:
     new 0b74e9c  Give access to :git section of repository.yml
0b74e9c is described below

commit 0b74e9c329a72783717059063ef874a999472339
Author: Sebb <sebb@apache.org>
AuthorDate: Mon Nov 25 20:11:47 2019 +0000

    Give access to :git section of repository.yml
---
 lib/whimsy/asf/git.rb | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/lib/whimsy/asf/git.rb b/lib/whimsy/asf/git.rb
index de5fa6b..2e3d084 100644
--- a/lib/whimsy/asf/git.rb
+++ b/lib/whimsy/asf/git.rb
@@ -34,6 +34,7 @@ module ASF
 
     @semaphore = Mutex.new
     @@repository_mtime = nil
+    @@repository_entries = nil
 
     #
     # Scan a list of git directories, looking for local clones.
@@ -49,6 +50,7 @@ module ASF
 
         unless @repos
           @@repository_mtime = File.exist?(REPOSITORY) && File.mtime(REPOSITORY)
+          @@repository_entries = YAML.load_file(REPOSITORY)
 
           @repos = Hash[Dir[*git].map { |name|
             next unless Dir.exist? name.untaint
@@ -66,6 +68,12 @@ module ASF
       end
     end
 
+    # Get all the Git repo entries
+    def self.repo_entries
+      self.repos # refresh @@repository_entries
+      @@repository_entries[:git]
+    end
+
     #
     # Find a local git clone.  Raises an exception if not found.
     #


Mime
View raw message