Skip to content

Commit

Permalink
Merge branch 'develop' into comments
Browse files Browse the repository at this point in the history
  • Loading branch information
moonmeister committed Oct 10, 2023
2 parents b02e84f + 5d69454 commit 1881c29
Show file tree
Hide file tree
Showing 633 changed files with 110,892 additions and 46,106 deletions.
5 changes: 5 additions & 0 deletions .codeclimate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
version: "2"
checks:
method-lines:
config:
threshold: 40
7 changes: 7 additions & 0 deletions .distignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,16 @@
/github
/plugin-build
/documentation
/docs
/img
/phpstan
/tests
/docker
/docker-output
/tests
/node_modules
/packages
/artifacts

.DS_Store
.coveralls.yml
Expand All @@ -39,3 +43,6 @@ phpstan.neon.dist
phpunit.xml.dist
README.md
schema.graphql



7 changes: 6 additions & 1 deletion .env.dist
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ WP_URL=http://localhost
WP_DOMAIN=localhost
ADMIN_EMAIL=admin@example.com
ADMIN_USERNAME=admin
ADMIN_PASSWORD=root
ADMIN_PASSWORD=password
ADMIN_PATH=/wp-admin

TEST_DB_NAME=wptests
Expand All @@ -29,3 +29,8 @@ TESTS_ENVS=tests/_envs
CORE_BRANCH=develop
SKIP_TESTS_CLEANUP=1
SUITES=wpunit

