Skip to content

Commit

Permalink
fix(github): use human readable format of title as H1 (#213)
Browse files Browse the repository at this point in the history
  • Loading branch information
engeir authored Sep 30, 2024
1 parent 7616d67 commit 5ff2e17
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/issue2pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,7 @@ jobs:
mise run recipe-scrapers:install
echo "PARSED=$(mise run recipe-scrapers:run ${{ fromJson(steps.parse.outputs.payload).Lenke }} | jq -c)" >> $GITHUB_ENV
echo "TITLE=$(mise run recipe-scrapers:title-to-filepathname '${{ fromJson(steps.parse.outputs.payload).Tittel }}')" >> $GITHUB_ENV
echo "TITLEHUMAN=${{ fromJson(steps.parse.outputs.payload).Tittel }}" >> $GITHUB_ENV
- name: Set up environment variables
run: |
echo "DATE=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
Expand Down Expand Up @@ -407,7 +408,7 @@ jobs:
cat << EOF >> "$TMPFILE"
---
# ${{ env.TITLE }}
# ${{ env.TITLEHUMAN }}
![](/static/${{ env.TITLE }}/${{ env.TITLE }}.webp)
Expand Down Expand Up @@ -471,6 +472,7 @@ jobs:
cat "$TMPFILE"
mv "$TMPFILE" ./"$FILE_REL_TO_ROOT"
mkdir -p ./"$STATIC_DIR"
touch ./"$STATIC_DIR"/image.txt
- name: Create Pull Request
uses: peter-evans/create-pull-request@v7
with:
Expand All @@ -484,7 +486,7 @@ jobs:
assignees: ${{ github.repository_owner }}
title: "feat(recipe): ${{ fromJson(env.PARSED).name }}"
body: |
:robot: Jeg lagde akkurat en PR for å legge til ${{ env.TITLE }} på vegne av [@${{ github.event.issue.user.login }}](${{ github.event.issue.user.html_url }}).
:robot: Jeg lagde akkurat en PR for å legge til ${{ env.TITLEHUMAN }} på vegne av [@${{ github.event.issue.user.login }}](${{ github.event.issue.user.html_url }}).
Resolves #${{ github.event.issue.number }}
labels: |
Expand Down Expand Up @@ -516,6 +518,7 @@ jobs:
mise run recipe-scrapers:install
echo "PARSED=$(mise run recipe-scrapers:run ${{ fromJson(steps.parse.outputs.payload).URL }} | jq -c)" >> $GITHUB_ENV
echo "TITLE=$(mise run recipe-scrapers:title-to-filepathname '${{ fromJson(steps.parse.outputs.payload).Title }}')" >> $GITHUB_ENV
echo "TITLEHUMAN=${{ fromJson(steps.parse.outputs.payload).Title }}" >> $GITHUB_ENV
- name: Set up environment variables
run: |
echo "DATE=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
Expand Down Expand Up @@ -555,7 +558,7 @@ jobs:
cat << EOF >> "$TMPFILE"
---
# ${{ fromJson(env.PARSED).name }}
# ${{ env.TITLEHUMAN }}
![](/static/${{ env.TITLE }}/${{ env.TITLE }}.webp)
Expand Down Expand Up @@ -619,6 +622,7 @@ jobs:
cat "$TMPFILE"
mv "$TMPFILE" ./"$FILE_REL_TO_ROOT"
mkdir -p ./"$STATIC_DIR"
touch ./"$STATIC_DIR"/image.txt
- name: Create Pull Request
uses: peter-evans/create-pull-request@v7
with:
Expand All @@ -632,7 +636,7 @@ jobs:
assignees: ${{ github.repository_owner }}
title: "feat(recipe): ${{ fromJson(env.PARSED).name }}"
body: |
:robot: I just made a PR to add ${{ env.TITLE }} on behalf of [@${{ github.event.issue.user.login }}](${{ github.event.issue.user.html_url }}).
:robot: I just made a PR to add ${{ env.TITLEHUMAN }} on behalf of [@${{ github.event.issue.user.login }}](${{ github.event.issue.user.html_url }}).
Resolves #${{ github.event.issue.number }}
labels: |
Expand Down

0 comments on commit 5ff2e17

Please sign in to comment.