Files
OpenRCT2/.github/workflows/backtrace-commit-fix.yml
Michał Janiszewski 40d974d891 Move some workflows to ubuntu-slim (#25939)
* Move some CI jobs to ubuntu-slim

ubuntu-slim is a single-CPU hosted runner that uses containers instead
of VMs. It's useful for quick 'maintenance' jobs.

* Move some workflows to ubuntu-slim

`ubuntu-slim` is a single-CPU hosted runner that uses containers instead of VMs. It's useful for quick 'maintenance' jobs.
2026-02-03 14:27:07 +01:00

27 lines
828 B
YAML

name: 'Backtrace issue commit correction'
on:
issues:
types:
- opened
jobs:
backtrace_commit_correction:
runs-on: ubuntu-slim
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ISSUE: ${{ github.event.issue.html_url }}
if: |
contains(github.event.issue.labels.*.name, 'backtrace.io')
steps:
- name: Modify issue contents
env:
BODY: ${{ github.event.issue.body }}
id: fix
run: |
changed_body=$(echo "$BODY" | sed '/<strong>commit<\/strong>/,/<\/ul>/ s/<code>\([0-9a-f]\{7,\}\)<\/code>/\1/g')
if [[ "$changed_body" == "$BODY" ]]; then
echo "Unable to match the Backtrace report format."
exit 1
fi
echo "$changed_body" >> body.txt
gh issue edit $ISSUE --body-file body.txt