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
30 changes: 30 additions & 0 deletions .github/workflows/branch_name_check_action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
## 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
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 format: <type>/ECOM-<TicketNum>/<task name>"
echo "Example: feature/ECOM-27/Initialize Project"
exit 1
fi

echo "Valid branch name"
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 }}
33 changes: 33 additions & 0 deletions .github/workflows/pr_title_check_action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
## 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:
pr_title:
runs-on: ubuntu-latest
steps:
- name: Check PR Title
env:
PR_TITLE: ${{ github.event.pull_request.title }}
run: |
echo "Validating PR title: $PR_TITLE"

if [[ ! "$PR_TITLE" =~ ^(fix|release|feat|hotfix|build|test)\((ECOM-[0-9]+|JIRA-[0-9]+)\):\s.+$ ]]; then
echo "Invalid PR title format: '$PR_TITLE'"
echo "Required format: <type>(<scope>): task name"
echo "Allowed types: fix, release, feat, hotfix, build, test"
echo "Allowed scopes: ECOM-<num>, JIRA-<num>"
echo "Example: feat(ECOM-27): Add login screen"
exit 1
fi

echo "PR title format is valid!"
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