reviewdog:这不是 PullRequest 构建

reviewdog: this is not PullRequest build

概览

我对 reviewdog 有意见。 我希望能够在 CircleCI 上 运行 reviewdog,当我这样做时 git push,它会检查文档中的文本错误,如果有错误,reviewdog 会发出拉取请求。

.config.yml


# ref: https://github.com/azu/textlint-reviewdog-example
version: 2.1

jobs:
  proofreading_job:
    docker:
      - image: cimg/node:lts
    steps:
      - checkout
      - run:
          name: "Install textlint"
          command: npm install --save-dev textlint textlint-rule-common-misspellings
      - run:    
          name: "Install dependent module"
          command: npm install
      - run:
          name: "Install reviewdog"
          command: |
            curl -sfL https://raw.githubusercontent.com/reviewdog/reviewdog/master/install.sh| sh -s
      - run: # (d1)
          name: "Execute textlint for README.md"
          command: npx textlint --rule common-misspellings README.md >> .textlint.log
      - run: # (d2)
          name: "Execute reviewdog"
          when: on_fail
          command: |
            cat .textlint.log | ./bin/reviewdog -f=checkstyle -name="textlint" -reporter="github-pr-review"

workflows:
  version: 2
  proofreading:
    jobs:
      - proofreading_job

README.MD

# textlint-reviewdog-sample
This isnt miss.

我设置了它们并且我做到了 git push。 工作,Execute reviewdog 说,

#!/bin/bash -eo pipefail
cat .textlint.log | ./bin/reviewdog -f=checkstyle -name="textlint" -reporter="github-pr-review"
reviewdog: this is not PullRequest build.
CircleCI received exit code 0

reviewdog 无法发出拉取请求。

我提前设置了环境变量,REVIEWDOG_GITHUB_API_TOKEN。 REVIEWDOG_GITHUB_API_TOKEN 我打开复选框,Only build pull requests Only build pull requests

那么,我该怎么办?

我解决了这个问题。

解决方案

我在代码下面写错了

npx textlint --rule common-misspellings README.md >> .textlint.log

我需要添加 -f checkstyle.

我在另一个分支上修复并发布了 PR。

https://github.com/Yuhta28/textlint-reviewdog-sample/pull/6

reviewdog 发表了评论。