Skip to content

Roboclaw ESC driver

Roboclaw ESC driver #1

Workflow file for this run

name: CheckForJiraTask
on:
pull_request:
types: [synchronize, opened, edited]
jobs:
checkComments:
runs-on: ubuntu-latest
steps:
- name: check_comment
uses: khan/pull-request-comment-trigger@master
id: check
with:
trigger: 'auterion.atlassian.net/'
reaction: rocket
env:
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
- name: github_script_add_comment
uses: actions/github-script@0.3.0
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
const core = require('@actions/core')
if(!${{steps.check.outputs.triggered}}) {
// Remove rocket reaction
let request = await github.reactions.listForIssue({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
});
for(const reaction of request.data) {
if(reaction.user.login == "github-actions[bot]") {
await github.reactions.delete({
reaction_id: reaction.id
});
}
}
}
- name: github_check_updater
uses: actions/github-script@0.3.0
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
const core = require('@actions/core');
let request = await github.checks.listForRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: context.payload.pull_request.head.ref
});
let status = "failure";
if(${{steps.check.outputs.triggered}}) {
status = "success";
}
for(const check of request.data.check_runs) {
if(check.name == "checkComments") {
await github.checks.update({
owner: context.repo.owner,
repo: context.repo.repo,
check_run_id: check.id,
conclusion: status
});
}
}
- run: exit 1
if: steps.check.outputs.triggered != 'true'