File: webmock-repopulate

package info (click to toggle)
ruby-jekyll-github-metadata 2.15.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 712 kB
  • sloc: ruby: 2,355; javascript: 107; sh: 41; makefile: 6
file content (23 lines) | stat: -rwxr-xr-x 912 bytes parent folder | download | duplicates (2)
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"