Skip to content
Open
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
25 changes: 25 additions & 0 deletions .changesets/archive/2025-03-28-pr-18.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
title: "chore: update content type descriptions"
pr: 18
author: jasonbahl
type: chore
breaking: false
---

## What does this implement/fix? Explain your changes.

This adds support for passing `graphql_description` when registering a Post Type or Taxonomy. This field will be used as the description in the Schema for the Type representing the Post Type or Taxonomy.

In addition to adding support for the `graphql_description` arg, this also updates the descriptions for the built in post types and taxonomies, as well as the User, Menu and Comment types.

|GraphQL Type | Current Description | Improved Description |
|---------------|---------------------|----------------------|
| Category | "The category type" | "A taxonomy term that classifies content. Categories support hierarchy and can be used to create a nested structure." |
| Post | "The post type" | "A chronological content entry typically used for blog posts, news articles, or similar date-based content." |
| Page | "The page type" | "A standalone content entry generally used for static, non-chronological content such as About Us or Contact pages." |
| MediaItem | "The mediaItem type" | "Represents uploaded media, including images, videos, documents, and audio files." |
| User | "A User object" | "A registered user account. Users can be assigned roles, author content, and have various capabilities within the site." |
| Comment | "A Comment object" | "A response or reaction to content submitted by users. Comments are typically associated with a specific content entry." |
| Tag | "The tag type" | "A taxonomy term used to organize and classify content. Tags do not have a hierarchy and are generally used for more specific classifications." |
| PostFormat | "The postFormat type" | "A standardized classification system for content presentation styles. These formats can be used to display content differently based on type, such as "standard", "gallery", "video", etc." |
| Menu | "Menus are the containers for navigation items. Menus can be assigned to menu locations, which are typically registered by the active theme." | "Collections of navigation links. Menus can be assigned to designated locations and used to build site navigation structures." |
24 changes: 20 additions & 4 deletions .github/workflows/changeset-generation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,16 +123,18 @@ jobs:

if [[ -n "$EXISTING_CHANGESETS" ]]; then
echo "Found existing changeset(s) for PR #${{ steps.pr_info.outputs.pr_number }}, updating..."
# Remove existing changesets for this PR
rm $EXISTING_CHANGESETS
fi

# Write PR body to a temporary file to avoid shell interpretation issues
echo '${{ steps.pr_info.outputs.pr_body }}' > /tmp/pr_body.txt

# Generate/regenerate the changeset
node scripts/generate-changeset.js \
--pr="${{ steps.pr_info.outputs.pr_number }}" \
--title="${{ steps.pr_info.outputs.pr_title }}" \
--author="${{ steps.pr_info.outputs.pr_author }}" \
--body="${{ steps.pr_info.outputs.pr_body }}"
--body="$(cat /tmp/pr_body.txt)"

# Commit and push the changeset
git config --global user.name "GitHub Actions"
Expand Down Expand Up @@ -187,10 +189,21 @@ jobs:
- name: Check for existing release PR
id: check_pr
run: |
# Debug info
echo "Checking for PRs from develop to master..."
echo "Repository: ${{ github.repository }}"
echo "Owner: ${{ github.repository_owner }}"

# Check if there's already a PR from develop to master
PR_LIST=$(curl -s --max-time 30 -H "Authorization: token ${{ secrets.REPO_PAT }}" \
# Note: Removed the owner prefix from head as it's already in the repo context
PR_LIST=$(curl -s --max-time 30 \
-H "Authorization: token ${{ secrets.REPO_PAT }}" \
-H "Accept: application/vnd.github.v3+json" \
"https://api.github.com/repos/${{ github.repository }}/pulls?state=open&head=${{ github.repository_owner }}:develop&base=master")
"https://api.github.com/repos/${{ github.repository }}/pulls?state=open&head=develop&base=master")

# Debug the response
echo "API Response:"
echo "$PR_LIST" | jq '.'

# Add error handling for API response
if [[ $(echo "$PR_LIST" | jq -r 'if type=="array" then "valid" else "invalid" end') != "valid" ]]; then
Expand All @@ -200,12 +213,15 @@ jobs:
fi

PR_COUNT=$(echo "$PR_LIST" | jq length)
echo "Found $PR_COUNT matching PRs"

if [[ "$PR_COUNT" -gt 0 ]]; then
PR_NUMBER=$(echo "$PR_LIST" | jq -r '.[0].number')
echo "Found existing PR #${PR_NUMBER}"
echo "exists=true" >> $GITHUB_OUTPUT
echo "number=${PR_NUMBER}" >> $GITHUB_OUTPUT
else
echo "No existing PR found"
echo "exists=false" >> $GITHUB_OUTPUT
fi

Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## v2.1.2 - 2025-11-01

### Other Changes

- chore: update content type descriptions ([#18](https://github.com/jasonbahl/automation-tests/pull/18))

## v2.1.1 - 2025-03-19

### Bug Fixes
Expand Down
2 changes: 1 addition & 1 deletion constants.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ function graphql_setup_constants() {

// Plugin version.
if ( ! defined( 'WPGRAPHQL_VERSION' ) ) {
define( 'WPGRAPHQL_VERSION', '2.1.1' );
define( 'WPGRAPHQL_VERSION', '2.1.2' );
}

// Plugin Folder Path.
Expand Down
158 changes: 73 additions & 85 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading