mirror of
https://github.com/mshick/add-pr-comment.git
synced 2026-01-01 14:49:44 +11:00
fix: correct preview header
This commit is contained in:
parent
5aa3ae408c
commit
4aae273d68
1 changed files with 3 additions and 1 deletions
4
index.js
4
index.js
|
|
@ -2,11 +2,13 @@ const core = require("@actions/core");
|
||||||
const github = require("@actions/github");
|
const github = require("@actions/github");
|
||||||
const { HttpClient, Headers } = require("@actions/http-client");
|
const { HttpClient, Headers } = require("@actions/http-client");
|
||||||
|
|
||||||
|
const previewHeader = "application/vnd.github.groot-preview+json";
|
||||||
|
|
||||||
const getPulls = async (repoToken, repo, commitSha) => {
|
const getPulls = async (repoToken, repo, commitSha) => {
|
||||||
const http = new HttpClient("http-client-add-pr-comment");
|
const http = new HttpClient("http-client-add-pr-comment");
|
||||||
|
|
||||||
const additionalHeaders = {
|
const additionalHeaders = {
|
||||||
[Headers.Accept]: "application/vnd.github.sailor-v-preview+json",
|
[Headers.Accept]: previewHeader,
|
||||||
[Headers.Authorization]: `token ${repoToken}`,
|
[Headers.Authorization]: `token ${repoToken}`,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue