Skip to content

Commit

Permalink
Merge branch 'trunk' into questions-report
Browse files Browse the repository at this point in the history
  • Loading branch information
donnapep authored Jan 17, 2025
2 parents 28b99b8 + f835b0b commit 0acdc01
Show file tree
Hide file tree
Showing 1,006 changed files with 98,627 additions and 19,167 deletions.
8 changes: 7 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,16 @@ trim_trailing_whitespace = true
[*.{md,txt,json,yml}]
trim_trailing_whitespace = false

[*.{json}]
[*.json]
indent_size = 2
tab_width = 2

[*.{json,yml}]
insert_final_newline = false
indent_style = space

[composer.json]
indent_size = 4
tab_width = 4
indent_style = tab
insert_final_newline = true
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name: Bug report
about: Create a report to help us improve
title: ''
labels: "[Status] New, [Type] Bug"
labels: "[Status] Needs Triage, [Type] Bug"
assignees: ''

---
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name: Feature request
about: Suggest an idea for this project
title: ''
labels: "[Status] New, [Type] Enhancement"
labels: "[Status] Needs Triage, [Type] Enhancement"
assignees: ''

---
Expand Down
88 changes: 88 additions & 0 deletions .github/ISSUE_TEMPLATE/project_task.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
name: Project Task
description: A project task template
title: "Enable students to take a course"
body:
- type: markdown
attributes:
value: |
*TIP*: After write your task, please make sure it is following the [INVEST](https://en.wikipedia.org/wiki/INVEST_(mnemonic)) principles
- type: input
id: goal
attributes:
label: Goal
description: |
Describe the task goal in a single line or few lines from the user perspective. You can also use the "As a [who], I want [what] so that [why]." format.
placeholder: As a Student, I want to take a course, so that only I can access my course lessons.
validations:
required: true
- type: textarea
id: context
attributes:
label: Context [Optional]
description: Provide any contextual information that you believe is necessary to understand bettern the task.
validations:
required: false

- type: textarea
id: scope
attributes:
label: Scope
description: |
Provide a list of items that helps the team to understand what the task should **include**. Example:
* Endpoint
* Frontend
* Data validation
* Generic error message if something goes wrong
validations:
required: true

- type: textarea
id: out-of-scope
attributes:
label: Out of Scope
description: |
Provide a list of items that helps the team to understand what the task should **NOT include**. Example:
* Error cases. - All errors will be handled by the task #XXXX
validations:
required: true


- type: textarea
id: acceptance-criteria
attributes:
label: Acceptance Criteria
value: |
*Scenario: Happy Path*
*Given* <I am in a state X>
**When** <I do an action that changes the state>
**Then** <I should see the results of my action>
*Scenario: [Sad Path 1]*
*Given* <I am in a state X>
**When** <I do an action that changes the state>
**Then** <I should see the results of my action>
description: |
Describe the cases which the developers should match to ensure the task scope was completed.
It should include the happy path and the sad path.
**Tip** Use the spec by example format.
``Given <I am in a state X>
When <I do an action that changes the state>
Then <I should see the results of my action>``
Example:
**Given** I am on the Course List
**When** I click on the "Take course" button
**Then** I should see I am assigned to the course
validations:
required: true

- type: textarea
id: resources
attributes:
label: Resources
description: Screenshots and/or link to related resources that help to describe the task.
validations:
required: false
40 changes: 22 additions & 18 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,32 +1,36 @@
Fixes #

### Changes proposed in this Pull Request
Resolves #

## Proposed Changes
*

### Testing instructions

## Testing Instructions
<!--
If the functionality of this PR is behind a feature flag, please include the
following testing step, using the correct name for the feature flag. (If you
aren't sure, just ignore this step)
* Enable the feature flag: `add_filter( 'sensei_feature_flag_{THE_FLAG_NAME}', '__return_true' );`
Add as many details as possible to help others reproduce the issue and test the changes.
"Before / After" screenshots can also be very helpful when the change is visual.
-->
*

1.
2.
3.

## New/Updated Hooks
<!-- Add the following only if there are new/updated actions or filters. Please provide a brief description of what they do and any arguments they may take. Be sure to also add the "Hooks" label to this PR. -->
### New/Updated Hooks

*

## Deprecated Code
<!-- Add the following only if there is any code that is being deprecated. Please list the replacement function or hook that should be called instead, if applicable. Be sure to also add the "Deprecation" label to this PR. -->
### Deprecated Code

*

<!--
Helpful tips for screenshots:
https://en.support.wordpress.com/make-a-screenshot/
-->
### Screenshot / Video
## Pre-Merge Checklist
<!-- Complete applicable items on this checklist **before** merging. Items that are not applicable can be left unchecked.
Both the PR author and reviewer are responsible for ensuring the checklist is completed. -->
- [ ] PR title and description contain sufficient detail and accurately describe the changes
- [ ] Adheres to coding standards ([PHP](https://developer.wordpress.org/coding-standards/wordpress-coding-standards/php/), [JavaScript](https://developer.wordpress.org/coding-standards/wordpress-coding-standards/javascript/), [CSS](https://developer.wordpress.org/coding-standards/wordpress-coding-standards/css/), [HTML](https://developer.wordpress.org/coding-standards/wordpress-coding-standards/html/))
- [ ] All strings are translatable (without concatenation, handles plurals)
- [ ] Follows our naming conventions (P6rkRX-4oA-p2)
- [ ] Hooks (p6rkRX-1uS-p2) and functions are documented
- [ ] New UIs are responsive and use a [mobile-first approach](https://zellwk.com/blog/how-to-write-mobile-first-css/)
- [ ] Code is tested on the minimum supported PHP and WordPress versions
70 changes: 70 additions & 0 deletions .github/actions/deepen-to-merge-base/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: 'Deepen to merge-base'
description: 'Deepens a checkout to the merge-base with another branch.'
inputs:
head:
description: 'Branch (or other git refspec) to be checked out.'
default: ${{ github.event.pull_request.head.sha }}
branch:
description: 'Branch (or other git refspec) to deepen with respect to.'
default: ${{ github.event.pull_request.base.sha }}
checkout:
description: 'Whether to check out the head. Default is true.'
default: true
initial-depth:
description: 'Initial depth to check out.'
default: 10
path:
description: 'Directory to move to before starting. Default is to not change directory.'
default: '.'
outputs:
merge-base:
description: 'The merge-base sha found.'
value: ${{ steps.end.outputs.merge-base }}
runs:
using: composite
steps:
- name: 'Deepen'
shell: bash
env:
DEPTH: ${{ inputs.initial-depth }}
HEAD: ${{ inputs.head }}
BRANCH: ${{ inputs.branch }}
PATH: ${{ inputs.path }}
run: |
cd $PATH
depth=$DEPTH
echo "::group::Initial fetch to $depth"
echo "/usr/bin/git -c protocol.version=2 fetch --no-tags --prune --progress --no-recurse-submodules --depth=$depth origin $HEAD $BRANCH"
/usr/bin/git -c protocol.version=2 fetch --no-tags --prune --progress --no-recurse-submodules --depth=$depth origin "$HEAD" "$BRANCH"
echo "::endgroup::"
while ! /usr/bin/git merge-base "$HEAD" "$BRANCH" >/dev/null 2>&1; do
depth=$((depth * 2))
echo "::group::Deepen to $depth"
echo "/usr/bin/git -c protocol.version=2 fetch --no-tags --prune --progress --no-recurse-submodules --depth=$depth origin $HEAD $BRANCH"
/usr/bin/git -c protocol.version=2 fetch --no-tags --prune --progress --no-recurse-submodules --depth=$depth origin "$HEAD" "$BRANCH"
echo "::endgroup::"
done
- name: 'Check out new head'
shell: bash
env:
CHECKOUT: ${{ inputs.checkout }}
HEAD: ${{ inputs.head }}
PATH: ${{ inputs.path }}
run: |
cd $PATH
if [[ "$CHECKOUT" == "true" ]]; then
echo "/usr/bin/git checkout $HEAD"
/usr/bin/git checkout "$HEAD"
fi
- name: 'Output'
id: end
shell: bash
env:
HEAD: ${{ inputs.head }}
BRANCH: ${{ inputs.branch }}
PATH: ${{ inputs.path }}
run: |
cd $PATH
MERGE_BASE=$( /usr/bin/git merge-base "$HEAD" "$BRANCH" )
echo "Merge base is $MERGE_BASE"
echo "merge-base=$MERGE_BASE" >> $GITHUB_OUTPUT
36 changes: 36 additions & 0 deletions .github/actions/install-php/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Install PHP
description: Setup PHP and its dependencies

inputs:
php-version:
description: 'The PHP version to use'
required: false
default: '7.4'

extensions:
description: 'The PHP extensions to use'
required: false

runs:
using: 'composite'
steps:
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ inputs.php-version }}
tools: composer
coverage: none
extensions: ${{ inputs.extensions }}
- shell: bash
name: Get composer cache directory
id: composer-cache
run: |
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-
- shell: bash
name: Install PHP dependencies
run: composer install --no-ansi --no-interaction --prefer-dist --no-progress
7 changes: 4 additions & 3 deletions .github/workflows/build-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ jobs:
hookdocs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Updates the npm version
run: npm install -g npm@^8
- uses: actions/setup-node@v4
with:
node-version: 18
- uses: actions/checkout@v4
- name: npm install, and build docs
run: |
npm ci
Expand Down
Loading

0 comments on commit 0acdc01

Please sign in to comment.