tisonkun / actions-dco

GitHub Actions that enforces the Developer Certificate of Origin (DCO) on Pull Requests
Apache License 2.0
7 stars 2 forks source link

Create comment on failure #10

Open tisonkun opened 2 years ago

tisonkun commented 2 years ago

See also this snippet:

    steps:
      - name: Check for DCO
        id: dco-check
        uses: tisonkun/actions-dco@v1.1
      - name: Comment about DCO status
        uses: actions/github-script@v6
        if: ${{ failure() }}
        with:
          script: |
            github.rest.issues.createComment({
              issue_number: context.issue.number,
              owner: context.repo.owner,
              repo: context.repo.repo,
              body: `Thanks for your contribution! To satisfy the DCO policy in our \
              [contributing guide](https://github.com/databricks/databricks-sql-nodejs/blob/main/CONTRIBUTING.md) \
              every commit message must include a sign-off message. One or more of your commits is missing this message. \
              You can reword previous commit messages with an interactive rebase (\`git rebase -i main\`).`
            })

Perhaps we can introduce an optional config to create a comment on failure with the value.