Skip to content

Conversation

@ViTeXFTW
Copy link

@ViTeXFTW ViTeXFTW commented Mar 27, 2025

Change list

  • docs: Markdown file specifying how to use the new PR standard.
  • ci: PR template that is automatically loaded when a PR is opened.
  • ci: PR linter which ensures the standard is kept. Writes a comment with errors if any, otherwise writes pass comment.
  • ci: Changelog generator script that runs every time a PR is merged into main branch. The file is stored in changelog/unreleased/*

Additional Notes

Changelog standard

The changelog standard is based around PRs, to lessen the requirements for writing commit messages, and to not have a log file for each commit. When a PR is opened the required sections is already in the PR template. These fields are used for generated the bare minimum of the changelog file. There are optional fields that can be filled if applicable or deleted if unused. Lastly there is a field for writing stuff unrelated to the changelog file. The generated files is based on GeneralsGamePatch changelog files.


Flow

flowchart TD
    A[User Opens PR] --> B[Automated Linting]
    B --> C{Linting Passed?}
    C -->|Yes| D[Manual Review]
    C -->|No| E[Comment Errors]
    E --> L[Update PR]
    L --> B
    D --> F{Approved?}
    F -->|Yes| G[Merge PR]
    F -->|No| H[Request Changes]
    H --> L
    G --> I[Generate Changelog]
    I --> J[Commit to Repo]
Loading

The Linter is called by GitHub actions to check for errors. If there are errors, the action will fail and display the errors, if none then the action passes.

Then when the PR is ready to merge, GitHub actions will call the Changelog generator and generate a changelog file on the PR. The generated file has the naming format: $pr_number + "_" +$clean_title.yaml.


Supported Fields


Examples

  • An example of a generated changelog:
date: '2025-03-27'
title: Pull request documentation
affects:
  - GITHUB
changes:
  - docs: Added [`How To Write A Pull 
      Request`](https://github.com/ViTeXFTW/GeneralsGameCode/pull/3/files#diff-41d5a03d44adab5bf84420ba843b1148eff016fd67e734fd4baddafcfd8f5794)
      document
  - docs: Linked to documentation in PR template
labels:
  - documentation
links:
  - https://github.com/ViTeXFTW/GeneralsGameCode/pull/3
authors:
  - ViTeXFTW
updates_prs:
  - action: updates
    link: https://github.com/ViTeXFTW/GeneralsGameCode/pull/1

  • PR Linter Failed:
    image

  • PR Linter Passed:
    image

@DevGeniusCode DevGeniusCode added the Documentation Is documentation or complementary resource label Mar 28, 2025
@ViTeXFTW ViTeXFTW changed the title [GITHUB] Changelog generation from merged PRs [GITHUB] Automatic Changelog Generator Mar 29, 2025
@ViTeXFTW ViTeXFTW marked this pull request as ready for review March 29, 2025 16:54
@xezon xezon mentioned this pull request Apr 8, 2025
@ViTeXFTW ViTeXFTW closed this Apr 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Documentation Is documentation or complementary resource

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants