-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add a call to octokit into the cli to just ensure vendored deps alway…
…s work
- Loading branch information
1 parent
cf5c173
commit 7649d95
Showing
2 changed files
with
14 additions
and
9 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -1,14 +1,16 @@ | ||
require "octokit" | ||
require "json" | ||
|
||
# auth via octokit.cr | ||
github = Octokit.client | ||
def github_version_check | ||
# auth via octokit.cr | ||
github = Octokit.client | ||
|
||
# fetch info about the crystal-base-template repo | ||
repo_data = github.get("/repos/GrantBirki/crystal-base-template/commits/main") | ||
# fetch info about the crystal-base-template repo | ||
repo_data = github.get("/repos/GrantBirki/crystal-base-template/commits/main") | ||
|
||
# convert the json string to a hash | ||
repo_data = JSON.parse(repo_data) | ||
# convert the json string to a hash | ||
repo_data = JSON.parse(repo_data) | ||
|
||
# print the latest sha of this template repo | ||
puts "current sha of crystal-base-template: #{repo_data["sha"]}" | ||
# print the latest sha of this template repo | ||
puts "current sha of crystal-base-template: #{repo_data["sha"]}" | ||
end |