Skip to content

Commit

Permalink
Обновляет экшен для хелперов
Browse files Browse the repository at this point in the history
  • Loading branch information
igsekor committed Aug 1, 2023
1 parent 5b3ae07 commit aa91f88
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 10 deletions.
7 changes: 4 additions & 3 deletions .github/scripts/demos-helper.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
const { Octokit } = require("@octokit/core")
const fs = require('fs')
import fetch from 'node-fetch'
import { Octokit } from '@octokit/core'
import fs from 'fs'

const args = process.argv.slice(2)
const ghKey = args.includes('--github-key') ? args[args.indexOf('--github-key') + 1] : false
Expand Down Expand Up @@ -44,7 +45,7 @@ if (ghKey) {
}
}

const octokit = new Octokit({ auth: ghKey })
const octokit = new Octokit({ auth: ghKey, request: { fetch }})
for (const chapter in issueNumberToChapter) {
octokit.request('PATCH /repos/{owner}/{repo}/issues/{issue_number}', {
owner: 'doka-guide',
Expand Down
7 changes: 4 additions & 3 deletions .github/scripts/description-helper.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
const { Octokit } = require("@octokit/core")
const fs = require('fs')
import fetch from 'node-fetch'
import { Octokit } from '@octokit/core'
import fs from 'fs'

const args = process.argv.slice(2)
const ghKey = args.includes('--github-key') ? args[args.indexOf('--github-key') + 1] : false
Expand Down Expand Up @@ -45,7 +46,7 @@ if (ghKey) {
}
}

const octokit = new Octokit({ auth: ghKey })
const octokit = new Octokit({ auth: ghKey, request: { fetch }})
for (const chapter in issueNumberToChapter) {
octokit.request('PATCH /repos/{owner}/{repo}/issues/{issue_number}', {
owner: 'doka-guide',
Expand Down
7 changes: 4 additions & 3 deletions .github/scripts/editor-helper.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
const { Octokit } = require("@octokit/core")
const fs = require('fs')
import fetch from 'node-fetch'
import { Octokit } from '@octokit/core'
import fs from 'fs'

const args = process.argv.slice(2)
const ghKey = args.includes('--github-key') ? args[args.indexOf('--github-key') + 1] : false
Expand Down Expand Up @@ -42,7 +43,7 @@ if (ghKey) {
}
}

const octokit = new Octokit({ auth: ghKey })
const octokit = new Octokit({ auth: ghKey, request: { fetch }})
for (const chapter in issueNumberToChapter) {
octokit.request('PATCH /repos/{owner}/{repo}/issues/{issue_number}', {
owner: 'doka-guide',
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/maintainer-helper.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ jobs:
node-version: 16
- name: Формирует список меты файлов
run: |
npm install @octokit/core
echo '{"type": "module","dependencies": {"@octokit/core": "^5.0.0","node-fetch": "^3.3.2"}}' > package.json
npm install
npx yaml-cat --format json --output result.json css/**/index.md html/**/index.md js/**/index.md tools/**/index.md a11y/**/index.md
- name: Обновление списков материалов-кандидатов на редактирование
run: node .github/scripts/editor-helper.js --github-key ${{ secrets.GITHUB_TOKEN }}
Expand Down

0 comments on commit aa91f88

Please sign in to comment.