Skip to content

ergoCub 1.1 S/N:001 – Right knee vibrates while calibration #384

ergoCub 1.1 S/N:001 – Right knee vibrates while calibration

ergoCub 1.1 S/N:001 – Right knee vibrates while calibration #384

name: Support Request - Complete Support Request Info
on:
issues:
types: [opened]
jobs:
trigger:
name: "Complete info"
runs-on: ubuntu-latest
steps:
- name: Checkout the repo
uses: actions/checkout@main
- name: Parse the support request
uses: stefanbuck/github-issue-parser@v3
id: issue-parser
with:
template-path: .github/ISSUE_TEMPLATE/support-request.yml
- name: Print the fields
run: echo "${PARSER_FIELDS}"
# use env variables as per https://github.com/orgs/community/discussions/32012#discussioncomment-3558892
env:
PARSER_FIELDS: ${{ steps.issue-parser.outputs.jsonString }}
- name: Check Selected Robot
id: check-1
run: |
if [ "${ROBOT}" == "None" ]; then
echo "WARNING_BODY=- [ ] enter the Robot Name, adjust the Issue Title, and add the Robot Label." >> $GITHUB_OUTPUT
echo "trigger_warning=yes" >> $GITHUB_ENV
echo "ROBOT_NAME=Robot Name" >> $GITHUB_OUTPUT
else
echo "WARNING_BODY=- [x] enter the Robot Name." >> $GITHUB_OUTPUT
echo "ROBOT_NAME=${ROBOT}" >> $GITHUB_OUTPUT
echo "ROBOT_LABEL=${ROBOT}" >> $GITHUB_OUTPUT
fi
env:
ROBOT: ${{ steps.issue-parser.outputs.issueparser_robot }}
# Set issue title prefix according to selected Robot Name
- name: Update issue title
uses: actions-cool/issues-helper@v3
id: issue-updater-title
with:
actions: 'update-issue'
token: ${{ secrets.GITHUB_TOKEN }}
issue-number: ${{ github.event.issue.number }}
title: "${{ steps.check-1.outputs.ROBOT_NAME }} – ${{ github.event.issue.title }}"
update-mode: 'replace'
# Add Robot Label according to selected Robot Name
- name: Add robot label
uses: actions-cool/issues-helper@v3
id: issue-updater-label
with:
actions: 'add-labels'
token: ${{ secrets.GITHUB_TOKEN }}
issue-number: ${{ github.event.issue.number }}
labels: ${{ steps.check-1.outputs.ROBOT_LABEL }}
- name: Check Issue Title
id: check-2
run: |
if [ "${ISSUE_TITLE}" == "" ] || [ "${ISSUE_TITLE}" == "${TITLE_PLACEHOLDER}" ] || [ "${{ steps.check-1.outputs.ROBOT_NAME }}" == "Robot Name" ]; then
echo "WARNING_BODY=- [ ] give the issue a meaningful Title." >> $GITHUB_OUTPUT
echo "trigger_warning=yes" >> $GITHUB_ENV
else
echo "WARNING_BODY=- [x] give the issue a meaningful Title." >> $GITHUB_OUTPUT
fi
env:
ISSUE_TITLE: ${{ github.event.issue.title }}
TITLE_PLACEHOLDER: "[Give a meaningful title but don't enter the robot name here]"
- name: Check Issue Detailed Context
if: false
id: check-3
run: |
echo ${#CONTEXT}
if [ "${CONTEXT}" == "" ] || [ ${#CONTEXT} -lt 100 ]; then
echo "WARNING_BODY=- [ ] provide a Detailed Context (at least 100 characters)." >> $GITHUB_OUTPUT
echo "trigger_warning=yes" >> $GITHUB_ENV
else
echo "WARNING_BODY=- [x] provide a Detailed Context." >> $GITHUB_OUTPUT
fi
env:
CONTEXT: ${{ steps.issue-parser.outputs.issueparser_context }}
- name: Print URL of the problematic issue
if: (env.trigger_warning=='yes')
run: |
echo "❌ Problems detected with ${{ github.event.issue.html_url }}"
- name: Create comment
if: (env.trigger_warning=='yes')
uses: peter-evans/create-or-update-comment@v2
with:
issue-number: ${{ github.event.issue.number }}
body: |
## ⚠️ Detected missing mandatory information
Hi @${{ github.event.issue.user.login }} 👋🏻
Some of the following points need your attention.
You are required to:
${{ steps.check-1.outputs.WARNING_BODY }}
${{ steps.check-2.outputs.WARNING_BODY }}
<sub>Please, mark the points above as solved once done.</sub>
[^1]: To get to know the allowed options for the dropdown fields, you may peruse the [**`template`**](../blob/master/.github/ISSUE_TEMPLATE/support-request.yml).
reactions: 'confused'