Last active
April 26, 2019 16:46
-
-
Save esouthren/eb6564522c902e6b9ca0ceb4402a4e0d to your computer and use it in GitHub Desktop.
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
(params) => { | |
// use our data connection to get a list of all repository commits | |
let commits = api.run("this.list_commits", {owner: params.owner, repo: params.repo}); | |
// select a random commit from the list | |
var commit_count = commits.length; | |
var random_commit = commits[Math.floor(Math.random() * commit_count)]; | |
return random_commit; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment