Skip to content

Feedback from qweqweq at 2024-08-26T14:02:41.106Z #1

Feedback from qweqweq at 2024-08-26T14:02:41.106Z

Feedback from qweqweq at 2024-08-26T14:02:41.106Z #1

name: Process Feedback Issues
on:
issues:
types: [opened]
jobs:
process-feedback:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Create responses directory if it doesn't exist
run: |
mkdir -p responses
- name: Extract and save feedback
run: |
ISSUE_TITLE="${{ github.event.issue.title }}"
ISSUE_BODY="${{ github.event.issue.body }}"
NAME=$(echo "$ISSUE_TITLE" | sed 's/Feedback from //;s/ at.*//')
TIMESTAMP=$(echo "$ISSUE_TITLE" | sed 's/.* at //')
# Sanitize timestamp for use in filenames
TIMESTAMP=${TIMESTAMP//:/-}
FILENAME="responses/${NAME}_${TIMESTAMP}.txt"
# Save the feedback to a file
echo -e "$ISSUE_BODY" > "$FILENAME"
# Commit and push the file
git config --global user.name "GitHub Actions"
git config --global user.email "[email protected]"
git add "$FILENAME"
git commit -m "Added feedback from $NAME on $TIMESTAMP"
git push