Compare commits

...

4 Commits

Author SHA1 Message Date
Milos Pantic
98a38d1cca
Merge d87ca55394 into 16ef37f8dd 2023-12-01 13:02:43 -08:00
Peter Murray
16ef37f8dd
HTTP errors when the token is undefined (#556)
* Fixing issues with the handling of the token and avoiding error on when the token is undefined

* chore: rebuild action

---------

Co-authored-by: Ivan Zosimov <ivanzosimov@github.com>
2023-12-01 14:55:03 +01:00
panticmilos
d87ca55394 Update new pull request template 2022-12-14 16:07:42 +01:00
panticmilos
99163b5ebf Add templates for new Java distributions 2022-12-14 16:06:54 +01:00
5 changed files with 49 additions and 3 deletions

View File

@ -0,0 +1,22 @@
---
name: New Java distribution template
about: Suggest a new Java distribution request
title: ''
labels: new-distribution
assignees: ''
---
**Description:**
Describe your proposal.
**Justification:**
Justification or a use case for your proposal.
**Download URL:**
Download URL for a new distribution
**License:**
Link for license for a new distribution
**Are you willing to submit a PR?**
<!--- We accept contributions! -->

View File

@ -0,0 +1,16 @@
**Description:**
Describe your changes.
**Related issue:**
Add link to the related issue.
**Download URL:**
Download URL for a new distribution
**License:**
Link for license for a new distribution
**Check list:**
- [ ] Mark if documentation changes are required.
- [ ] Mark if tests were added or updated to cover the changes.
- [ ] Mark if new distribution is being added.

View File

@ -87931,9 +87931,11 @@ function getGitHubHttpHeaders() {
const token = core.getInput('token');
const auth = !token ? undefined : `token ${token}`;
const headers = {
authorization: auth,
accept: 'application/vnd.github.VERSION.raw'
};
if (auth) {
headers.authorization = auth;
}
return headers;
}
exports.getGitHubHttpHeaders = getGitHubHttpHeaders;

4
dist/setup/index.js vendored
View File

@ -125282,9 +125282,11 @@ function getGitHubHttpHeaders() {
const token = core.getInput('token');
const auth = !token ? undefined : `token ${token}`;
const headers = {
authorization: auth,
accept: 'application/vnd.github.VERSION.raw'
};
if (auth) {
headers.authorization = auth;
}
return headers;
}
exports.getGitHubHttpHeaders = getGitHubHttpHeaders;

View File

@ -166,9 +166,13 @@ export function convertVersionToSemver(version: number[] | string) {
export function getGitHubHttpHeaders(): OutgoingHttpHeaders {
const token = core.getInput('token');
const auth = !token ? undefined : `token ${token}`;
const headers: OutgoingHttpHeaders = {
authorization: auth,
accept: 'application/vnd.github.VERSION.raw'
};
if (auth) {
headers.authorization = auth;
}
return headers;
}