This responder triggers workflow run on a GitHub Action using the GitHub API. Optionally if the call is successful (not the result of the workflow run but the call to trigger it) a reply message can be posted as a comment in the issue. Allows labeling.
For example, if you configure the command to be compile pdf, it will respond to:
@botname compile pdf
Some parameters are required for the responder to work: the
command to invoke it, and the
workflow_name values to identify the action to run. All can be set using the settings YAML file.
Required. The command this responder will listen to.
The description of the action this command runs. It will show in the help command if the responder is not hidden.
Optional String to show as an example of the command being used when the help command is invoked.
Required. The repo to run the action on, in org/name format.
Required. Name of the workflow to run.
Optional. The git ref for the GitHub action to use. Defaults to main.
An optional message to reply with once the workflow is triggered.
<Map> An optional list of params/values to pass as inputs to the GitHub Action.
<Array> An optional list of fields from the body of the issue to pass as inputs to the GitHub Action.
<Map> An optional mapping of variable names to add to the inputs.
You can use this action to run other responder(s) after after the GitHub action is triggered:
Allows to call a different responder. Subparams are:
Required. The key to find the responder in the config file.
Optional. The name of the responder in the config file if there are several instances under the same responder key.
Optional. The message to trigger the responder with.
If you want to run multiple responders, use an array of these subparams.
A complete example:
... github_action: only: editors command: compile pdf description: Generates a PDF based on the paper.md file in the repository workflow_repo: openjournals/reviews workflow_name: compile-pdf.yml inputs: file: paper.md data-from-issue: - branch - target_repository mapping: repository: target_repository number: issue_id ...
Once the responder is invoked it triggers the compile-pdf.yml workflow on the openjournals/reviews repository passing to it the file, repository, branch and number inputs.