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

Add GraalPy support #694

Merged
merged 18 commits into from
Oct 10, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Fix lint errors
  • Loading branch information
msimacek committed Aug 30, 2023
commit 546edbcc912898aa22c0d794cf8454ffec8a02e9
6 changes: 3 additions & 3 deletions dist/setup/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -69657,7 +69657,7 @@ exports.installGraalPy = installGraalPy;
function getAvailableGraalPyVersions() {
return __awaiter(this, void 0, void 0, function* () {
const http = new httpm.HttpClient('tool-cache');
let headers = {};
const headers = {};
if (AUTH) {
headers.authorization = AUTH;
}
Expand Down Expand Up @@ -70518,11 +70518,11 @@ function getNextPageUrl(response) {
const responseHeaders = response.headers;
const linkHeader = responseHeaders.link;
if (typeof linkHeader === 'string') {
for (let link of linkHeader.split(/\s*,\s*/)) {
for (const link of linkHeader.split(/\s*,\s*/)) {
const match = link.match(/<([^>]+)>(.*)/);
if (match) {
const url = match[1];
for (let param of match[2].split(/\s*;\s*/)) {
for (const param of match[2].split(/\s*;\s*/)) {
if (param.match(/rel="?next"?/)) {
return url;
}
Expand Down
2 changes: 1 addition & 1 deletion src/install-graalpy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ export async function installGraalPy(
export async function getAvailableGraalPyVersions() {
timfel marked this conversation as resolved.
Show resolved Hide resolved
const http: httpm.HttpClient = new httpm.HttpClient('tool-cache');
timfel marked this conversation as resolved.
Show resolved Hide resolved

let headers: ifm.IHeaders = {};
const headers: ifm.IHeaders = {};
if (AUTH) {
headers.authorization = AUTH;
}
Expand Down
4 changes: 2 additions & 2 deletions src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -280,11 +280,11 @@ export function getNextPageUrl<T>(response: ifm.ITypedResponse<T>) {
const responseHeaders = <ifm.IHeaders>response.headers;
const linkHeader = responseHeaders.link;
if (typeof linkHeader === 'string') {
for (let link of linkHeader.split(/\s*,\s*/)) {
for (const link of linkHeader.split(/\s*,\s*/)) {
const match = link.match(/<([^>]+)>(.*)/);
if (match) {
const url = match[1];
for (let param of match[2].split(/\s*;\s*/)) {
for (const param of match[2].split(/\s*;\s*/)) {
if (param.match(/rel="?next"?/)) {
return url;
}
Expand Down