-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
464 additions
and
541 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/bin/bash | ||
IFS=$'\n' | ||
for log in $(git log origin/main..$(git branch --show-current) --format='%s'); do | ||
echo $log | grep -P '^(?P<type>[a-z]+)(\((?P<scope>[a-z-]+)\))?(?P<breaking>!)?: (\[(?P<ticket>[A-Z0-9-]+)\] )?(?P<message>[^\n]+)(\n\n(?P<infos>.+))?$' >/dev/null | ||
if [ $? -eq 1 ]; then | ||
echo -e "The following log don't follow Conventionnal commits:\n\t$log" | ||
exit 1 | ||
fi | ||
done | ||
unset IFS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
reviewers: | ||
defaults: | ||
- repository-owners | ||
groups: | ||
repository-owners: | ||
- team:E-commerce-Plugins | ||
devops: | ||
- team:Platform | ||
|
||
files: | ||
'**': | ||
- repository-owners | ||
'.github/**': | ||
- devops | ||
|
||
options: | ||
number_of_reviewers: 2 | ||
ignore_draft: true | ||
enable_group_assignment: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
name: Auto Request Review | ||
|
||
on: | ||
- pull_request | ||
|
||
jobs: | ||
auto-request-review: | ||
name: Assign Reviewers | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out repository | ||
uses: actions/checkout@v4 | ||
- name: Request review based on files changes and/or groups the author belongs to | ||
uses: necojackarc/[email protected] | ||
with: | ||
token: ${{ secrets.AUTO_ASSIGN_REVIEWERS }} | ||
config: .github/reviewers.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: Run Tests | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
types: | ||
- opened | ||
- reopened | ||
- synchronize | ||
- ready_for_review | ||
|
||
env: | ||
PROJECT_NAME: ${{ github.event.repository.name }} | ||
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} | ||
|
||
jobs: | ||
check-commits: | ||
name: Check Commits Syntax | ||
runs-on: ubuntu-latest | ||
if: ${{ github.event_name == 'push' || !github.event.pull_request.draft }} | ||
steps: | ||
- name: Clone repository | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
ref: ${{ github.event.pull_request.head.sha }} | ||
- name: Check commits | ||
shell: bash | ||
continue-on-error: true | ||
run: | | ||
/bin/bash .github/conventional-commit-checker.sh | ||
# TODO: Unit-tests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
name: Release | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
types: [closed] | ||
|
||
permissions: | ||
contents: write | ||
pull-requests: write | ||
|
||
env: | ||
PROJECT_NAME: ${{ github.event.repository.name }} | ||
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} | ||
|
||
jobs: | ||
get-next-version: | ||
name: Determine Next Version | ||
runs-on: ubuntu-latest | ||
if: ${{ github.event.pull_request.merged }} | ||
outputs: | ||
next-version: ${{ steps.semver.outputs.next || steps.semver.outputs.current }} | ||
steps: | ||
- name: Clone repository | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- name: Get next version | ||
id: semver | ||
uses: ietf-tools/semver-action@main | ||
with: | ||
token: ${{ github.token }} | ||
patchList: fix, refactor, misc | ||
noVersionBumpBehavior: current | ||
noNewCommitBehavior: current | ||
|
||
release-please: | ||
name: Create a Release and a version tag | ||
needs: [get-next-version] | ||
runs-on: ubuntu-latest | ||
if: ${{ github.event.pull_request.merged }} | ||
outputs: | ||
image-tag: ${{ steps.release-please.outputs.tag_name }} | ||
steps: | ||
- name: Check out repository | ||
uses: actions/checkout@v4 | ||
- name: Release please | ||
uses: google-github-actions/release-please-action@v3 | ||
id: release-please | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
release-type: php | ||
package-name: plugin-woocommerce | ||
default-branch: main | ||
changelog-types: | | ||
[ | ||
{"type":"feat","section":"Features","hidden":false}, | ||
{"type":"fix","section":"Bug Fixes","hidden":false}, | ||
{"type":"refactor","section":"Refactoring","hidden":false}, | ||
{"type":"misc","section":"Miscellaneous","hidden":false} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.