Skip to content

[BUG] - Tool is ignoring field mapping #52

[BUG] - Tool is ignoring field mapping

[BUG] - Tool is ignoring field mapping #52

name: Issue Response Handler
on:
issues:
types: [opened]
permissions:
contents: read
jobs:
respond:
runs-on: ubuntu-latest
steps:
- name: Random Delay
run: |
# Set minimum and maximum delay in minutes
MIN_DELAY=10 # n1 minutes
MAX_DELAY=30 # n2 minutes
# Generate a random delay between MIN_DELAY and MAX_DELAY
DELAY=$(( (RANDOM % (MAX_DELAY - MIN_DELAY + 1) + MIN_DELAY) * 60 ))
# Sleep for the randomly determined number of seconds
echo "Delaying for $((DELAY / 60)) minutes"
sleep $DELAY
- name: Post Comment for 'bug'
if: contains(github.event.issue.labels.*.name, 'bug')
run: |
curl -X POST \
-H "Authorization: token ${{ secrets.REPO_TOKEN }}" \
-H "Accept: application/vnd.github.v3+json" \
-d '{"body":"Hello, @${{ github.event.issue.user.login }}\n\nThank you for reporting a bug.\nI will take a look at it as soon as possible and let you know of any updates.\n\nCheers"}' \
https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.issue.number }}/comments
- name: Post Comment for 'feature-request'
if: contains(github.event.issue.labels.*.name, 'feature-request')
run: |
curl -X POST \
-H "Authorization: token ${{ secrets.REPO_TOKEN }}" \
-H "Accept: application/vnd.github.v3+json" \
-d '{"body":"Hello, @${{ github.event.issue.user.login }}\n\nThank you for your feature request.\nI will review it as soon as possible and provide updates as they become available.\n\nCheers"}' \
https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.issue.number }}/comments
- name: Post Comment for 'help-wanted'
if: contains(github.event.issue.labels.*.name, 'help-wanted')
run: |
curl -X POST \
-H "Authorization: token ${{ secrets.REPO_TOKEN }}" \
-H "Accept: application/vnd.github.v3+json" \
-d '{"body":"Hello, @${{ github.event.issue.user.login }}\n\nThank you for reaching out.\nI will do my best to assist you as quickly as possible and will keep you updated on my progress.\n\nCheers"}' \
https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.issue.number }}/comments