Skip to content

Commit 120b929

Browse files
authored
chore: improved bot preview (anuraghazra#798)
* chore: added theme contribution guidelines in theme preview bot * chore: test * chore: format theme.js * chore: test * chore: fix indent * chore: use npm-install workflow * chore: compact color codes * chore: remove theme
1 parent 3c7ba21 commit 120b929

File tree

2 files changed

+6
-14
lines changed

2 files changed

+6
-14
lines changed

.github/workflows/preview-theme.yml

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,10 @@ jobs:
1414

1515
steps:
1616
- uses: actions/checkout@v1
17-
- name: setup node
18-
uses: actions/setup-node@v1
19-
with:
20-
node-version: "12.x"
2117

22-
- name: npm install, preview theme
23-
run: |
24-
npm install
25-
npm run preview-theme
18+
- name: Install & Preview Theme
19+
- uses: bahmutov/npm-install@v1
20+
- run: npm run preview-theme
2621
env:
2722
CI: true
2823
PERSONAL_TOKEN: ${{ secrets.PERSONAL_TOKEN }}

scripts/preview-theme.js

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ function getPrNumber() {
1313
}
1414

1515
const themeContribGuidelines = `
16-
\r> Hi thanks for opening the theme contribution, please read our theme contribution guidelines
16+
\r> Hi thanks for the theme contribution, please read our theme contribution guidelines
1717
1818
\r> We are currently only accepting color combinations from any vscode theme or which has good color combination to minimize bloating the themes collection.
1919
@@ -82,12 +82,9 @@ async function run() {
8282
body: `
8383
\rTheme preview (bot)
8484
85-
\ntitle-color: <code>#${titleColor}</code>
86-
\nicon-color: <code>#${iconColor}</code>
87-
\ntext-color: <code>#${textColor}</code>
88-
\nbg-color: <code>#${bgColor}</code>
85+
\ntitle_color: <code>#${titleColor}</code> | icon_color: <code>#${iconColor}</code> | text_color: <code>#${textColor}</code> | bg_color: <code>#${bgColor}</code>
8986
90-
Link: ${url}
87+
\rLink: ${url}
9188
9289
\r[![](${url})](${url})
9390

0 commit comments

Comments
 (0)