-
Notifications
You must be signed in to change notification settings - Fork 7
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
395 changed files
with
15,558 additions
and
5,920 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: ASSETS | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- "dev" | ||
paths: | ||
- ".github/workflows/assets.yml" | ||
- "resources/**" | ||
- "package.json" | ||
|
||
jobs: | ||
build: | ||
name: Generator | ||
if: github.repository == 'ataslangit/sistem-informasi-desa' | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16 | ||
- name: Cache dependencies | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.npm | ||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.os }}-node- | ||
- name: Install Dependency | ||
run: npm install | ||
- name: Generate | ||
run: npm run build | ||
- name: Commit changes | ||
uses: stefanzweifel/git-auto-commit-action@v4 | ||
with: | ||
commit_message: "Assets auto generate" |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
name: PHPMD | ||
|
||
on: | ||
push: | ||
branches: ["dev"] | ||
pull_request: | ||
# The branches below must be a subset of the branches above | ||
branches: ["dev"] | ||
schedule: | ||
- cron: '27 4 * * 2' | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
analyze: | ||
name: Analyze | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read # for checkout to fetch code | ||
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results | ||
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@aa1fe473f9c687b6fb896056d771232c0bc41161 | ||
with: | ||
coverage: none | ||
tools: phpmd | ||
|
||
- name: Run PHPMD | ||
run: phpmd donjo-app sarif codesize,cleancode,naming,unusedcode --reportfile phpmd-results.sarif | ||
continue-on-error: true | ||
|
||
- name: Upload analysis results to GitHub | ||
uses: github/codeql-action/upload-sarif@v2 | ||
with: | ||
sarif_file: phpmd-results.sarif | ||
wait-for-processing: 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,43 @@ | ||
name: PULL_REQUEST | ||
|
||
on: | ||
pull_request_review: | ||
types: [submitted] | ||
|
||
permissions: | ||
actions: write | ||
contents: write | ||
pull-requests: write | ||
|
||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
PR_URL: ${{ github.event.pull_request._links.html.href }} | ||
|
||
jobs: | ||
build: | ||
name: MERGE & LOCK | ||
runs-on: ubuntu-22.04 | ||
if: >- | ||
github.event.review.state == 'APPROVED' && | ||
github.event.review.user.id == 2387514 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Get PR Title | ||
id: getTitle | ||
run: echo "title=$(gh pr view --json=title --jq '.title' $PR_URL)" >> $GITHUB_OUTPUT | ||
|
||
- name: Squash & Merge | ||
uses: "pascalgn/[email protected]" | ||
id: squashmerge | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
MERGE_METHOD: "squash" | ||
MERGE_LABELS: "dependencies" | ||
MERGE_COMMIT_MESSAGE: "(#{pullRequest.number}) ${{ steps.getTitle.outputs.title }}" | ||
|
||
- if: steps.squashmerge.outputs.mergeResult == 'merged' | ||
name: lock PR | ||
run: gh pr lock ${{ steps.squashmerge.outputs.pullRequestNumber }} -r "resolved" |
File renamed without changes.
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,31 @@ | ||
#!/bin/sh | ||
|
||
PROJECT=`php -r "echo dirname(dirname(dirname(realpath('$0'))));"` | ||
STAGED_PHP_FILES=`git diff --cached --name-only --diff-filter=ACMR HEAD | grep \\\\.php$` | ||
|
||
echo "Starting pre-commit..." | ||
|
||
if [ "$STAGED_PHP_FILES" != "" ]; then | ||
echo "Linting PHP code..." | ||
for FILE in $STAGED_PHP_FILES; do | ||
php -l -d display_errors=0 "$PROJECT/$FILE" | ||
|
||
if [ $? != 0 ]; then | ||
echo "Fix the error(s) before commit." | ||
exit 1 | ||
fi | ||
|
||
FILES="$FILES $FILE" | ||
done | ||
fi | ||
|
||
if [ "$FILES" != "" ]; then | ||
echo "Running PHP CS Fixer..." | ||
|
||
composer run csfix | ||
fi | ||
|
||
echo "Add all to stage changes..." | ||
git add . | ||
|
||
exit $? |
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,7 @@ | ||
#!/bin/sh | ||
|
||
# Install a pre-commit hook that | ||
# automatically runs php-cs-fixer to lint code | ||
mkdir -p .git/hooks | ||
cp admin/pre-commit .git/hooks/pre-commit | ||
chmod +x .git/hooks/pre-commit |
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
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
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
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.