Constructs a new VersionBot instance.
Name of the VersionBot.
Email ID to use for commits.
PEM for Github events and App login.
Secret webhook for validating events.
Email address used for commiting as VersionBot.
Instance of Github SDK API in use for App.
Github App ServiceEmitter.
Github ServiceEmitter name.
Github ServiceListener name.
Checks a freshly opened PR to see if there are any configured reviewers and maintainers. Should any valid reviewers and maintainers not already be assigned as reviewers on the PR, then a comment is posted on the PR directly asking those user logins to add themselves.
GithubRegistration object used to register the method
ServiceEvent containing the event information ('pull_request' event)
A void Promise once execution has finished.
Add a new type of ServiceEmitter to the client. Should the ServiceEmitter already exist on the client with the handle/name, this will do nothing.
The name of the ServiceEmitter to add.
The constructed or pre-existing ServiceEmitter or void on failure.
Add a new type of ServiceListener to the client. Should the ServiceListener already exist on the client with the handle/name, this will do nothing.
The name of the ServiceListener to add.
The constructed or pre-existing ServiceListener or void on failure.
Clones a repository and runs versionist
upon it, creating new change files.
Information on the repository and version.
Promise with added information on the repo.
Loops through all of the commits for a PR, ensuring that any required tags are present the specified number of times for a PR.
All of the commits for the PR.
The config (if any) for the repository the PR belongs to.
An array of MissingTag objects, denoting required tags not on the PR.
Checks the newly opened PR and its commits.
master
.GithubRegistration object used to register the method
ServiceEvent containing the event information ('pull_request' event)
A void Promise once execution has finished.
Checks to ensure that the minimum number of approvals for a PR occurs. Should the conditions be satisfied then a successful status is set, otherwise a failed state is set.
GithubRegistration object used to register the method
ServiceEvent containing the event information ('pull_request' event)
A void Promise once execution has finished.
Retrieve all protected branch status requirements, and determine the state for each. Status checks can be filtered to include or exclude the results of given contexts, if required.
The PR on which to check the current statuses.
An optional StatusFilter interface, allowing status contexts to be included/excluded from results.
Promise containing a StatusChecks object determining the state of each status.
Ensures that the merge label was added by a valid maintainer, should a list exist in the repo configuration.
The VersionBot configuration object.
The PR event that triggered this check.
Checks for tags which require extra functionality to allow Waffleboard to operate upon the PR. Adds autogenerated text to the PR description for relevant tags.
GithubRegistration object used to register the method
ServiceEvent containing the event information ('pull_request' event)
A void Promise once execution has finished.
Updates all relevant repo files with altered version data.
Repository and updated file information.
Promise that resolves when git data has been updated.
Dispatch to the specified emitter. This method exists as a shortcut to avoid having to retrieve a specific emitter before sending to it.
The ServiceEmitRequest to use. This will be dispatched to all ServiceEmitters.
An array of ServiceEmitResponses from all the ServiceEmitters.
Dispatch to a specific ServiceEmitter. This method exists as a shortcut to avoid having to retrieve a specific emitter before sending to it.
The handle of the ServiceEmitter to dispatch to.
Emitter appropriate data to send.
Data returned from the service represented by the ServiceEmitter.
Finalises a merge should all checks have passed.
Promise fulfilled when merging has finished.
Find a particular attached ServiceEmitter based upon its name.
Handle of the ServiceEmitter instance to find (name if no handle was set).
Instance of the ServiceEmitter found, or void if not found.
Find a particular attached ServiceListener based upon its handle.
Handle of the ServiceListener instance to find (name if no handle was set).
Instance of the ServiceListener found, or void if not found.
Retrieve the binary path for the Node dependencies.
A string containing the absolute path.
Determines if VersionBot has already made commits to the PR branch for a version bump.
The PR to check.
A Promise containing 'null' should VersionBot have not already committed, else the commit message itself.
Merges a PR.
It should be noted that this will, of course, result in a 'closed' event on a PR, which in turn will feed into the 'generateVersion' method.
GithubRegistration object used to register the method
ServiceEvent containing the event information ('pull_request' or 'pull_request_review' event)
A void Promise once execution has finished.
Carries out the merge to master
, updating relevant references from prior commits.
Deletes the old branch after merge has occured.
Repo and commit data to be referenced.
Promise that resolves when reference updates and merging has finalised.
Always passes Versionist and AutoMerge status if a no-checks label has been applied. This allows manual merging to correctly go ahead.
GithubRegistration object used to register the method
ServiceEvent containing the event information ('pull_request' event)
A void Promise once execution has finished.
Process a configuration file from YAML into a nested object.
The configuration file as a string.
The configuration object or void.
Reports an error to the console and as a Github comment..
The error to report.
Retrieve a ProcBotConfiguration file from a ServiceEmitter or inbuilt route.
An object detailing the service to retrieve the configuration file from, and its location.
A Promise containing configuration object should one have been found, or void.
Looks for status change events and creates relevant PR events for any PR whose codebase changes
ServiceEvent containing the event information ('status' event)
A void Promise once execution has finished.
Strip the PR author from a list of user login string.
The array of user logins.
The pull request to use as a base.
An array containing stripped user logins, or null should there be no valid users.
Determines whether an array of Labels includes the specified label name.
Array of Github Labels.
The name of the label to search for.
true
if the label was found, false
otherwise.
Generated using TypeDoc
The VersionBot is built on top of the ProcBot class, which does all the heavy lifting and scheduling. It is designed to check for valid
versionist
commit semantics and alter (or merge) a PR accordingly.