Skip to content

RunOctoGuideRulesOptions

Settings for running runOctoGuideRules. Only entity is required.

import { runOctoGuideRules } from "octoguide";
// Using a URL string - will fetch data from GitHub API
await runOctoGuideRules({
auth: "ghp_...",
entity: "https://github.com/OctoGuide/bot/issues/19",
});
// Using pre-existing Entity data - avoids API calls
const existingEntity = {
data: { },
number: 19,
type: "issue",
};
await runOctoGuideRules({
auth: "ghp_...",
entity: existingEntity,
});

optional auth: string

GitHub authentication token. If not provided, retrieved with get-github-auth-token.


entity: string | Entity

GitHub entity to run rules on. Can be either:

  • A string URL (e.g., "https://github.com/owner/repo/issues/123") - will fetch entity data via GitHub API
  • An Entity object with pre-fetched data - avoids additional API calls when data is already available

optional settings: Settings

Settings for the run, including rules to enable.