Github class

Github is used to index and add github repository codes and issues to the DataSource in the cloud which can be later used for referencing.

This object takes a GitHub repository url as input. It can be used to index the code files in the repository or specific issues from the repository.

You can optionally provide CodeFilter object to filter out the specific files that you want to index from the repository. It accepts a regex string to filter out the files based on a specific pattern.

You can also provide IssueFilter object to filter out the issues that you want to index from the repository. It allows you to filter the issues based on their labels and state (open, closed, or all).

Example:

final githubUrl = 'https://github.com/flutter/flutter';

// filter out dart files
final codeFilter = CodeFilter(pathRegex: '.*\.dart');

// filter out issues with label "bug"
final issueFilter = IssueFilter(labels: ['bug']);

final githubObject = WebDataObject.fromGithub(githubUrl,
    codeFilter: codeFilter, issueFilter: issueFilter);
Inheritance

Constructors

Github({required String url, required String accessToken, CodeFilter? codeFilter, IssueFilter? issueFilter, List<GithubExtract> extractOnly = const [GithubExtract.code]})
Creates a new Github object.

Properties

accessToken String
Your personal github access token that can be used to get data from the Github APIs. See here to learn to generate one for you.
final
codeFilter CodeFilter?
This parameter is optional. CodeFilter object to selectively choose the repository codes files based on the specified pattern. Currently you can choose the files by proving regex string for fetching files that follow specific patterns
final
extractOnly List<GithubExtract>
This parameter is optional. GithubExtract enum allows you to specify what do you want to extract from the shared github repo.
final
hashCode int
The hash code for this object.
no setterinherited
issueFilter IssueFilter?
This parameter is optional. IssueFilter object to pick selected issues from the GitHub repository. You can filter the issues based on: labels: Issues which contain specific labels issue status: Issues which are either open, closed, or all of them
final
minCliVersion String
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
url String
GitHub repo link that you want to extract and save for referencing
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
process() Future<Map<String, dynamic>>
Internal method used by dash_agent to convert the shared DataSource to json format that can be sent on the web
override
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited