mirror of
https://github.com/xHyroM/bun-discord-bot.git
synced 2024-11-22 14:41:05 +01:00
chore(validateTags): fix, use env
This commit is contained in:
parent
de8a1e27f1
commit
33f4111c6e
2 changed files with 3 additions and 4 deletions
2
.github/workflows/validate.yml
vendored
2
.github/workflows/validate.yml
vendored
|
@ -28,6 +28,6 @@ jobs:
|
||||||
|
|
||||||
- name: Validate tag
|
- name: Validate tag
|
||||||
run: bun run validate
|
run: bun run validate
|
||||||
with:
|
env:
|
||||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
commit-sha: ${{ github.event.pull_request.head.sha }}
|
commit-sha: ${{ github.event.pull_request.head.sha }}
|
|
@ -1,13 +1,12 @@
|
||||||
import { context } from '@actions/github';
|
import { context } from '@actions/github';
|
||||||
import { getInput } from '@actions/core';
|
|
||||||
|
|
||||||
interface Tag {
|
interface Tag {
|
||||||
keywords: string[];
|
keywords: string[];
|
||||||
content: string;
|
content: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
const githubToken = getInput('github-token');
|
const githubToken = process.env['github-token'];
|
||||||
const commitSha = getInput('commit-sha');
|
const commitSha = process.env['commit-sha'];
|
||||||
|
|
||||||
const codeBlockRegex = /(`{1,3}).+?\1/gs;
|
const codeBlockRegex = /(`{1,3}).+?\1/gs;
|
||||||
const urlRegex = /https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_\+.~#?&\/\/=]*)/gi;
|
const urlRegex = /https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_\+.~#?&\/\/=]*)/gi;
|
||||||
|
|
Loading…
Reference in a new issue