Skip to content

Commit ac853c5

Browse files
committed
Build the basic skeleton
1 parent 07b9875 commit ac853c5

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+10174
-2481
lines changed

.github/CONTRIBUTING.md

+55
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# Contributing
2+
3+
Contributions are **welcome** and will be fully **credited**.
4+
5+
Please read and understand the contribution guide before creating an issue or pull request.
6+
7+
## Etiquette
8+
9+
This project is open source, and as such, the maintainers give their free time to build and maintain the source code
10+
held within. They make the code freely available in the hope that it will be of use to other developers. It would be
11+
extremely unfair for them to suffer abuse or anger for their hard work.
12+
13+
Please be considerate towards maintainers when raising issues or presenting pull requests. Let's show the
14+
world that developers are civilized and selfless people.
15+
16+
It's the duty of the maintainer to ensure that all submissions to the project are of sufficient
17+
quality to benefit the project. Many developers have different skillsets, strengths, and weaknesses. Respect the maintainer's decision, and do not be upset or abusive if your submission is not used.
18+
19+
## Viability
20+
21+
When requesting or submitting new features, first consider whether it might be useful to others. Open
22+
source projects are used by many developers, who may have entirely different needs to your own. Think about
23+
whether or not your feature is likely to be used by other users of the project.
24+
25+
## Procedure
26+
27+
Before filing an issue:
28+
29+
- Attempt to replicate the problem, to ensure that it wasn't a coincidental incident.
30+
- Check to make sure your feature suggestion isn't already present within the project.
31+
- Check the pull requests tab to ensure that the bug doesn't have a fix in progress.
32+
- Check the pull requests tab to ensure that the feature isn't already in progress.
33+
34+
Before submitting a pull request:
35+
36+
- Check the codebase to ensure that your feature doesn't already exist.
37+
- Check the pull requests to ensure that another person hasn't already submitted the feature or fix.
38+
39+
## Requirements
40+
41+
If the project maintainer has any additional requirements, you will find them listed here.
42+
43+
- **[PSR-2 Coding Standard](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md)** - The easiest way to apply the conventions is to install [PHP Code Sniffer](https://pear.php.net/package/PHP_CodeSniffer).
44+
45+
- **Add tests!** - Your patch won't be accepted if it doesn't have tests.
46+
47+
- **Document any change in behaviour** - Make sure the `README.md` and any other relevant documentation are kept up-to-date.
48+
49+
- **Consider our release cycle** - We try to follow [SemVer v2.0.0](https://semver.org/). Randomly breaking public APIs is not an option.
50+
51+
- **One pull request per feature** - If you want to do more than one thing, send multiple pull requests.
52+
53+
- **Send coherent history** - Make sure each individual commit in your pull request is meaningful. If you had to make multiple intermediate commits while developing, please [squash them](https://www.git-scm.com/book/en/v2/Git-Tools-Rewriting-History#Changing-Multiple-Commit-Messages) before submitting.
54+
55+
**Happy coding**!

.github/FUNDING.yml

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# These are supported funding model platforms
2+
3+
patreon: guanguans
4+
custom: https://www.guanguans.cn/images/wechat.jpeg

.github/ISSUE_TEMPLATE/bug_report.md

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: bug
6+
assignees: guanguans
7+
8+
---
9+
10+
**Describe the bug**
11+
A clear and concise description of what the bug is.
12+
13+
**To Reproduce**
14+
Steps to reproduce the behavior:
15+
1. Go to '……'
16+
2. Click on '……'
17+
3. Scroll down to '……'
18+
4. See error
19+
20+
**Expected behavior**
21+
A clear and concise description of what you expected to happen.
22+
23+
**Screenshots**
24+
If applicable, add screenshots to help explain your problem.
25+
26+
**Additional context**
27+
Add any other context about the problem here.
+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: good idea
6+
assignees: guanguans
7+
8+
---
9+
10+
**Is your feature request related to a problem? Please describe.**
11+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12+
13+
**Describe the solution you'd like**
14+
A clear and concise description of what you want to happen.
15+
16+
**Describe alternatives you've considered**
17+
A clear and concise description of any alternative solutions or features you've considered.
18+
19+
**Additional context**
20+
Add any other context or screenshots about the feature request here.

.github/SECURITY.md

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Security Policy
2+
3+
If you discover any security related issues, please email [email protected] instead of using the issue tracker.

.github/auto-comment.yml

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Comment to a new issue.
2+
issueOpened: >
3+
Thank your for raising a issue. We will try and get back to you as soon as possible.
4+
5+
Please make sure you have given us as much context as possible.
6+
7+
pullRequestOpened: >
8+
Thank your for raising your pull request.
9+
10+
Please make sure you have followed our contributing guidelines. We will review it as soon as possible

.github/ci-reporter.yml

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Set to false to create a new comment instead of updating the app's first one
2+
updateComment: true
3+
4+
# Use a custom string, or set to false to disable
5+
before: "✨ Good work on this PR so far! ✨ Unfortunately, the [ build]() is failing as of . Here's the output:"
6+
7+
# Use a custom string, or set to false to disable
8+
after: "I'm sure you can fix it! If you need help, don't hesitate to ask a maintainer of the project!"

.github/config.yml

+78
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
# Configuration for todo - https://github.com/JasonEtco/todo
2+
todo:
3+
keyword: "@todo"
4+
5+
6+
7+
# Configuration for new-issue-welcome - https://github.com/behaviorbot/new-issue-welcome
8+
# Comment to be posted to on first time issues
9+
newIssueWelcomeComment: >
10+
Thanks for opening your first issue here! Be sure to follow the issue template!
11+
12+
# Configuration for new-pr-welcome - https://github.com/behaviorbot/new-pr-welcome
13+
# Comment to be posted to on PRs from first time contributors in your repository
14+
newPRWelcomeComment: >
15+
Thanks for opening this pull request! Please check out our contributing guidelines.
16+
17+
# Configuration for first-pr-merge - https://github.com/behaviorbot/first-pr-merge
18+
# Comment to be posted to on pull requests merged by a first time user
19+
firstPRMergeComment: >
20+
Congrats on merging your first pull request! We here at behaviorbot are proud of you!
21+
# It is recommend to include as many gifs and emojis as possible
22+
23+
24+
25+
# Configuration for request-info - https://github.com/behaviorbot/request-info
26+
# *OPTIONAL* Comment to reply with
27+
# Can be either a string :
28+
requestInfoReplyComment: >
29+
We would appreciate it if you could provide us with more info about this issue/pr!
30+
31+
# Or an array:
32+
# requestInfoReplyComment:
33+
# - Ah no! young blade! That was a trifle short!
34+
# - Tell me more !
35+
# - I am sure you can be more effusive
36+
37+
38+
# *OPTIONAL* default titles to check against for lack of descriptiveness
39+
# MUST BE ALL LOWERCASE
40+
requestInfoDefaultTitles:
41+
- update readme.md
42+
- updates
43+
44+
# *OPTIONAL* Label to be added to Issues and Pull Requests with insufficient information given
45+
requestInfoLabelToAdd: needs-more-info
46+
47+
# *OPTIONAL* Require Issues to contain more information than what is provided in the issue templates
48+
# Will fail if the issue's body is equal to a provided template
49+
checkIssueTemplate: true
50+
51+
# *OPTIONAL* Require Pull Requests to contain more information than what is provided in the PR template
52+
# Will fail if the pull request's body is equal to the provided template
53+
checkPullRequestTemplate: true
54+
55+
# *OPTIONAL* Only warn about insufficient information on these events type
56+
# Keys must be lowercase. Valid values are 'issue' and 'pullRequest'
57+
requestInfoOn:
58+
pullRequest: true
59+
issue: true
60+
61+
# *OPTIONAL* Add a list of people whose Issues/PRs will not be commented on
62+
# keys must be GitHub usernames
63+
requestInfoUserstoExclude:
64+
- guannguans
65+
66+
67+
# Configuration for update-docs - https://github.com/behaviorbot/update-docs
68+
# Comment to be posted to on PRs that don't update documentation
69+
updateDocsComment: >
70+
Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would update some of our documentation based on your changes.
71+
72+
updateDocsWhiteList:
73+
- bug
74+
- chore
75+
76+
updateDocsTargetFiles:
77+
- README
78+
- docs/

.github/dependabot.yml

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: github-actions
4+
directory: "/"
5+
schedule:
6+
interval: daily
7+
time: "21:00"
8+
open-pull-requests-limit: 10
9+
10+
- package-ecosystem: composer
11+
directory: "/"
12+
schedule:
13+
interval: daily
14+
time: "21:00"
15+
open-pull-requests-limit: 10

.github/release-drafter.yml

Whitespace-only changes.

.github/stale.yml

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Number of days of inactivity before an issue becomes stale
2+
daysUntilStale: 60
3+
# Number of days of inactivity before a stale issue is closed
4+
daysUntilClose: 7
5+
# Issues with these labels will never be considered stale
6+
exemptLabels:
7+
- pinned
8+
- security
9+
# Label to use when marking an issue as stale
10+
staleLabel: wontfix
11+
# Comment to post when marking an issue as stale. Set to `false` to disable
12+
markComment: >
13+
This issue has been automatically marked as stale because it has not had
14+
recent activity. It will be closed if no further activity occurs. Thank you
15+
for your contributions.
16+
# Comment to post when closing a stale issue. Set to `false` to disable
17+
closeComment: false

.github/workflows/bump.yml

+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: "bump version"
2+
3+
on:
4+
release:
5+
types: [ released ]
6+
7+
env:
8+
COMPOSER_FLAGS: "--ansi --no-interaction --no-progress --no-suggest --prefer-dist --no-dev"
9+
10+
jobs:
11+
update:
12+
runs-on: ubuntu-latest
13+
name: Build PHAR
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
php: [ 7.2.5 ]
18+
19+
steps:
20+
- name: Checkout code
21+
uses: actions/[email protected]
22+
with:
23+
ref: master
24+
25+
- name: Setup PHP
26+
uses: shivammathur/setup-php@v2
27+
with:
28+
php-version: ${{ matrix.php }}
29+
ini-values: phar.readonly=0
30+
tools: composer
31+
coverage: none
32+
33+
- name: Install dependencies
34+
run: "composer install ${{ env.COMPOSER_FLAGS }}"
35+
36+
- name: Update Changelog
37+
uses: stefanzweifel/changelog-updater-action@v1
38+
with:
39+
latest-version: ${{ github.event.release.name }}
40+
release-notes: ${{ github.event.release.body }}
41+
42+
- name: Build PHAR
43+
run: ./ai-commit app:build --build-version=${{ github.event.release.name }}
44+
45+
- name: Commit bump
46+
uses: stefanzweifel/git-auto-commit-action@v4
47+
with:
48+
branch: master
49+
commit_message: Bump to ${{ github.event.release.name }}
50+
file_pattern: builds/ai-commit CHANGELOG.md
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: dependabot-auto-merge
2+
on: pull_request_target
3+
4+
permissions:
5+
pull-requests: write
6+
contents: write
7+
8+
jobs:
9+
dependabot:
10+
runs-on: ubuntu-latest
11+
if: ${{ github.actor == 'dependabot[bot]' }}
12+
steps:
13+
14+
- name: Dependabot metadata
15+
id: metadata
16+
uses: dependabot/[email protected]
17+
with:
18+
github-token: "${{ secrets.GITHUB_TOKEN }}"
19+
20+
- name: Auto-merge Dependabot PRs for semver-minor updates
21+
if: ${{steps.metadata.outputs.update-type == 'version-update:semver-minor'}}
22+
run: gh pr merge --auto --merge "$PR_URL"
23+
env:
24+
PR_URL: ${{github.event.pull_request.html_url}}
25+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
26+
27+
- name: Auto-merge Dependabot PRs for semver-patch updates
28+
if: ${{steps.metadata.outputs.update-type == 'version-update:semver-patch'}}
29+
run: gh pr merge --auto --merge "$PR_URL"
30+
env:
31+
PR_URL: ${{github.event.pull_request.html_url}}
32+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: GPT Commits summarizer
2+
# Summary: This action will write a comment about every commit in a pull request, containing major points
3+
# Add a comment
4+
5+
on:
6+
pull_request:
7+
types: [ opened, synchronize ]
8+
9+
jobs:
10+
summarize:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: KanHarI/gpt-commit-summarizer@master
15+
env:
16+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
17+
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}

.github/workflows/greetings.yml

Whitespace-only changes.

.github/workflows/label.yml

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# This workflow will triage pull requests and apply a label based on the
2+
# paths that are modified in the pull request.
3+
#
4+
# To use this workflow, you will need to set up a .github/labeler.yml
5+
# file with configuration. For more information, see:
6+
# https://github.com/actions/labeler
7+
8+
name: labeler
9+
on: [pull_request]
10+
11+
jobs:
12+
label:
13+
14+
runs-on: ubuntu-latest
15+
permissions:
16+
contents: read
17+
pull-requests: write
18+
19+
steps:
20+
- uses: actions/labeler@v4
21+
with:
22+
repo-token: "${{ secrets.GITHUB_TOKEN }}"

.github/workflows/lint-md.yml

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: lint markdown
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
lint-markdown:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- name: Checkout
10+
uses: actions/checkout@v3
11+
12+
- name: lint-md-github-action
13+
uses: lint-md/[email protected]
14+
with:
15+
configFile: .lintmdrc
16+
failOnWarnings: false
17+
files: ./ ./.github/ ./docs/

0 commit comments

Comments
 (0)