forked from jekyll/github-metadata
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwebmock-repopulate
More file actions
executable file
·23 lines (20 loc) · 912 Bytes
/
webmock-repopulate
File metadata and controls
executable file
·23 lines (20 loc) · 912 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/bash
set -e
curl_me() {
(set -x; curl \
-H "Authorization: token $GITHUB_TOKEN" \
-H "Accept: application/vnd.github.${3:-v3}+json" \
-H "Accept-Encoding: gzip;q=1.0,deflate;q=0.6,identity;q=0.3" \
-H "Content-Type: application/json" \
-H "User-Agent: Octokit Ruby Gem 4.2.0" \
https://api.github.com${1} | gunzip > \
spec/webmock/api_get_${2}.json)
}
curl_me "/repos/jekyll/github-metadata?per_page=100" "repo"
curl_me "/repos/jekyll/github-metadata/contributors?per_page=100" "repo_contributors"
curl_me "/repos/jekyll/github-metadata/releases?per_page=100" "repo_releases"
curl_me "/orgs/jekyll" "org"
curl_me "/orgs/jekyll/public_members" "org_members"
curl_me "/users/jekyll/repos?per_page=100&type=public" "owner_repos" "mercy-preview"
curl_me "/repos/jekyll/github-metadata/pages" "repo_pages"
curl_me "/repos/jekyll/github-metadata/releases/latest" "latest_release"