Skip to content

Update Base Strings #38

Update Base Strings

Update Base Strings #38

# Clones the repository which then begins with finding the required comment,
# and then creates a new comment which indicates the base strings were modified.
name: Prevent Base Strings Modification
on:
pull_request_target:
paths:
- v2/lang/en_us.json
jobs:
prevent-base-changes:
if: github.actor != 'figuramcbot' || !contains(github.event.pull_request.title, 'Update Base Strings')
runs-on: ubuntu-22.04
steps:
- name: Find Comment
uses: peter-evans/find-comment@v2
id: fc
with:
issue-number: ${{ github.event.pull_request.number }}
comment-author: "figuramcbot"
body-includes: "Base Strings Modified"
- name: Create a Comment
if: steps.fc.outputs.comment-id == ''
uses: peter-evans/create-or-update-comment@v1
with:
issue-number: ${{ github.event.pull_request.number }}
body: |
# ⚠️ Base Strings Modified ⚠️
**Your pull request includes changes to the `en_us.json` strings file.**
Please do not modify the base strings directly within this repository. Instead, make your changes in the [FiguraMC/Figura](https://github.com/FiguraMC/Figura) repository and submit a new pull request there.
token: ${{ secrets.GH_BOT_TOKEN }}
- name: Fail Workflow
run: exit 1