diff --git a/.gitchangelog/.gitchangelog.rc b/.gitchangelog/.gitchangelog.rc index a2e98b4..89862d5 100644 --- a/.gitchangelog/.gitchangelog.rc +++ b/.gitchangelog/.gitchangelog.rc @@ -8,11 +8,11 @@ ignore_regexps = [ ] section_regexps = [ - ('Added', [r'^([aA]dd|[cC]reate)\s*']), - ('Changed', [r'^([cC]hange|[rR]efactor|[uU]pdate|[mM]ove)\s*']), + ('Added', [r'^([aA]dd|[cC]reate|[iI]mplement)\s*']), + ('Changed', [r'^([cC]hange|[rR]efactor|[uU]pdate|[mM]ove|[rR]evise)\s*']), ('Deprecated', [r'^[dD]eprecate\s*']), ('Removed', [r'^([rR]emove|[dD]elete)\s*']), - ('Fixed', [r'^[fF]ix\s*']), + ('Fixed', [r'^([fF]ix|[rR]epair)\s*']), ('Security', [r'^[sS]ecure\s*']), ('Other', None) ] diff --git a/.github/workflows/update-changelog.yml b/.github/workflows/update-changelog.yml index ec051f0..a2128ff 100644 --- a/.github/workflows/update-changelog.yml +++ b/.github/workflows/update-changelog.yml @@ -10,8 +10,8 @@ permissions: contents: write jobs: - pull-request-update-changelog: - if: github.event_name == 'pull_request' || github.event.pull_request.merged == true + update-changelog: + if: github.event.pull_request.merged == true || github.event_name == 'release' name: "Update Changelog" runs-on: ubuntu-latest @@ -44,42 +44,8 @@ jobs: commit_message: 'Update Changelog (!automated)' branch: master - release-update-changelog: - if: github.event_name == 'release' - name: "Update Changelog (Release)" - runs-on: ubuntu-latest - - steps: - - name: 'Generate Token' - uses: actions/create-github-app-token@v1 - id: token-generator - with: - app-id: ${{ secrets.TOKEN_GENERATOR_APP_ID }} - private-key: ${{ secrets.TOKEN_GENERATOR_PRIVATE_KEY }} - - - name: 'Checkout Branch' - uses: actions/checkout@v4 - with: - ref: master - fetch-depth: 0 - token: ${{ steps.token-generator.outputs.token }} - - - name: 'Initialize Environment' - uses: ./.github/actions/initialize-environment - - - name: 'Generate Changelog' - run: | - make generate_changelog - - - name: 'Push Changes' - if: success() - uses: stefanzweifel/git-auto-commit-action@v5 - with: - commit_message: 'Update Changelog (!automated)' - branch: master - - name: 'Retag Release' - if: success() + if: github.event_name == 'release' && success() uses: EndBug/latest-tag@latest with: ref: ${{ github.event.release.tag_name }} diff --git a/README.md b/README.md index dc06b5e..15710ef 100644 --- a/README.md +++ b/README.md @@ -30,5 +30,5 @@ about but haven't gotten the professional opportunity to try. ## Current state: -All changes can now be viewed in the [CHANGELOG](https://github.com/wesker-albert/cibo/CHANGELOG.md), +All changes can now be viewed in the [CHANGELOG](CHANGELOG.md), which is automatically generated in-house via a fork of [gitchangelog](https://github.com/wesker-albert/gitchangelog). diff --git a/STYLEGUIDE.md b/STYLEGUIDE.md index 0d51bd0..faef514 100644 --- a/STYLEGUIDE.md +++ b/STYLEGUIDE.md @@ -1,6 +1,6 @@ # Style Guide -Nitpicking is welcomed and encouraged, just as much as pushback. +Nitpicking is welcomed and encouraged, and so is pushback. ## General Principles @@ -10,14 +10,25 @@ Nitpicking is welcomed and encouraged, just as much as pushback. existing patterns, please suggest them. - Always be ` a e s t h e t i c `. +## Editor + +This project is fully intended to be worked on using VS Code. + +We leverage dev containers to make sure the local dev environment is clean and +homogenous. There are also a bunch of meticulously curated stylistic settings, rules +and recommended extensions included. + +Please use VS Code when interacting with this project. + ## File Structure We don't like huge monolithic files here. We prefer thoughtful, bitesized files that preferably contain reusable patterns. With the exception of text or JSON documents, -and within reason, please try to keep lines of code under 300 per file. +and within reason, please try to keep under 300 lines of code per file. Directory structure is also preferred to be kept as flat as possible, without being -cluttersome. Introducing sub-directories should be thoughtfully planned, and discussed. +cluttersome. Introducing sub-directories should be thoughtfully planned, and +discussed. ## CHANGELOG @@ -28,24 +39,26 @@ release is published. Don't worry about updating it manually. PR naming is kind of important, for reasons I'll later point out. -- First letter should be capitalized. -- No period at the end necessary. -- Should be no langer than a brief sentence. +- Follow [APA-style title case](https://apastyle.apa.org/style-grammar-guidelines/capitalization/title-case). +- No period at the end. +- No longer than a brief sentence. + +Including the substrings `!ignore` or `!automated` will result in the PR not showing +up in the CHANGELOG. -Names should begin with one of the following *present-tense* verbs: -- Add, Create -- Change, Refactor, Update, Move +**Names should begin with one of the following *present-tense* verbs**: +- Add, Create, Implement +- Change, Refactor, Update, Move, Revise - Deprecate - Remove, Delete -- Fix +- Fix, Repair - Secure One reason for the above, is the CHANGELOG generator looks for these terms, and then -will categorize the merge commits accordingly. The second reason is that it makes -git log searching much easier and more reliable. +will [categorize the merge commits](.gitchangelog/.gitchangelog.rc#L10-L18) +accordingly. -Naming of individual branch commits don't adhere to any specific requirements, just -don't go too wild. +Another reason is that it makes git log searching much easier and more reliable. ## Makefile @@ -53,13 +66,13 @@ Make the Makefile work for you. If you find you're constantly reusing a specific terminal command while working in this repository, it may be a good addition and useful alias for others. - ## Python OOP is king. This project leverages some pretty strong automated linting, formatting, and type -checking libraries. PR requests should be denied if there are any failures within. +checking libraries. Pull requests will not pass checks if there are any failures +within. In-code disabling of linting or checking rules is highly frowned upon. Very, very seldomly it may be necessary, primarily due to bugs or limitations with the tools we