WORDPRESS_DB_HOST=${DB_HOST}
WORDPRESS_DB_USER=${DB_USER}
WORDPRESS_DB_PASSWORD=${DB_PASSWORD}
WORDPRESS_DB_NAME=${DB_NAME}
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,5 @@
/phpstan export-ignore
/phpstan.neon.dist export-ignore
/schema.graphql export-ignore
/node_modules export-ignore
/artifacts export-ignore
78 changes: 78 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
name: Bug report
description: Report a bug in WPGraphQL
body:
- type: markdown
attributes:
value: >-
Thank you for taking the time to report a possible bug!
Before submitting a bug report, please take a minute to review the [WPGraphQL Debugging Guide](https://www.wpgraphql.com/docs/debugging) so you can share the necessary information to help us debug your issue.
Please remember, a bug report is _not the place to ask questions_. You can
use [Slack](https://join.slack.com/t/wp-graphql/shared_invite/zt-3vloo60z-PpJV2PFIwEathWDOxCTTLA) for that, or start a topic in [GitHub
Discussions](https://github.com/wp-graphql/wp-graphql/discussions).
- type: textarea
attributes:
label: Description
description: >-
Please write a brief description of the bug, including what you expected and what actually happened.
validations:
required: true
- type: textarea
attributes:
label: Steps to reproduce
description: >-
Please list the all the steps needed to reproduce the bug in an *isolated* way (e.g. a clonable GitHub repository, or a WPGraphQL snippet that works on a clean environment ).
placeholder: >-
1. Go to "..."
2. Query:
```graphql
query {
}
3. Result show X but should be Y
validations:
required: true
- type: textarea
attributes:
label: Additional context
description: >-
Add any other context about the problem here, such as screenshots, error logs, etc.
- type: input
attributes:
label: WPGraphQL Version
validations:
required: true
- type: input
attributes:
label: WordPress Version
validations:
required: true
- type: input
attributes:
label: PHP Version
validations:
required: true
- type: textarea
attributes:
label: Additional environment details
description: Frontend framework, additional WGraphQL extensions (and their versions), etc.
- type: checkboxes
attributes:
label: Please confirm that you have searched existing issues in the repo.
description: >-
You can do this by searching https://github.com/wp-graphql/wp-graphql/issues.
options:
- label: 'Yes'
required: true
- type: checkboxes
attributes:
label: >-
Please confirm that you have disabled ALL plugins except for WPGraphQL.
description: >-
Ideally, bugs should be reproduced in isolation, and all other plugins should be disabled. However, if your bug involves compatibility issues with other plugins, please share them (along with their version info) in `Additional environment details` above.
options:
- label: 'Yes'
required: false
- label: My issue is with compatibility with a specific WordPress plugin, and I have listed all my installed plugins (and version info) above.
required: false
8 changes: 8 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
blank_issues_enabled: false
contact_links:
- name: General Help Request
url: https://github.com/wp-graphql/wp-graphql/discussions
about: For general questions and help requests, create a new topic in Github Discussions
- name: Slack Community
url: https://join.slack.com/t/wp-graphql/shared_invite/zt-3vloo60z-PpJV2PFIwEathWDOxCTTLA
about: The WPGraphQL Slack is a great place to communicate in real-time. Ask questions, discuss features, get to know other folks using WPGraphQL.
40 changes: 40 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Feature request
description: Suggest an idea, feature, or enhancement for WPGraphQL.
body:
- type: markdown
attributes:
value: >-
Thank you for taking the time to submit a feature request.
Please make sure to search the repo for [existing feature
requests](https://github.com/wp-graphql/wp-graphql/issues)
before creating a new one.
- type: textarea
attributes:
label: What problem does this address?
description: >-
Please describe the problem you are trying to solve, including why you
think this is a problem.
placeholder: I'm always frustrated when [...]
validations:
required: true
- type: textarea
attributes:
label: What is your proposed solution?
description: >-
Please provide a clear and concise description of your suggested
solution.
placeholder: What I'd like to see happen is [...]
validations:
required: true
- type: textarea
attributes:
label: What alternatives have you considered?
description: >-
Please list any alternatives you have considered, and why you think your
solution is better.
- type: textarea
attributes:
label: Additional Context
description: Add any other context or screenshots about the feature request here.
12 changes: 8 additions & 4 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
### Your checklist for this pull request
Thanks for sending a pull request! Please make sure you click the link above to view the contribution guidelines, then fill out the blanks below.
🚨 Please review the [guidelines for contributing](/.github/CONTRIBUTING.md) to this repository.
🚨 Please review the guidelines for contributing to this repository: https://github.com/wp-graphql/wp-graphql/blob/develop/.github/CONTRIBUTING.md
- [ ] Make sure you are making a pull request against the **develop branch** (left side). Also you should start *your branch* off *our develop*.
- [ ] Make sure your PR title follows Conventional Commit standards. See: https://www.conventionalcommits.org/en/v1.0.0/#specification . Allowed prefixes: `build`, `chore`, `ci`, `docs`, `feat`, `fix`, `perf`, `refactor`, `revert`, `style`, `test`
- [ ] Make sure you are making a pull request against the **develop branch** (left side). Also you should start *your branch* off *our master*.
- [ ] Make sure you are requesting to pull request from a **topic/feature/bugfix branch** (right side). Don't pull request from your master!
-->
Expand All @@ -17,12 +18,15 @@ What does this implement/fix? Explain your changes.

Does this close any currently open issues?
------------------------------------------
<!--
### Write "closes #{pr number}"
### see: https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword
-->


Any relevant logs, error output, GraphiQL screenshots, etc?
-------------------------------------
(If it’s long, please paste to https://ghostbin.com/ and insert the link here.)
<!-- (If it’s long, please paste to https://ghostbin.com/ and insert the link here.) -->


Any other comments?
Expand Down
21 changes: 21 additions & 0 deletions .github/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Number of days of inactivity before an issue becomes stale
daysUntilStale: 90
# Stalebot will close issues marked "stale?" if they have not been triaged after 90 days.
# See https://github.com/wp-graphql/wp-graphql/issues/2494
daysUntilClose: false
# Issues with these labels will never be considered stale
exemptLabels:
- "not stale"
- "🚨 Importance: Critical"
- "Ready for Review"
- "Release"
- "Target: v2.0"
- "status: blocked"
# Stalebot will mark issues as stale? after 90 days
# If stale? issues haven't been triaged after another 90 days, they will be closed.
# See: https://github.com/wp-graphql/wp-graphql/issues/2494
staleLabel: "stale?"
# Comment to post when marking an issue as stale. Set to `false` to disable
markComment: >
This issue has been automatically marked as stale because it has not had
recent activity. You can help keep it active by commenting with additional information or even just confirming the issue still exists. We thank you for your contributions.
56 changes: 56 additions & 0 deletions .github/workflows/build-graphiql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# This workflow tracks changes to the "packages" and "build" directories
# and if changes are detected, we run npm scripts to re-build the GraphiQL app
# and commit the changes
name: build-graphiql

on:
push:
# Build GraphiQL only if changes were made to "packages" or "build" directory
paths:
- "packages/**"
- "build/**"
branches:
- develop
- master

jobs:
# Check to see if changes were made to the packages directory or the build directory in the PR
build-graphiql:
name: Build GraphiQL
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}
token: ${{ secrets.PAT }}

# Install and build the GraphiQL App
- name: Install NPM Dependencies and Build the GraphiQL App
id: install-and-build
run: |
npm ci && npm run build
# Setup Git Config
- name: setup git config
run: |
git config user.name "GitHub Actions Bot"
git config user.email "<>"
# Commit the built assets for GraphiQL back to the repo
- name: Commit built GraphiQL
id: commit-changes
run: |
git add --force build
set +e # Grep succeeds with nonzero exit codes to show results.
git status | grep modified
if [ $? -eq 0 ]
then
set -e
git commit -m "Apply GraphiQL build changes"
git push
else
set -e
echo "No changes since last run"
fi
44 changes: 26 additions & 18 deletions .github/workflows/code-quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,35 +8,43 @@ on:
pull_request:
branches:
- develop
- master

jobs:
run:
runs-on: ubuntu-latest
name: Check code
strategy:
matrix:
php: [ 8.1 ]

steps:
- name: Cancel previous runs of this workflow (pull requests only)
if: ${{ github.event_name == 'pull_request' }}
uses: styfle/cancel-workflow-action@0.11.0
with:
access_token: ${{ github.token }}

- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 7.4.5
extensions: mbstring, intl
tools: composer

- name: Get Composer Cache Directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"

- name: Cache dependencies
uses: actions/cache@v2
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer

php-version: ${{ matrix.php }}
tools: composer:v2
coverage: none

- name: Install dependencies
run: composer install --no-progress
uses: ramsey/composer-install@v2
with:
composer-options: "--no-progress"

- name: Run PHPStan
run: composer run-script phpstan
# If STEP_DEBUG is enabled, PHPStan will run in debug mode.
run: |
if [ "${{ secrets.ACTIONS_STEP_DEBUG }}" = "true" ]; then
php vendor/bin/phpstan analyse --memory-limit=2G --debug
else
composer run-script phpstan
fi
Loading

0 comments on commit 1881c29

Please sign in to comment.