mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-09-19 22:30:23 +00:00
ci/github-script/manual-file-edits: convert to TypeScript
(cherry picked from commit 4a7ddd0795)
This commit is contained in:
committed by
github-actions[bot]
parent
261abe1b33
commit
963d91e296
2
.github/workflows/check.yml
vendored
2
.github/workflows/check.yml
vendored
@@ -122,7 +122,7 @@ jobs:
|
||||
with:
|
||||
github-token: ${{ steps.app-token.outputs.token || github.token }}
|
||||
script: |
|
||||
const { default: checkManualFileEdits } = await import('${{ github.workspace }}/trusted/ci/github-script/manual-file-edits.js')
|
||||
const { default: checkManualFileEdits } = await import('${{ github.workspace }}/trusted/ci/github-script/manual-file-edits.ts')
|
||||
await checkManualFileEdits({
|
||||
github,
|
||||
context,
|
||||
|
||||
1
.github/workflows/test.yml
vendored
1
.github/workflows/test.yml
vendored
@@ -84,6 +84,7 @@ jobs:
|
||||
'ci/github-script/commits.js',
|
||||
'ci/github-script/get-pr-commit-details.js',
|
||||
'ci/github-script/lint-commits.js',
|
||||
'ci/github-script/manual-file-edits.ts',
|
||||
'ci/github-script/merge.js',
|
||||
'ci/github-script/package.json',
|
||||
'ci/github-script/package-lock.json',
|
||||
|
||||
@@ -2,21 +2,18 @@ import { getCommitDetailsForPR } from './get-pr-commit-details.js'
|
||||
import { dismissReviews, postReview } from './reviews.js'
|
||||
import { classify } from './supportedBranches.js'
|
||||
|
||||
/**
|
||||
* @param {{
|
||||
* github: InstanceType<typeof import('@actions/github/lib/utils').GitHub>,
|
||||
* context: typeof import('@actions/github').context,
|
||||
* core: typeof import('@actions/core'),
|
||||
* repoPath?: string,
|
||||
* dry: boolean,
|
||||
* }} CheckManualFileEditsProps
|
||||
*/
|
||||
export default async function checkManualFileEdits({
|
||||
github,
|
||||
context,
|
||||
core,
|
||||
repoPath,
|
||||
dry,
|
||||
}: {
|
||||
github: InstanceType<typeof import('@actions/github/lib/utils').GitHub>
|
||||
context: typeof import('@actions/github').context
|
||||
core: typeof import('@actions/core')
|
||||
repoPath?: string
|
||||
dry: boolean
|
||||
}) {
|
||||
const reviewKey = 'manual-file-edits'
|
||||
|
||||
@@ -123,7 +123,7 @@ program
|
||||
.argument('<repo>', 'Name of the GitHub repository to run on (Example: nixpkgs)')
|
||||
.argument('<pr>', 'Number of the Pull Request to run on')
|
||||
.action(async (owner, repo, pr, options) => {
|
||||
const checkManualFileEdits = (await import('./manual-file-edits.js')).default
|
||||
const checkManualFileEdits = (await import('./manual-file-edits.ts')).default
|
||||
await run(checkManualFileEdits, owner, repo, pr, options)
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user