Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use new app installation token endpoint #1055

Merged
merged 3 commits into from
Aug 20, 2018
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ env:
- OCTOKIT_TEST_GITHUB_CLIENT_SECRET='abcdefabcdefabcdefababcdefabcdefabcdefab'
- OCTOKIT_SILENT=true

before_install:
- gem update bundler

before_script:
- chmod 600 spec/fixtures/.netrc

Expand Down
2 changes: 1 addition & 1 deletion lib/octokit/client/apps.rb
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def installation(id, options = {})
# @return [<Sawyer::Resource>] An installation token
def create_app_installation_access_token(installation, options = {})
opts = ensure_api_media_type(:integrations, options)
post "installations/#{installation}/access_tokens", opts
post "app/installations/#{installation}/access_tokens", opts
end
alias create_installation_access_token create_app_installation_access_token

Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"http_interactions":[{"request":{"method":"post","uri":"https://api.github.com/installations/<GITHUB_TEST_INTEGRATION_INSTALLATION>/access_tokens","body":{"encoding":"UTF-8","base64_string":"e30=\n"},"headers":{"Accept":["Accept: application/vnd.github.machine-man-preview+json"],"User-Agent":["Octokit Ruby Gem 4.6.2"],"Content-Type":["application/json"],"Authorization":["Bearer <JWT_BEARER_TOKEN>"],"Accept-Encoding":["gzip;q=1.0,deflate;q=0.6,identity;q=0.3"]}},"response":{"status":{"code":201,"message":"Created"},"headers":{"Server":["GitHub.com"],"Date":["Mon, 06 Mar 2017 22:17:47 GMT"],"Content-Type":["application/json; charset=utf-8"],"Content-Length":["91"],"Status":["201 Created"],"Cache-Control":["public, max-age=60, s-maxage=60"],"Vary":["Accept","Accept-Encoding"],"Etag":["\"83917a71bf249be99ee77175bb60d68b\""],"X-Github-Media-Type":["github.machine-man-preview; format=json"],"Access-Control-Expose-Headers":["ETag, Link, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval"],"Access-Control-Allow-Origin":["*"],"Content-Security-Policy":["default-src 'none'"],"Strict-Transport-Security":["max-age=31536000; includeSubdomains; preload"],"X-Content-Type-Options":["nosniff"],"X-Frame-Options":["deny"],"X-Xss-Protection":["1; mode=block"],"X-Served-By":["46808ddc41c302090177e58148908b23"],"X-Github-Request-Id":["BAEE:6D3A:228592D:2BCB64D:58BDE00B"]},"body":{"encoding":"UTF-8","base64_string":"eyJ0b2tlbiI6InYxLjFhNTk3NDc0ZDE5ODExM2FjYWJjMGJjNGU1NDRmMGNl\nYTAyMTM5MDkiLCJleHBpcmVzX2F0IjoiMjAxNy0wMy0wNlQyMzoxNzo0N1oi\nfQ==\n"},"http_version":null},"recorded_at":"Mon, 06 Mar 2017 22:17:47 GMT"}],"recorded_with":"VCR 2.9.3"}
{"http_interactions":[{"request":{"method":"post","uri":"https://api.github.com/app/installations/<GITHUB_TEST_INTEGRATION_INSTALLATION>/access_tokens","body":{"encoding":"UTF-8","base64_string":"e30=\n"},"headers":{"Accept":["Accept: application/vnd.github.machine-man-preview+json"],"User-Agent":["Octokit Ruby Gem 4.6.2"],"Content-Type":["application/json"],"Authorization":["Bearer <JWT_BEARER_TOKEN>"],"Accept-Encoding":["gzip;q=1.0,deflate;q=0.6,identity;q=0.3"]}},"response":{"status":{"code":201,"message":"Created"},"headers":{"Server":["GitHub.com"],"Date":["Mon, 06 Mar 2017 22:17:47 GMT"],"Content-Type":["application/json; charset=utf-8"],"Content-Length":["91"],"Status":["201 Created"],"Cache-Control":["public, max-age=60, s-maxage=60"],"Vary":["Accept","Accept-Encoding"],"Etag":["\"83917a71bf249be99ee77175bb60d68b\""],"X-Github-Media-Type":["github.machine-man-preview; format=json"],"Access-Control-Expose-Headers":["ETag, Link, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval"],"Access-Control-Allow-Origin":["*"],"Content-Security-Policy":["default-src 'none'"],"Strict-Transport-Security":["max-age=31536000; includeSubdomains; preload"],"X-Content-Type-Options":["nosniff"],"X-Frame-Options":["deny"],"X-Xss-Protection":["1; mode=block"],"X-Served-By":["46808ddc41c302090177e58148908b23"],"X-Github-Request-Id":["BAEE:6D3A:228592D:2BCB64D:58BDE00B"]},"body":{"encoding":"UTF-8","base64_string":"eyJ0b2tlbiI6InYxLjFhNTk3NDc0ZDE5ODExM2FjYWJjMGJjNGU1NDRmMGNl\nYTAyMTM5MDkiLCJleHBpcmVzX2F0IjoiMjAxNy0wMy0wNlQyMzoxNzo0N1oi\nfQ==\n"},"http_version":null},"recorded_at":"Mon, 06 Mar 2017 22:17:47 GMT"}],"recorded_with":"VCR 2.9.3"}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"http_interactions":[{"request":{"method":"post","uri":"https://api.github.com/installations/<GITHUB_TEST_INTEGRATION_INSTALLATION>/access_tokens","body":{"encoding":"UTF-8","base64_string":"e30=\n"},"headers":{"Accept":["Accept: application/vnd.github.machine-man-preview+json"],"User-Agent":["Octokit Ruby Gem 4.6.2"],"Content-Type":["application/json"],"Authorization":["Bearer <JWT_BEARER_TOKEN>"],"Accept-Encoding":["gzip;q=1.0,deflate;q=0.6,identity;q=0.3"]}},"response":{"status":{"code":201,"message":"Created"},"headers":{"Server":["GitHub.com"],"Date":["Mon, 06 Mar 2017 22:17:47 GMT"],"Content-Type":["application/json; charset=utf-8"],"Content-Length":["91"],"Status":["201 Created"],"Cache-Control":["public, max-age=60, s-maxage=60"],"Vary":["Accept","Accept-Encoding"],"Etag":["\"83917a71bf249be99ee77175bb60d68b\""],"X-Github-Media-Type":["github.machine-man-preview; format=json"],"Access-Control-Expose-Headers":["ETag, Link, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval"],"Access-Control-Allow-Origin":["*"],"Content-Security-Policy":["default-src 'none'"],"Strict-Transport-Security":["max-age=31536000; includeSubdomains; preload"],"X-Content-Type-Options":["nosniff"],"X-Frame-Options":["deny"],"X-Xss-Protection":["1; mode=block"],"X-Served-By":["46808ddc41c302090177e58148908b23"],"X-Github-Request-Id":["BAEE:6D3A:228592D:2BCB64D:58BDE00B"]},"body":{"encoding":"UTF-8","base64_string":"eyJ0b2tlbiI6InYxLjFhNTk3NDc0ZDE5ODExM2FjYWJjMGJjNGU1NDRmMGNl\nYTAyMTM5MDkiLCJleHBpcmVzX2F0IjoiMjAxNy0wMy0wNlQyMzoxNzo0N1oi\nfQ==\n"},"http_version":null},"recorded_at":"Mon, 06 Mar 2017 22:17:47 GMT"}],"recorded_with":"VCR 2.9.3"}
{"http_interactions":[{"request":{"method":"post","uri":"https://api.github.com/app/installations/<GITHUB_TEST_INTEGRATION_INSTALLATION>/access_tokens","body":{"encoding":"UTF-8","base64_string":"e30=\n"},"headers":{"Accept":["Accept: application/vnd.github.machine-man-preview+json"],"User-Agent":["Octokit Ruby Gem 4.6.2"],"Content-Type":["application/json"],"Authorization":["Bearer <JWT_BEARER_TOKEN>"],"Accept-Encoding":["gzip;q=1.0,deflate;q=0.6,identity;q=0.3"]}},"response":{"status":{"code":201,"message":"Created"},"headers":{"Server":["GitHub.com"],"Date":["Mon, 06 Mar 2017 22:17:47 GMT"],"Content-Type":["application/json; charset=utf-8"],"Content-Length":["91"],"Status":["201 Created"],"Cache-Control":["public, max-age=60, s-maxage=60"],"Vary":["Accept","Accept-Encoding"],"Etag":["\"83917a71bf249be99ee77175bb60d68b\""],"X-Github-Media-Type":["github.machine-man-preview; format=json"],"Access-Control-Expose-Headers":["ETag, Link, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval"],"Access-Control-Allow-Origin":["*"],"Content-Security-Policy":["default-src 'none'"],"Strict-Transport-Security":["max-age=31536000; includeSubdomains; preload"],"X-Content-Type-Options":["nosniff"],"X-Frame-Options":["deny"],"X-Xss-Protection":["1; mode=block"],"X-Served-By":["46808ddc41c302090177e58148908b23"],"X-Github-Request-Id":["BAEE:6D3A:228592D:2BCB64D:58BDE00B"]},"body":{"encoding":"UTF-8","base64_string":"eyJ0b2tlbiI6InYxLjFhNTk3NDc0ZDE5ODExM2FjYWJjMGJjNGU1NDRmMGNl\nYTAyMTM5MDkiLCJleHBpcmVzX2F0IjoiMjAxNy0wMy0wNlQyMzoxNzo0N1oi\nfQ==\n"},"http_version":null},"recorded_at":"Mon, 06 Mar 2017 22:17:47 GMT"}],"recorded_with":"VCR 2.9.3"}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"http_interactions":[{"request":{"method":"post","uri":"https://api.github.com/installations/<GITHUB_TEST_INTEGRATION_INSTALLATION>/access_tokens","body":{"encoding":"UTF-8","base64_string":"e30=\n"},"headers":{"Accept":["Accept: application/vnd.github.machine-man-preview+json"],"User-Agent":["Octokit Ruby Gem 4.6.2"],"Content-Type":["application/json"],"Authorization":["Bearer <JWT_BEARER_TOKEN>"],"Accept-Encoding":["gzip;q=1.0,deflate;q=0.6,identity;q=0.3"]}},"response":{"status":{"code":201,"message":"Created"},"headers":{"Server":["GitHub.com"],"Date":["Mon, 06 Mar 2017 22:17:46 GMT"],"Content-Type":["application/json; charset=utf-8"],"Content-Length":["91"],"Status":["201 Created"],"Cache-Control":["public, max-age=60, s-maxage=60"],"Vary":["Accept","Accept-Encoding"],"Etag":["\"9c28b7cee2e0b9b206e1e9724ba4ec76\""],"X-Github-Media-Type":["github.machine-man-preview; format=json"],"Access-Control-Expose-Headers":["ETag, Link, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval"],"Access-Control-Allow-Origin":["*"],"Content-Security-Policy":["default-src 'none'"],"Strict-Transport-Security":["max-age=31536000; includeSubdomains; preload"],"X-Content-Type-Options":["nosniff"],"X-Frame-Options":["deny"],"X-Xss-Protection":["1; mode=block"],"X-Served-By":["139317cebd6caf9cd03889139437f00b"],"X-Github-Request-Id":["9C39:6D38:14B3D66:1A5EEB7:58BDE00A"]},"body":{"encoding":"UTF-8","base64_string":"eyJ0b2tlbiI6IjxJTlRFR1JBVElPTl9JTlNUQUxMQVRJT05fVE9LRU4+Iiwi\nZXhwaXJlc19hdCI6IjIwMTctMDMtMDZUMjM6MTc6NDZaIn0=\n"},"http_version":null},"recorded_at":"Mon, 06 Mar 2017 22:17:46 GMT"},{"request":{"method":"get","uri":"https://api.github.com/installation/repositories?per_page=1","body":{"encoding":"US-ASCII","base64_string":""},"headers":{"Accept":["Accept: application/vnd.github.machine-man-preview+json"],"User-Agent":["Octokit Ruby Gem 4.6.2"],"Content-Type":["application/json"],"Authorization":["token <INTEGRATION_INSTALLATION_TOKEN>"],"Accept-Encoding":["gzip;q=1.0,deflate;q=0.6,identity;q=0.3"]}},"response":{"status":{"code":200,"message":"OK"},"headers":{"Server":["GitHub.com"],"Date":["Mon, 06 Mar 2017 22:17:46 GMT"],"Content-Type":["application/json; charset=utf-8"],"Transfer-Encoding":["chunked"],"Status":["200 OK"],"X-Ratelimit-Limit":["5000"],"X-Ratelimit-Remaining":["4998"],"X-Ratelimit-Reset":["1488841510"],"Cache-Control":["private, max-age=60, s-maxage=60"],"Vary":["Accept, Authorization, Cookie, X-GitHub-OTP","Accept-Encoding"],"Etag":["W/\"98248acd97b07729e82e7fea4e6680ef\""],"X-Github-Media-Type":["github.machine-man-preview; format=json"],"Link":["<https://api.github.com/installation/repositories?per_page=1&page=2>; rel=\"next\", <https://api.github.com/installation/repositories?per_page=1&page=2>; rel=\"last\""],"Access-Control-Expose-Headers":["ETag, Link, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval"],"Access-Control-Allow-Origin":["*"],"Content-Security-Policy":["default-src 'none'"],"Strict-Transport-Security":["max-age=31536000; includeSubdomains; preload"],"X-Content-Type-Options":["nosniff"],"X-Frame-Options":["deny"],"X-Xss-Protection":["1; mode=block"],"X-Served-By":["ef96c2e493b28ffea49b891b085ed2dd"],"X-Github-Request-Id":["8CEE:6D3A:228590D:2BCB621:58BDE00A"]},"body":{"encoding":"ASCII-8BIT","base64_string":"eyJ0b3RhbF9jb3VudCI6MiwicmVwb3NpdG9yaWVzIjpbeyJpZCI6MX1dfQ==\n"},"http_version":null},"recorded_at":"Mon, 06 Mar 2017 22:17:46 GMT"},{"request":{"method":"get","uri":"https://api.github.com/installation/repositories?page=2&per_page=1","body":{"encoding":"US-ASCII","base64_string":""},"headers":{"Accept":["Accept: application/vnd.github.machine-man-preview+json"],"User-Agent":["Octokit Ruby Gem 4.6.2"],"Content-Type":["application/json"],"Authorization":["token <INTEGRATION_INSTALLATION_TOKEN>"],"Accept-Encoding":["gzip;q=1.0,deflate;q=0.6,identity;q=0.3"]}},"response":{"status":{"code":200,"message":"OK"},"headers":{"Server":["GitHub.com"],"Date":["Mon, 06 Mar 2017 22:17:46 GMT"],"Content-Type":["application/json; charset=utf-8"],"Transfer-Encoding":["chunked"],"Status":["200 OK"],"X-Ratelimit-Limit":["5000"],"X-Ratelimit-Remaining":["4998"],"X-Ratelimit-Reset":["1488841510"],"Cache-Control":["private, max-age=60, s-maxage=60"],"Vary":["Accept, Authorization, Cookie, X-GitHub-OTP","Accept-Encoding"],"Etag":["W/\"88248acd97b07729e82e7fea4e6680ef\""],"X-Github-Media-Type":["github.machine-man-preview; format=json"],"Link":["<https://api.github.com/installation/repositories?per_page=1&page=1>; rel=\"prev\", <https://api.github.com/installation/repositories?per_page=1&page=1>; rel=\"first\""],"Access-Control-Expose-Headers":["ETag, Link, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval"],"Access-Control-Allow-Origin":["*"],"Content-Security-Policy":["default-src 'none'"],"Strict-Transport-Security":["max-age=31536000; includeSubdomains; preload"],"X-Content-Type-Options":["nosniff"],"X-Frame-Options":["deny"],"X-Xss-Protection":["1; mode=block"],"X-Served-By":["ef96c2e493b28ffea49b891b085ed2dd"],"X-Github-Request-Id":["8CEE:6D3A:228590D:2BCB621:58BDE00A"]},"body":{"encoding":"ASCII-8BIT","base64_string":"eyJ0b3RhbF9jb3VudCI6MiwicmVwb3NpdG9yaWVzIjpbeyJpZCI6Mn1dfQ==\n"},"http_version":null},"recorded_at":"Mon, 06 Mar 2017 22:17:46 GMT"}],"recorded_with":"VCR 2.9.3"}
{"http_interactions":[{"request":{"method":"post","uri":"https://api.github.com/app/installations/<GITHUB_TEST_INTEGRATION_INSTALLATION>/access_tokens","body":{"encoding":"UTF-8","base64_string":"e30=\n"},"headers":{"Accept":["Accept: application/vnd.github.machine-man-preview+json"],"User-Agent":["Octokit Ruby Gem 4.6.2"],"Content-Type":["application/json"],"Authorization":["Bearer <JWT_BEARER_TOKEN>"],"Accept-Encoding":["gzip;q=1.0,deflate;q=0.6,identity;q=0.3"]}},"response":{"status":{"code":201,"message":"Created"},"headers":{"Server":["GitHub.com"],"Date":["Mon, 06 Mar 2017 22:17:46 GMT"],"Content-Type":["application/json; charset=utf-8"],"Content-Length":["91"],"Status":["201 Created"],"Cache-Control":["public, max-age=60, s-maxage=60"],"Vary":["Accept","Accept-Encoding"],"Etag":["\"9c28b7cee2e0b9b206e1e9724ba4ec76\""],"X-Github-Media-Type":["github.machine-man-preview; format=json"],"Access-Control-Expose-Headers":["ETag, Link, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval"],"Access-Control-Allow-Origin":["*"],"Content-Security-Policy":["default-src 'none'"],"Strict-Transport-Security":["max-age=31536000; includeSubdomains; preload"],"X-Content-Type-Options":["nosniff"],"X-Frame-Options":["deny"],"X-Xss-Protection":["1; mode=block"],"X-Served-By":["139317cebd6caf9cd03889139437f00b"],"X-Github-Request-Id":["9C39:6D38:14B3D66:1A5EEB7:58BDE00A"]},"body":{"encoding":"UTF-8","base64_string":"eyJ0b2tlbiI6IjxJTlRFR1JBVElPTl9JTlNUQUxMQVRJT05fVE9LRU4+Iiwi\nZXhwaXJlc19hdCI6IjIwMTctMDMtMDZUMjM6MTc6NDZaIn0=\n"},"http_version":null},"recorded_at":"Mon, 06 Mar 2017 22:17:46 GMT"},{"request":{"method":"get","uri":"https://api.github.com/installation/repositories?per_page=1","body":{"encoding":"US-ASCII","base64_string":""},"headers":{"Accept":["Accept: application/vnd.github.machine-man-preview+json"],"User-Agent":["Octokit Ruby Gem 4.6.2"],"Content-Type":["application/json"],"Authorization":["token <INTEGRATION_INSTALLATION_TOKEN>"],"Accept-Encoding":["gzip;q=1.0,deflate;q=0.6,identity;q=0.3"]}},"response":{"status":{"code":200,"message":"OK"},"headers":{"Server":["GitHub.com"],"Date":["Mon, 06 Mar 2017 22:17:46 GMT"],"Content-Type":["application/json; charset=utf-8"],"Transfer-Encoding":["chunked"],"Status":["200 OK"],"X-Ratelimit-Limit":["5000"],"X-Ratelimit-Remaining":["4998"],"X-Ratelimit-Reset":["1488841510"],"Cache-Control":["private, max-age=60, s-maxage=60"],"Vary":["Accept, Authorization, Cookie, X-GitHub-OTP","Accept-Encoding"],"Etag":["W/\"98248acd97b07729e82e7fea4e6680ef\""],"X-Github-Media-Type":["github.machine-man-preview; format=json"],"Link":["<https://api.github.com/installation/repositories?per_page=1&page=2>; rel=\"next\", <https://api.github.com/installation/repositories?per_page=1&page=2>; rel=\"last\""],"Access-Control-Expose-Headers":["ETag, Link, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval"],"Access-Control-Allow-Origin":["*"],"Content-Security-Policy":["default-src 'none'"],"Strict-Transport-Security":["max-age=31536000; includeSubdomains; preload"],"X-Content-Type-Options":["nosniff"],"X-Frame-Options":["deny"],"X-Xss-Protection":["1; mode=block"],"X-Served-By":["ef96c2e493b28ffea49b891b085ed2dd"],"X-Github-Request-Id":["8CEE:6D3A:228590D:2BCB621:58BDE00A"]},"body":{"encoding":"ASCII-8BIT","base64_string":"eyJ0b3RhbF9jb3VudCI6MiwicmVwb3NpdG9yaWVzIjpbeyJpZCI6MX1dfQ==\n"},"http_version":null},"recorded_at":"Mon, 06 Mar 2017 22:17:46 GMT"},{"request":{"method":"get","uri":"https://api.github.com/installation/repositories?page=2&per_page=1","body":{"encoding":"US-ASCII","base64_string":""},"headers":{"Accept":["Accept: application/vnd.github.machine-man-preview+json"],"User-Agent":["Octokit Ruby Gem 4.6.2"],"Content-Type":["application/json"],"Authorization":["token <INTEGRATION_INSTALLATION_TOKEN>"],"Accept-Encoding":["gzip;q=1.0,deflate;q=0.6,identity;q=0.3"]}},"response":{"status":{"code":200,"message":"OK"},"headers":{"Server":["GitHub.com"],"Date":["Mon, 06 Mar 2017 22:17:46 GMT"],"Content-Type":["application/json; charset=utf-8"],"Transfer-Encoding":["chunked"],"Status":["200 OK"],"X-Ratelimit-Limit":["5000"],"X-Ratelimit-Remaining":["4998"],"X-Ratelimit-Reset":["1488841510"],"Cache-Control":["private, max-age=60, s-maxage=60"],"Vary":["Accept, Authorization, Cookie, X-GitHub-OTP","Accept-Encoding"],"Etag":["W/\"88248acd97b07729e82e7fea4e6680ef\""],"X-Github-Media-Type":["github.machine-man-preview; format=json"],"Link":["<https://api.github.com/installation/repositories?per_page=1&page=1>; rel=\"prev\", <https://api.github.com/installation/repositories?per_page=1&page=1>; rel=\"first\""],"Access-Control-Expose-Headers":["ETag, Link, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval"],"Access-Control-Allow-Origin":["*"],"Content-Security-Policy":["default-src 'none'"],"Strict-Transport-Security":["max-age=31536000; includeSubdomains; preload"],"X-Content-Type-Options":["nosniff"],"X-Frame-Options":["deny"],"X-Xss-Protection":["1; mode=block"],"X-Served-By":["ef96c2e493b28ffea49b891b085ed2dd"],"X-Github-Request-Id":["8CEE:6D3A:228590D:2BCB621:58BDE00A"]},"body":{"encoding":"ASCII-8BIT","base64_string":"eyJ0b3RhbF9jb3VudCI6MiwicmVwb3NpdG9yaWVzIjpbeyJpZCI6Mn1dfQ==\n"},"http_version":null},"recorded_at":"Mon, 06 Mar 2017 22:17:46 GMT"}],"recorded_with":"VCR 2.9.3"}

Large diffs are not rendered by default.

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions spec/octokit/client/apps_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@
expect(response.token).not_to be_nil
expect(response.expires_at).not_to be_nil

assert_requested :post, github_url("/installations/#{installation}/access_tokens")
assert_requested :post, github_url("/app/installations/#{installation}/access_tokens")
expect(@jwt_client).to have_received(:octokit_warn).with(/Deprecated/)
end
end # .create_integration_installation_access_token
Expand All @@ -144,15 +144,15 @@
expect(response.token).not_to be_nil
expect(response.expires_at).not_to be_nil

assert_requested :post, github_url("/installations/#{installation}/access_tokens")
assert_requested :post, github_url("/app/installations/#{installation}/access_tokens")
end

it "works for GitHub Enterprise installs" do
client = Octokit::Client.new \
bearer_token: new_jwt_token,
api_endpoint: "https://ghe.local/api/v3"

path = "installations/1234/access_tokens"
path = "app/installations/1234/access_tokens"
request = stub_post("https://ghe.local/api/v3/#{path}")
response = client.create_app_installation_access_token(1234, accept: preview_header)

Expand Down