Skip to content
Closed
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
27 changes: 27 additions & 0 deletions .github/pr-title-checker-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"LABEL": {
"name": "title needs formatting",
"color": "EEEEEE"
},
"CHECKS": {
"prefixes": [
"fix: ",
"feat: ",
"hotfix: ",
"release: ",
"test: ",
"build: "
],
"regexp": "^(fix|feat|hotfix|release|test|build)\\((ECOM|JIRA)-[0-9]+\\):\\s.+$",
"regexpFlags": "i",
"ignoreLabels": [
"dont-check-PRs-with-this-label",
"meta"
]
},
"MESSAGES": {
"success": "PR title is correctly formatted.",
"failure": "PR title format is invalid. Required: <type>(<scope>): Task name — e.g. feat(ECOM-123): Add login screen",
"notice": "Valid types: fix, feat, hotfix, release, test, build. Valid scopes: ECOM-<num>, JIRA-<num>"
}
}
31 changes: 31 additions & 0 deletions .github/workflows/branch_name_check_action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
## name of your github action
name: Branch Name Action

## when will the action trigger
on:
pull_request:
types:
- opened
- edited
- synchronize
- reopened

## the action script
jobs:
validate-branch-name:
runs-on: ubuntu-latest
steps:
- name: Validate Branch Name Format
shell: bash
run: |
BRANCH_NAME="${{ github.head_ref }}"
echo "Branch name: $BRANCH_NAME"

if [[ ! "$BRANCH_NAME" =~ ^(feature|bugfix|hotfix|release)/ECOM-[0-9]+/[A-Za-z0-9._ -]+$ ]]; then
echo "Invalid branch name format: $BRANCH_NAME"
echo "Required: <type>/ECOM-<TicketNum>/<task name>"
echo "Example: feature/ECOM-27/Add login screen"
exit 1
fi

echo "Branch name format is valid"
30 changes: 30 additions & 0 deletions .github/workflows/dart_linting_action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
## name of your github action
name: Dart Linting Action

## when will the action trigger
on:
pull_request:
types:
- opened
- edited
- synchronize
- reopened

## the action script
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Clone repository
uses: actions/checkout@v4

- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
channel: stable
flutter-version: 3.35.2

- name: Run Dart Package Analyzer
uses: axel-op/dart-package-analyzer@v3
with:
githubToken: ${{ secrets.GITHUB_TOKEN }}
22 changes: 22 additions & 0 deletions .github/workflows/pr_title_check_action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
## name of your github action
name: PR Title Action

## when will the action trigger
on:
pull_request:
types:
- opened
- edited
- synchronize
- reopened

## the action script
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: thehanimo/pr-title-checker@v1.4.3
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
pass_on_octokit_error: false
configuration_path: .github/pr-title-checker-config.json
13 changes: 6 additions & 7 deletions .github/workflows/unit_testing_check_action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,15 @@ name: Flutter Unit Testing Action
## when will the action trigger
on:
pull_request:
push:
branches:
- main
- development
- release/*
- feature/*
types:
- opened
- edited
- synchronize
- reopened

## the action script
jobs:
main:
test:
runs-on: ubuntu-latest
steps:
- name: Clone repository
Expand Down
Loading
Loading