File tree Expand file tree Collapse file tree 1 file changed +18
-5
lines changed
Expand file tree Collapse file tree 1 file changed +18
-5
lines changed Original file line number Diff line number Diff line change @@ -43,12 +43,25 @@ jobs:
4343 id : extract
4444 run : |
4545 echo "${{ github.event.issue.body }}" > issue_body.txt
46-
46+
47+ echo "Extracted issue body:"
4748 cat issue_body.txt
48-
49- FILEID=$(grep -oP '(?<=\*\*Google doc\*\*: ).*' issue_body.txt | sed 's|.*\/d/||' | sed 's|/.*||')
50- AUTHOR=$(grep -oP '(?<=\*\*Profile\*\*: ).*' issue_body.txt)
51- TAGS=$(grep -oP '(?<=\*\*Tags\*\*: ).*' issue_body.txt)
49+ echo "------------------------"
50+
51+ while IFS= read -r line; do
52+ KEY=$(echo "$line" | cut -d':' -f1 | xargs)
53+ VALUE=$(echo "$line" | cut -d':' -f2- | xargs)
54+
55+ if [ "$KEY" = "Title" ]; then
56+ TITLE="$VALUE"
57+ elif [ "$KEY" = "Google doc" ]; then
58+ FILEID="$VALUE"
59+ elif [ "$KEY" = "Profile" ]; then
60+ AUTHOR="$VALUE"
61+ elif [ "$KEY" = "Tags" ]; then
62+ TAGS="$VALUE"
63+ fi
64+ done < issue_body.txt
5265
5366 echo "Extracted values:"
5467 echo "File ID: $FILEID"
You can’t perform that action at this time.
0 commit comments