Skip to content

Commit

Permalink
#513 #542 Update body of chore emoji/missing query form workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewtavis committed Jan 25, 2025
1 parent 956c3d9 commit 5646a16
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 21 deletions.
10 changes: 4 additions & 6 deletions .github/workflows/check_and_update_cldr_emoji_data.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,9 @@ jobs:
uses: peter-evans/create-pull-request@v5
with:
token: ${{ secrets.GITHUB_TOKEN }}
title: "chore: Update emoji annotations data"
title: "Chore: Update CLDR emoji annotations data"
body: |
This PR updates the emoji annotations data from CLDR.
This is an automated PR created by the [Check and Update CLDR Emoji Data](https://github.com/scribe-org/Scribe-Data/blob/main/.github/workflows/check_and_update_cldr_emoji_data.yaml) workflow.
### Legend:
- Yes: File was updated
Expand All @@ -140,11 +140,9 @@ jobs:
## Changes Summary
${{ steps.check-updates.outputs.change_summary }}
This is an automated PR created by the [emoji data update workflow](https://github.com/scribe-org/Scribe-Data/blob/main/.github/workflows/update_emojis.yaml).
branch: update-emoji-data # branch name
branch: update-cldr-emoji-data # branch name
delete-branch: true
commit-message: "chore: Update emoji annotations data"
commit-message: "Chore: Update CLDR emoji annotations data"
labels: |
automated pr
emoji-data
8 changes: 4 additions & 4 deletions .github/workflows/check_and_update_missing_query_forms.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -114,13 +114,13 @@ jobs:
uses: peter-evans/create-pull-request@v5
with:
token: ${{ secrets.GITHUB_TOKEN }}
title: "Automated PR: Updated Language Data Files"
title: "Chore: Update missing Wikidata query forms"
body: ${{ steps.pr-body.outputs.body }}
base: master
branch: automated-missing-forms-pr
base: main
branch: update-missing-query-forms
delete-branch: true
draft: false
commit-message: "[create-pull-request] automated change"
commit-message: "Chore: Update missing Wikidata query forms"
committer: GitHub <[email protected]>
author: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

Expand Down
4 changes: 0 additions & 4 deletions src/scribe_data/check/check_missing_forms/get_forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,6 @@ def parse_sparql_query(query_text):
return result


# Debug line to parsed file.
parse_sparql_files()


def extract_dump_forms(
languages=None, data_types=None, file_path="latest-lexemes.json.bz2"
):
Expand Down
14 changes: 7 additions & 7 deletions src/scribe_data/check/check_missing_forms/pr_body.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ def pr_body(missing_features):
- Features are grouped by language for better readability
"""
pr_body_content = (
"## Automated PR: Missing Features\n\n"
+ "This PR was automatically created by a GitHub Action.\n\n"
+ "### Missing Features Summary\n"
+ "| **Language** | **Feature Type** |\n"
+ "|--------------|------------------|\n"
"## Automated PR: Missing Lexeme Forms\n\n"
+ "This is an automated PR created by the [Check and Update Missing Query Forms](https://github.com/scribe-org/Scribe-Data/blob/main/.github/workflows/check_and_update_missing_query_forms.yaml) workflow.\n\n"
+ "### Missing Forms Summary\n"
+ "| **Language** | **Forms Type** |\n"
+ "|:-------------|:---------------|\n"
)

# Create a dictionary to group features by language.
Expand Down Expand Up @@ -80,8 +80,8 @@ def pr_body(missing_features):

# Add grouped features to the PR body.
for language, features in sorted(grouped_features.items()):
feature_list = ", ".join(sorted(features))
pr_body_content += f"| **{language}** | {feature_list} |\n"
form_list = ", ".join(sorted(features))
pr_body_content += f"| **{language}** | {form_list} |\n"

pr_body_content += "\nPlease review the changes and provide feedback.\n"

Expand Down

0 comments on commit 5646a16

Please sign in to comment.