[Bps-public-commit] rt-extension-travisci branch, master, updated. 2bc1a998a14f3ff13f2c88e4210bb4e034de8328

Dianne Skoll dianne at bestpractical.com
Mon Aug 31 12:10:28 EDT 2020


The branch, master has been updated
       via  2bc1a998a14f3ff13f2c88e4210bb4e034de8328 (commit)
      from  2784666d4051c8dd127eb20913e510bd44b44fa6 (commit)

Summary of changes:
 README                       | 25 +++++++++++++++++++------
 lib/RT/Extension/TravisCI.pm | 16 ++++++++++++++++
 2 files changed, 35 insertions(+), 6 deletions(-)

- Log -----------------------------------------------------------------
commit 2bc1a998a14f3ff13f2c88e4210bb4e034de8328
Author: Dianne Skoll <dianne at bestpractical.com>
Date:   Mon Aug 31 12:10:10 2020 -0400

    Document how the extension determines the project and branch names.

diff --git a/README b/README
index e600141..95973a8 100644
--- a/README
+++ b/README
@@ -21,19 +21,32 @@ INSTALLATION
 
     Edit your /opt/rt5/etc/RT_SiteConfig.d/TravisCI_Config.pm (creating it
     if necessary) using the included etc/TravisCI_Config.pm as a guide.
-        The settings you are most likely to want to change are SlugPrefix,
-        which should be your organization's identifier; DefaultProject,
-        Queues and AuthToken.
 
-        You will need to generate an authentication token as documented in
-        https://medium.com/@JoshuaTheMiller/retrieving-your-travis-ci-api-ac
-        cess-token-bc706b2b625a
+            The settings you are most likely to want to change are
+            SlugPrefix, which should be your organization's identifier;
+            DefaultProject, Queues and AuthToken.
+
+            You will need to generate an authentication token as documented
+            in
+            https://medium.com/@JoshuaTheMiller/retrieving-your-travis-ci-ap
+            i-access-token-bc706b2b625a
 
     Clear your mason cache
             rm -rf /opt/rt5/var/mason_data/obj
 
     Restart your webserver
 
+DETERMINING THE PROJECT AND BRANCH
+    To determine the project and branch names, the extension parses the
+    Subject of the ticket. If the subject matches:
+
+        /^([A-Za-z_.-]+)[\/ ](.+)/
+
+    then the first submatch is taken to be the project name and the second
+    to be the branch name. Otherwise, the project name is taken to be the
+    DefaultProject configuration variable in TravisCI_Config.pm, and the
+    branch name is taken to be the entire ticket subject.
+
 AUTHOR
     Best Practical Solutions, LLC <modules at bestpractical.com>
 
diff --git a/lib/RT/Extension/TravisCI.pm b/lib/RT/Extension/TravisCI.pm
index f1cfe1d..a1651a4 100644
--- a/lib/RT/Extension/TravisCI.pm
+++ b/lib/RT/Extension/TravisCI.pm
@@ -147,6 +147,8 @@ Add this line:
 =item Edit your F</opt/rt5/etc/RT_SiteConfig.d/TravisCI_Config.pm> (creating
 it if necessary) using the included F<etc/TravisCI_Config.pm> as a guide.
 
+=over
+
 The settings you are most likely to want to change are F<SlugPrefix>,
 which should be your organization's identifier; DefaultProject, Queues
 and AuthToken.
@@ -154,6 +156,8 @@ and AuthToken.
 You will need to generate an authentication token as documented in
 https://medium.com/@JoshuaTheMiller/retrieving-your-travis-ci-api-access-token-bc706b2b625a
 
+=back
+
 =item Clear your mason cache
 
     rm -rf /opt/rt5/var/mason_data/obj
@@ -162,6 +166,18 @@ https://medium.com/@JoshuaTheMiller/retrieving-your-travis-ci-api-access-token-b
 
 =back
 
+=head1 DETERMINING THE PROJECT AND BRANCH
+
+To determine the project and branch names, the extension parses the
+Subject of the ticket.  If the subject matches:
+
+    /^([A-Za-z_.-]+)[\/ ](.+)/
+
+then the first submatch is taken to be the project name and the second to
+be the branch name.  Otherwise, the project name is taken to be the
+DefaultProject configuration variable in TravisCI_Config.pm, and the
+branch name is taken to be the entire ticket subject.
+
 =head1 AUTHOR
 
 Best Practical Solutions, LLC E<lt>modules at bestpractical.comE<gt>

-----------------------------------------------------------------------


More information about the Bps-public-commit mailing list