Skip to content

Commit

Permalink
Add review workflow to create issues from unreviewed docs
Browse files Browse the repository at this point in the history
Signed-off-by: Jack Baldry <[email protected]>
  • Loading branch information
jdbaldry committed Feb 13, 2024
1 parent ef21756 commit 5cfa5cb
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/review.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Check for pages that require review
on:
schedule:
- cron: '0 7 * * 1-5'
workflow_dispatch:
jobs:
main:
if: github.repository == 'grafana/writers-toolkit'
runs-on: ubuntu-latest

steps:
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: 1.21

- name: Build tool
working-directory: tools
run: go build ./cmd/review

- name: Run tool
run: ./tools/review ./docs/sources | head -n 3 > .to-review.txt

- run: Create issues
uses: actions/github-script@v7
with:
script: |
const fs = require('fs')
octokit.rest.issues.create({
owner: context.repo.owner,
repo: context.repo.repo,
title: 'Docs for review'
body: fs.readFileSync('.to-review.txt'),
assignees: ['jdbaldry'],
});

0 comments on commit 5cfa5cb

Please sign in to comment.