Get token from input

This commit is contained in:
Andreas Svanberg 2024-10-16 12:48:18 +02:00
parent fc7ce84d45
commit 766e4df2a8
2 changed files with 2 additions and 2 deletions

2
dist/index.js vendored

@ -59,7 +59,7 @@ function main() {
const api = client.default({
baseUrl: gitea.context.apiUrl,
headers: {
//["Authorization"]: `token ${process.env.GITHUB_TOKEN}`
["Authorization"]: `token ${core.getInput('github-token', { required: true })}`
}
});
const { data, error } = yield api.GET('/repos/{owner}/{repo}', {

@ -24,7 +24,7 @@ async function main() {
const api = client.default<specification.paths>({
baseUrl: gitea.context.apiUrl,
headers: {
["Authorization"]: `token ${process.env.GITHUB_TOKEN}`
["Authorization"]: `token ${core.getInput('github-token', {required: true})}`
}
});
const {data, error} = await api.GET('/repos/{owner}/{repo}', {