-
-
Notifications
You must be signed in to change notification settings - Fork 34
Open
Labels
bugSomething isn't workingSomething isn't working
Description
I want to run this regex match only on a specific comment.
eg.
- My github-actions [bot] makes a comment if another action runs
- This action parses the comment the bot makes using regex (example here: https://regex101.com/r/SpeOZS/1)
- The regex match value is sent to a metadata.json file
The issue I have is that this action does not seem to be able to parse a comment made by the github-actions [bot]
Is it not possible?
Here's my actions workflow:
name: Parse comment
on:
pull_request:
types: [edited]
jobs:
parse_comment:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: peter-evans/find-comment@v1
id: bot
with:
issue-number: ${{ github.event.number }}
body-includes: "<!-- GH BOT -->"
- run: |
echo ${{ steps.bot.outputs.comment-id }}
echo ${{ steps.bot.outputs.comment-author }}
- uses: actions-ecosystem/action-regex-match@v2
id: description
with:
text: ${{ github.event.comment.body }}
regex: '^[A-Za-z_]+:\s+(.*)$'
- uses: actions-ecosystem/action-regex-match@v2
id: justification
with:
text: ${{ github.event.comment.body }}
regex: '^[A-Za-z]+:\s+(.*)$'
When I try to print the values of description and justification at the end of the workflow with:
- name: Print comment body ## A step to print the body would be nice
env:
description: description
justificaton: justification
run: |
echo description
echo justification
They are always empty.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working