Skip to content

Commit

Permalink
Merge pull request #59 from wayofdev/ci/structure-updates
Browse files Browse the repository at this point in the history
  • Loading branch information
lotyp authored Aug 26, 2024
2 parents 2405fea + 417bc4b commit 0cb2139
Show file tree
Hide file tree
Showing 34 changed files with 756 additions and 108 deletions.
44 changes: 44 additions & 0 deletions .github/.commitlint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
// More info: https://github.com/wayofdev/npm-shareable-configs/blob/master/packages/commitlint-config/src/index.js
const automaticCommitPattern = /^chore\(release\):.*\[skip ci]/

export default {
extends: ['@commitlint/config-conventional'],
/*
This resolves a linting conflict between commitlint's body-max-line-length
due to @semantic-release/git putting release notes in the commit body
https://github.com/semantic-release/git/issues/331
*/
ignores: [(commitMessage) => automaticCommitPattern.test(commitMessage)],
rules: {
'body-leading-blank': [1, 'always'],
'body-max-line-length': [2, 'always', 120],
'footer-leading-blank': [1, 'always'],
'footer-max-line-length': [2, 'always', 120],
'header-max-length': [2, 'always', 100],
'scope-case': [2, 'always', 'lower-case'],
'subject-case': [2, 'never', ['sentence-case', 'start-case', 'pascal-case', 'upper-case']],
'subject-empty': [2, 'never'],
'subject-full-stop': [2, 'never', '.'],
'type-case': [2, 'always', 'lower-case'],
'type-empty': [2, 'never'],
'type-enum': [
2,
'always',
[
'feat', // New feature
'fix', // Bug fix
'perf', // Performance improvement
'docs', // Documentation changes
'style', // Code style update (formatting, missing semi colons, etc)
'deps', // Dependency updates
'refactor', // Code refactoring
'ci', // Continuous integration changes
'test', // Adding missing tests
'revert', // Revert to a previous commit
'build', // Changes that affect the build system
'chore', // Other changes that don't modify src or test files
'security', // Security improvements
],
],
},
}
65 changes: 65 additions & 0 deletions .github/.cz.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
// @see https://cz-git.qbb.sh/config/#configure-template
module.exports = {
alias: { fd: 'docs: fix typos' },
messages: {
type: 'Select the type of change that you\'re committing:',
scope: 'Denote the SCOPE of this change (optional):',
customScope: 'Denote the SCOPE of this change:',
subject: 'Write a SHORT, IMPERATIVE tense description of the change:\n',
body: 'Provide a LONGER description of the change (optional). Use "|" to break new line:\n',
breaking: 'List any BREAKING CHANGES (optional). Use "|" to break new line:\n',
footerPrefixesSelect: 'Select the ISSUES type of changeList by this change (optional):',
customFooterPrefix: 'Input ISSUES prefix:',
footer: 'List any ISSUES by this change. E.g.: #31, #34:\n',
generatingByAI: 'Generating your AI commit subject...',
generatedSelectByAI: 'Select suitable subject by AI generated:',
confirmCommit: 'Are you sure you want to proceed with the commit above?'
},
types: [
{ value: 'feat', name: 'feat: A new feature', emoji: ':sparkles:' },
{ value: 'fix', name: 'fix: A bug fix', emoji: ':bug:' },
{ value: 'perf', name: 'perf: A code change that improves performance', emoji: ':zap:' },
{ value: 'docs', name: 'docs: Documentation only changes', emoji: ':memo:' },
{ value: 'style', name: 'style: Changes that do not affect the meaning of the code', emoji: ':lipstick:' },
{ value: 'deps', name: 'deps: A dependency update', emoji: ':package:' },
{ value: 'refactor', name: 'refactor: A code change that neither fixes a bug nor adds a feature', emoji: ':recycle:' },
{ value: 'ci', name: 'ci: Changes to our CI configuration files and scripts', emoji: ':ferris_wheel:' },
{ value: 'test', name: 'test: Adding missing tests or correcting existing tests', emoji: ':white_check_mark:' },
{ value: 'revert', name: 'revert: Reverts a previous commit', emoji: ':rewind:' },
{ value: 'build', name: 'build: Changes that affect the build system or external dependencies', emoji: ':package:' },
{ value: 'chore', name: 'chore: Other changes that don\'t modify src or test files', emoji: ':hammer:' },
{ value: 'security', name: 'security: A code change that fixes a security issue', emoji: ':lock:' }
],
useEmoji: false,
emojiAlign: 'center',
useAI: false,
aiNumber: 1,
themeColorCode: '',
scopes: [],
allowCustomScopes: true,
allowEmptyScopes: true,
customScopesAlign: 'bottom',
customScopesAlias: 'custom',
emptyScopesAlias: 'empty',
upperCaseSubject: false,
markBreakingChangeMode: false,
allowBreakingChanges: ['feat', 'fix'],
breaklineNumber: 100,
breaklineChar: '|',
skipQuestions: [],
issuePrefixes: [{ value: 'closed', name: 'closed: ISSUES has been processed' }],
customIssuePrefixAlign: 'top',
emptyIssuePrefixAlias: 'skip',
customIssuePrefixAlias: 'custom',
allowCustomIssuePrefix: true,
allowEmptyIssuePrefix: true,
confirmColorize: true,
maxHeaderLength: Infinity,
maxSubjectLength: Infinity,
minSubjectLength: 0,
scopeOverrides: undefined,
defaultBody: '',
defaultIssues: '',
defaultScope: '',
defaultSubject: ''
}
7 changes: 7 additions & 0 deletions .github/.markdownlint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"$schema": "https://raw.githubusercontent.com/DavidAnson/markdownlint/main/schema/markdownlint-config-schema.json",
"line-length": false,
"no-inline-html": false,
"first-line-h1": false,
"no-duplicate-heading": false
}
73 changes: 73 additions & 0 deletions .github/.release-please-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
{
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json",
"release-type": "php",
"packages": {
".": {
"package-name": "docker-php-base",
"changelog-path": "/CHANGELOG.md"
}
},
"include-component-in-tag": false,
"changelog-sections": [
{
"type": "feat",
"section": "Features",
"hidden": false
},
{
"type": "fix",
"section": "Bug Fixes",
"hidden": false
},
{
"type": "perf",
"section": "Performance Improvements",
"hidden": false
},
{
"type": "docs",
"section": "Documentation",
"hidden": false
},
{
"type": "deps",
"section": "Dependencies",
"hidden": false
},
{
"type": "refactor",
"section": "Code Refactoring",
"hidden": false
},
{
"type": "test",
"section": "Tests",
"hidden": false
},
{
"type": "ci",
"section": "Continuous Integration",
"hidden": false
},
{
"type": "build",
"section": "Build System",
"hidden": true
},
{
"type": "chore",
"section": "Miscellaneous",
"hidden": true
},
{
"type": "style",
"section": "Styles",
"hidden": true
},
{
"type": "revert",
"section": "Reverts",
"hidden": true
}
]
}
3 changes: 3 additions & 0 deletions .github/.release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
".": "2.6.0"
}
7 changes: 1 addition & 6 deletions .yamllint → .github/.yamllint.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
---

