Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2024-08-16: WIP #5

Merged
merged 2 commits into from
Aug 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/new-word.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ body:
- label: Verb
- label: Adjective
- label: Adverb
required: true
validations:
required: true

Expand Down
11 changes: 7 additions & 4 deletions .github/workflows/add-word.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: Process New Word Submission

on:
workflow_dispatch:
issues:
types: [opened]

Expand All @@ -15,14 +16,16 @@ jobs:
- name: Extract issue details
id: extract
run: |
echo "WORDS=$(echo '${{ github.event.issue.body }}' | sed -n '/^New Words/,/^$/p' | tail -n +2)" >> $GITHUB_ENV
echo "POS=$(echo '${{ github.event.issue.body }}' | sed -n '/^Parts of Speech/,/^$/p' | tail -n +2 | sed 's/- //g')" >> $GITHUB_ENV
echo "WORDS=$(echo '${{ github.event.issue.body }}' | tr -d '\r' | sed -n '/^New Words/,/^$/p' | tail -n +2)" >> $GITHUB_ENV
echo "POS=$(echo '${{ github.event.issue.body }}' | tr -d '\r' | sed -n '/^Parts of Speech/,/^$/p' | tail -n +2 | sed 's/- //g')" >> $GITHUB_ENV
echo "GITHUB_ISSUE_NUMBER=${{ github.event.issue.number }}" >> $GITHUB_ENV

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
python-version: '3.12.5'
allow-prereleases: true
architecture: 'arm64'

- name: Install dependencies
run: |
Expand All @@ -31,7 +34,7 @@ jobs:

- name: Process and update JSON
run: |
python3 scripts/update_pending_json.py "$WORDS" "$POS"
python3 scripts/add-word.py "$WORDS" "$POS"

- name: Commit changes
if: success()
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ Packages/
Package.pins
Package.resolved
.env
*.secrets
*.secrets
.vscode