Skip to content
Merged
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
32 changes: 32 additions & 0 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Build and Test

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
build-and-test:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'

- name: Restore dependencies
working-directory: ./FinTrackWebApi
run: dotnet restore

- name: Build
working-directory: ./FinTrackWebApi
run: dotnet build --no-restore --configuration Release

- name: Run Tests
working-directory: ./FinTrackWebApi
run: dotnet test --no-build --configuration Release --verbosity normal
36 changes: 36 additions & 0 deletions .github/workflows/commit-message-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Commit Message Format Check

on:
pull_request:
branches:
- main

jobs:
validate-commit-messages:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Validate commit messages
run: |
echo "⏳ Commit messages are being checked..."
INVALID_FOUND=0
COMMITS=$(git log origin/${{ github.base_ref }}..HEAD --pretty=format:"%s")
echo "$COMMITS" | while read COMMIT_MSG; do
echo "🔍 $COMMIT_MSG"
echo "$COMMIT_MSG" | grep -Eq "^(feat|fix|chore|docs|style|refactor|test|ci)(\(.+\))?: .{1,}" || {
echo "❌ Incorrect commit message:"
echo "$COMMIT_MSG"
INVALID_FOUND=1
}
done
if [ $INVALID_FOUND -eq 1 ]; then
echo "🚫 Commit message validation failed."
exit 1
else
echo "✅ All commit messages are valid."
fi
22 changes: 22 additions & 0 deletions .github/workflows/dependabot-pr-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Dependabot PR Test

on:
pull_request:
types: [opened, synchronize]
branches: [ main ]

jobs:
test-dependabot:
if: github.actor == 'dependabot[bot]'
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'

- run: dotnet restore
- run: dotnet build --no-restore --configuration Release
- run: dotnet test --no-build --configuration Release
24 changes: 24 additions & 0 deletions .github/workflows/format-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Format Check

on:
pull_request:
branches: [ main ]

jobs:
check-formatting:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'

- name: Install dotnet-format tool
run: dotnet tool install -g dotnet-format

- name: Check formatting
run: dotnet format .FinTrack.sln --verify-no-changes
23 changes: 23 additions & 0 deletions .github/workflows/secret-scan.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: 🔐 Secret Scan with Gitleaks

on:
pull_request:
branches: [main]
push:
branches: [main]

jobs:
secret-scan:
name: 🔎 Scan for Secrets
runs-on: ubuntu-latest

steps:
- name: 📥 Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: 🧪 Run Gitleaks scan
uses: gitleaks/gitleaks-action@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
9 changes: 6 additions & 3 deletions FinTrack/App.xaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
<Application x:Class="FinTrack.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:FinTrack"
StartupUri="MainWindow.xaml">
xmlns:local="clr-namespace:FinTrack">
<Application.Resources>

<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="/Styles/ModernStyles.xaml"/>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>
</Application>
35 changes: 9 additions & 26 deletions FinTrack/App.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,30 +1,13 @@
using System.Configuration;
using System.Data;
using System.Windows;
using Microsoft.Extensions.Configuration;
using System.Windows;

namespace FinTrack;

/// <summary>
/// Interaction logic for App.xaml
/// </summary>
public partial class App : Application
namespace FinTrack
{
public static IConfiguration Configuration { get; private set; }

protected override void OnStartup(StartupEventArgs e)
public partial class App : Application
{
base.OnStartup(e);

var builder = new ConfigurationBuilder()
.SetBasePath(AppContext.BaseDirectory)
.AddJsonFile("appsettings.json", optional: false, reloadOnChange: true);

Configuration = builder.Build();

// Örnek kullanım
string connStr = Configuration.GetConnectionString("PostgresConnection");
MessageBox.Show("Bağlantı: " + connStr);
protected override void OnStartup(StartupEventArgs e)
{
base.OnStartup(e);
new LoginWindow().Show();
}
}
}

}
2 changes: 1 addition & 1 deletion FinTrack/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System.Windows;

[assembly:ThemeInfo(
[assembly: ThemeInfo(
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
//(used if a resource is not found in the page,
// or application resource dictionaries)
Expand Down
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
109 changes: 0 additions & 109 deletions FinTrack/Codes/DataAccess/DBScheme.cs

This file was deleted.

Loading
Loading