extends: "default"
extends: default

# Overwrite above default rules
rules:
braces:
# Defaults
Expand Down Expand Up @@ -49,8 +48,4 @@ rules:

line-length: disable

yaml-files:
- "*.yaml"
- "*.yml"

...
3 changes: 3 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners

* @lotyp
8 changes: 4 additions & 4 deletions .github/CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ representative at an online or offline event.

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
the@wayof.dev.
<the@wayof.dev>.
All complaints will be reviewed and investigated promptly and fairly.

All community leaders are obligated to respect the privacy and security of the
Expand Down Expand Up @@ -116,13 +116,13 @@ the community.

This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.0, available at
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
<https://www.contributor-covenant.org/version/2/0/code_of_conduct.html>.

Community Impact Guidelines were inspired by [Mozilla's code of conduct
enforcement ladder](https://github.com/mozilla/diversity).

[homepage]: https://www.contributor-covenant.org

For answers to common questions about this code of conduct, see the FAQ at
https://www.contributor-covenant.org/faq. Translations are available at
https://www.contributor-covenant.org/translations.
<https://www.contributor-covenant.org/faq>. Translations are available at
<https://www.contributor-covenant.org/translations>.
Empty file added .github/CONTRIBUTING.md
Empty file.
5 changes: 5 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---

github: wayofdev

...
105 changes: 105 additions & 0 deletions .github/ISSUE_TEMPLATE/1-bug-report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
---

name: 🐞 Bug Report
description: Report an issue to help the project improve.
title: '[Bug]: '
labels: ['type: bug']

assignees:
- lotyp

body:
- type: markdown
attributes:
value: 🐞 **Bug Report**

- type: textarea
id: bug-description
attributes:
label: Describe the bug
description: Please provide a clear and detailed description of what the bug is. This helps us understand the issue quickly and look for potential fixes.
placeholder: Explain the bug in as much detail as possible...
validations:
required: true

- type: textarea
id: regression
attributes:
label: Is this a regression?
description: |
Was this functionality working in a previous version?
If yes, please mention the last version in which it worked properly.
Understanding regressions helps prioritize fixes.
placeholder: Yes or No, and details about the last working version...
validations:
required: false

- type: textarea
id: steps-to-reproduce
attributes:
label: To Reproduce
description: |
'Please provide step-by-step instructions that reproduce the issue:
1. Use x argument / navigate to...
2. Fill this information...
3. Go to...
4. See error
placeholder: Detailed steps to reproduce the bug...
validations:
required: true

- type: textarea
id: expected-behaviour
attributes:
label: Expected behaviour
description: |
Describe what you expected to happen.
Clear expectations help understand the gap between current and desired states.
placeholder: What did you expect to happen instead of the bug?
validations:
required: true

- type: textarea
id: media
attributes:
label: Media prove
description: If applicable, add screenshots or videos to better illustrate the issue. Visual aids can significantly aid in diagnosing problems quicker.
placeholder: Upload files or paste links here...
validations:
required: false

- type: textarea
id: environment
attributes:
label: Your environment
description: |
Provide detailed information about your environment to help us replicate the issue:
* OS: [e.g. Ubuntu]
* PHP version: [e.g. 8.2.2]
* Package version: [e.g. 1.0.0]
* Any relevant environment details
placeholder: List your environment details here...
validations:
required: false

- type: textarea
id: additional-context
attributes:
label: Additional context
description: Include any other context about the problem here, such as unusual system configurations, previous issues, or possible causes.
placeholder: Any additional information that could help us resolve the issue...
validations:
required: false

- type: markdown
attributes:
value: |
📛 To ensure a smooth issue processing, please check if a similar bug report has already been submitted before creating a new one.
We highly value your contributions, so please make sure to familiarize yourself with our repository's guidelines:
- [Code of Conduct](https://github.com/wayofdev/spiral-starter-tpl/blob/master/.github/CODE_OF_CONDUCT.md)
- [Contribution Guidelines](https://github.com/wayofdev/spiral-starter-tpl/blob/master/.github/CONTRIBUTING.md)
Additionally, consider joining our discussions on:
- [WayOfDev Discord Community](https://discord.gg/CE3TcCC5vr)
...
Loading

0 comments on commit 0cb2139

Please sign in to comment.