Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skip comments on issues #14

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ on:

jobs:
CLABot:
# Skip job when triggered by an issue comment rather than a PR comment
if: github.event_name == 'pull_request' || contains(github.event.comment.html_url, '/pull/')
runs-on: ubuntu-latest
steps:
- name: "CLA Signature Bot"
Expand Down
2 changes: 1 addition & 1 deletion lib/index.js

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions src/claRunner.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import * as core from '@actions/core';
import { context } from "@actions/github";
import { Author } from "./authorMap";
import { BlockchainPoster } from "./blockchainPoster";
import { ClaFileRepository } from "./claFileRepository";
Expand Down Expand Up @@ -47,6 +48,9 @@ export class ClaRunner {
// PR is closed and should be locked to preserve signatures.
await this.lockPullRequest();
return true;
} else if (this.settings.payloadAction === "issue_comment" && !context.payload.issue?.pull_request) {
core.info("Skipping issue comment")
return true
}

// Just drop whitelisted authors entirely, no sense in processing them.
Expand Down