Options
All
  • Public
  • Public/Protected
  • All
Menu

Class RepoProcessing

Generic class for managing minutes. The real work is done in other modules, this just provides the general framework of managing the information for one repository.

Hierarchy

Index

Constructors

constructor

Properties

credentials

credentials: Credentials

Github credentials, necessary for some steps. Set at initialization time

list_of_minutes

list_of_minutes: string[] = []

List of minute file names. This is set in the relevant subclasses.

repo

repo: Repo

The repository being managed. Set at initialization time

Methods

Abstract handle_one_repo

  • handle_one_repo(): Promise<void>
  • The main processing for repositories:

    1. get the “current” list of resolution from the repo,
    2. compare them to the list of minutes in the folder marked to contain the minutes
    3. generate the missing set of resolutions by invoking collect_resolutions function on the list of minute references
    4. handles the issue comments
    5. merge the results with the “current” list
    6. commit a new “current” list of resolution on the repo (making use of the user’s API token)

    the steps 2-6 are actually done in the process_minutes method, through callbacks that are defined in the concrete implementations of the method.

    Access to the github repository (i.e., step 6 above) is based on the user’s API token, stored in the local configuration file (see USER_CONFIG_NAME)

    Returns Promise<void>

process_minutes

  • Processing the information for a single repository. This is mostly a shell around the real work done in other modules. The function

    1. filters out the minutes that have not yet been handled (this information is part of current)
    2. goes through the processing (resolution gathering, issues, etc)
    3. updates the value of current and uploads it to the repository

    The two callback functions are instantiated in the subclasses to either read/write from/to a local directory or the (remove) github repository.

    Parameters

    • current: MinuteProcessing

      collection of information related to the current status for the repository

    • get_data: GetDataCallback

      callback function used to get to the content of the minute for a single file

    • write_data: WriteDataCallback

      callback function used to store the new content on the repository

    Returns Promise<void>