mirror of
https://github.com/Aviortheking/codestats-readme.git
synced 2025-04-22 10:42:08 +00:00
fix: Theme preview script (#318)
* chore: testing theme preview script * fix: workflow * test current pr * comment on pr script * fix: preview theme script * fix: preview theme * fix: token fix * test: theme * fix: conflict
This commit is contained in:
parent
ce8660c825
commit
20463f6365
3
.github/workflows/preview-theme.yml
vendored
3
.github/workflows/preview-theme.yml
vendored
@ -6,7 +6,6 @@ on:
|
|||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
- theme-preview-script
|
- theme-preview-script
|
||||||
paths:
|
|
||||||
- "themes/index.js"
|
- "themes/index.js"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
@ -27,3 +26,5 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
CI: true
|
CI: true
|
||||||
PERSONAL_TOKEN: ${{ secrets.PERSONAL_TOKEN }}
|
PERSONAL_TOKEN: ${{ secrets.PERSONAL_TOKEN }}
|
||||||
|
with:
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
@ -15,7 +15,8 @@ const parsePullRequestId = (githubRef) => {
|
|||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
try {
|
try {
|
||||||
const octokit = github.getOctokit(process.env.PERSONAL_TOKEN);
|
const token = core.getInput("token");
|
||||||
|
const octokit = github.getOctokit(token || process.env.PERSONAL_TOKEN);
|
||||||
const pullRequestId = parsePullRequestId(process.env.GITHUB_REF);
|
const pullRequestId = parsePullRequestId(process.env.GITHUB_REF);
|
||||||
|
|
||||||
let res = await octokit.pulls.get({
|
let res = await octokit.pulls.get({
|
||||||
|
@ -113,19 +113,19 @@ const themes = {
|
|||||||
text_color: "0cf574",
|
text_color: "0cf574",
|
||||||
bg_color: "040f0f",
|
bg_color: "040f0f",
|
||||||
},
|
},
|
||||||
"algolia": {
|
algolia: {
|
||||||
title_color: "00AEFF",
|
title_color: "00AEFF",
|
||||||
icon_color: "2DDE98",
|
icon_color: "2DDE98",
|
||||||
text_color: "FFFFFF",
|
text_color: "FFFFFF",
|
||||||
bg_color: "050F2C",
|
bg_color: "050F2C",
|
||||||
},
|
},
|
||||||
"great-gatsby":{
|
"great-gatsby": {
|
||||||
title_color: "ffa726",
|
title_color: "ffa726",
|
||||||
icon_color: "ffb74d",
|
icon_color: "ffb74d",
|
||||||
text_color: "ffd95b",
|
text_color: "ffd95b",
|
||||||
bg_color: "000000",
|
bg_color: "000000",
|
||||||
},
|
},
|
||||||
"bear": {
|
bear: {
|
||||||
title_color: "e03c8a",
|
title_color: "e03c8a",
|
||||||
icon_color: "00AEFF",
|
icon_color: "00AEFF",
|
||||||
text_color: "bcb28d",
|
text_color: "bcb28d",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user