github.github.onissues
Home > @runlightyear/github > GitHub > onIssues
GitHub.onIssues() method
This event occurs when there is activity relating to an issue.
For activity relating to a comment on an issue, use the issue_comment event.
Signature:static onIssues(props: GitHubListenerProps<IssuesPayload>): {
webhook: string;
action: string;
};
Parameters
Parameter | Type | Description |
---|---|---|
props | GitHubListenerProps<IssuesPayload> |
{ webhook: string; action: string; }
Example
On issue opened
import { GitHub } from "@runlightyear/github";
import { SKIPPED } from "@runlightyear/lightyear";
GitHub.onIssues({
name: "onIssueOpened",
title: "On Issue Opened",
run: async ({ data, auths }) => {
if (data.action !== "opened") {
throw SKIPPED;
}
console.log("Issue opened:", data.issue);
},
});