/
githubmirror
/
deno
Обзор
Документация
Войти
/
githubmirror
/
deno
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
.github/workflows/pr.ts
47 строк
1 KB
David Sherret
ci: update to use pull_request (#33981)
12 май 2026, 17:06
Не верифицирован
12 май 2026, 17:06
be35920
Код
Авторство
О чём код?
#!/usr/bin/env -S deno run --check --allow-write=. --allow-read=. --lock=./tools/deno.lock.json // Copyright 2018-2026 the Deno authors. MIT license. import { createWorkflow, step } from "jsr:@david/gagen@0.3.1"; const workflow = createWorkflow({ name: "pr", on: { pull_request: { types: ["opened", "edited", "synchronize"], }, }, jobs: [{ id: "main", name: "lint title", runsOn: "ubuntu-latest", steps: [ step({ name: "Install Deno", uses: "denoland/setup-deno@v2", with: { "deno-version": "canary" }, }), step({ name: "Lint", env: { PR_TITLE: "${{ github.event.pull_request.title }}" }, run: 'deno run https://raw.githubusercontent.com/denoland/deno/refs/heads/main/tools/verify_pr_title.js "$PR_TITLE"', }), ], }], }); const header = [ "# GENERATED BY ./pr.ts -- DO NOT DIRECTLY EDIT", "#", "# WARNING: This workflow runs in the context of the base repository so the", "# GITHUB_TOKEN it has access to has full write permissions to the repository.", ].join("\n"); export function generate() { return workflow.toYamlString({ header }); } export const PR_YML_URL = new URL("./pr.generated.yml", import.meta.url); if (import.meta.main) { workflow.writeOrLint({ filePath: PR_YML_URL, header }); }