Skip to content

Commit

Permalink
Merge pull request #537 from LinqLover/feat/github-shortcuts
Browse files Browse the repository at this point in the history
Add shortcuts for fetching GitHub repositories
  • Loading branch information
LinqLover authored Feb 16, 2021
2 parents f336f66 + 97a0bb1 commit a2336b0
Show file tree
Hide file tree
Showing 8 changed files with 116 additions and 11 deletions.
1 change: 1 addition & 0 deletions docs/MetacelloScriptingAPI.md
Original file line number Diff line number Diff line change
Expand Up @@ -536,6 +536,7 @@ is rooted in the projects HOME directory.
* croquet:
* filetreeDirectory:
* gemsource:
* githubUser:project:path:
* githubUser:project:commitish:path:
* impara:
* renggli:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
api repository shortcuts
githubUser: userName project: projectName commitish: commitish path: path
| branchOrCommitOrTag |
branchOrCommitOrTag := commitish.
branchOrCommitOrTag isEmpty
ifTrue: [ branchOrCommitOrTag := 'master' ].
self
repository:
'github://' , userName , '/' , projectName , ':' , branchOrCommitOrTag , '/'
, path
"commitish can be a branch name, commit hash, or tag."

self repository: (
'github://' , userName , '/' , projectName , (
(commitish isNil or: [commitish isEmpty])
ifTrue: ['']
ifFalse: [':' , commitish]
) , '/' , path)
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
api repository shortcuts
githubUser: userName project: projectName path: path

^ self
githubUser: userName
project: projectName
commitish: nil
path: path
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
"filetreeDirectory:" : "dkh 07/25/2013 15:21",
"gemsource:" : "dkh 06/28/2013 16:52",
"get" : "dkh 09/30/2014 13:59",
"githubUser:project:commitish:path:" : "dkh 07/25/2013 15:26",
"githubUser:project:path:" : "ct 11/7/2020 20:12",
"githubUser:project:commitish:path:" : "ct 11/7/2020 20:15",
"ignoreImage" : "dkh 6/13/2012 16:05",
"impara:" : "dkh 7/17/2012 16:48",
"list" : "dkh 09/30/2014 14:00",
Expand Down
75 changes: 74 additions & 1 deletion repository/Metacello-Base.package/monticello.meta/version

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
tests
testGettingStartedWithGitHub2
Metacello new
baseline: 'External';
githubUser: 'dalehenrich' project: 'external' commitish: MetacelloScriptingResource externalCustomSHA path: 'repository';
load.
Metacello image
baseline: 'External';
get;
load
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
tests
testGettingStartedWithGitHub3
Metacello new
baseline: 'External';
githubUser: 'dalehenrich' project: 'external' path: 'repository';
load.
Metacello image
baseline: 'External';
get;
load
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,7 @@
},
"instance" : {
"disableUndefinedSymbolTracking" : "dkh 07/06/2016 15:59",
"testGettingStartedWithGitHub1" : "dkh 07/06/2016 16:00",
"testGettingStartedWithGitHub1" : "dkh 07/06/2016 16:00",
"testGettingStartedWithGitHub2" : "ct 02/15/2021 20:10",
"testGettingStartedWithGitHub3" : "ct 02/15/2021 20:10",
"testLockCommandReference6" : "dkh 07/06/2016 16:00" } }

0 comments on commit a2336b0

Please sign in to comment.