Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,42 @@ When you're ready to contribute code:

---

## Changelog Guidelines

We use automated changelog generation based on PR labels. To ensure your changes are properly documented:

### PR Labels for Changelog

When creating a PR, apply one of the following labels to categorize your change:

| Label | Use When |
|-------|----------|
| `changelog:added` | Adding new features or capabilities |
| `changelog:changed` | Modifying existing functionality |
| `changelog:fixed` | Fixing bugs or issues |
| `changelog:removed` | Removing features or capabilities |
| `changelog:security` | Addressing security vulnerabilities |
| `changelog:skip` | Changes that should not appear in changelog (CI, docs, chores) |

### Breaking Changes

If your PR introduces a breaking change:
1. Add the `changelog:breaking` label
2. Clearly document the breaking change in your PR description
3. Include migration instructions if applicable

### Automatic Labeling

Labels are automatically suggested based on PR titles:
- Titles containing "fix", "bug" → `changelog:fixed`
- Titles containing "add", "feat", "new" → `changelog:added`
- Titles containing "update", "improve", "enhance" → `changelog:changed`
- Titles starting with "chore", "ci", "docs" → `changelog:skip`

You can override automatic labels by manually applying the correct label.

---

## Testing

Before submitting a PR, ensure that your changes pass all tests.
Expand Down
15 changes: 8 additions & 7 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,14 @@ _Why is this change required? What problem does it solve?_

## 🔍 Types of Changes

_Indicate which type of changes your code introduces (check all that apply):_

- [ ] **BUGFIX:** Non-breaking fix for an issue.
- [ ] **NEW FEATURE:** Non-breaking addition of functionality.
- [ ] **BREAKING CHANGE:** Fix or feature that causes existing functionality to not work as expected.
- [ ] **ENHANCEMENT:** Improvement to existing functionality.
- [ ] **CHORE:** Changes that do not affect production (e.g., documentation, build tooling, CI).
_Indicate which type of changes your code introduces (check all that apply)._
_Please also add the corresponding `changelog:*` label to this PR._

- [ ] **BUGFIX:** Non-breaking fix for an issue. (Label: `changelog:fixed`)
- [ ] **NEW FEATURE:** Non-breaking addition of functionality. (Label: `changelog:added`)
- [ ] **BREAKING CHANGE:** Fix or feature that causes existing functionality to not work as expected. (Labels: `changelog:changed` + `changelog:breaking`)
- [ ] **ENHANCEMENT:** Improvement to existing functionality. (Label: `changelog:changed`)
- [ ] **CHORE:** Changes that do not affect production (e.g., documentation, build tooling, CI). (Label: `changelog:skip`)

## 🔬 QA / Verification Steps

Expand Down
66 changes: 66 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name-template: 'v$RESOLVED_VERSION'
tag-template: 'v$RESOLVED_VERSION'
template: |
## What's Changed

$CHANGES

**Full Changelog**: https://github.com/$OWNER/$REPOSITORY/compare/$PREVIOUS_TAG...v$RESOLVED_VERSION

categories:
- title: 'Added'
labels:
- 'changelog:added'
- title: 'Changed'
labels:
- 'changelog:changed'
- title: 'Fixed'
labels:
- 'changelog:fixed'
- title: 'Removed'
labels:
- 'changelog:removed'
- title: 'Security'
labels:
- 'changelog:security'

exclude-labels:
- 'changelog:skip'

change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
change-title-escapes: '\<*_&'

version-resolver:
major:
labels:
- 'changelog:breaking'
minor:
labels:
- 'changelog:added'
patch:
labels:
- 'changelog:fixed'
- 'changelog:changed'
default: patch

autolabeler:
- label: 'changelog:fixed'
title:
- '/fix/i'
- '/bug/i'
- label: 'changelog:added'
title:
- '/add/i'
- '/feat/i'
- '/new/i'
- label: 'changelog:changed'
title:
- '/update/i'
- '/improve/i'
- '/enhance/i'
- '/bump/i'
- label: 'changelog:skip'
title:
- '/^chore/i'
- '/^ci/i'
- '/^docs/i'
23 changes: 22 additions & 1 deletion .github/workflows/create-tag-and-exit.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Tag zxporter (manual)
name: Tag and Release zxporter (manual)

on:
workflow_dispatch:
Expand All @@ -13,13 +13,16 @@ permissions:
jobs:
tag:
runs-on: ubuntu-latest
outputs:
new_tag: ${{ steps.create_tag.outputs.new_tag }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Create tag (user input or bump patch)
id: create_tag
run: |
git config user.name "github-actions"
git config user.email "github-actions@github.com"
Expand All @@ -35,6 +38,24 @@ jobs:
fi

echo "Creating new tag: $NEW_TAG"
echo "new_tag=$NEW_TAG" >> $GITHUB_OUTPUT
git tag $NEW_TAG
git push origin $NEW_TAG

publish_release:
needs: tag
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Publish Release
uses: release-drafter/release-drafter@v6
with:
config-name: release-drafter.yml
publish: true
tag: ${{ needs.tag.outputs.new_tag }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
25 changes: 25 additions & 0 deletions .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Release Drafter

on:
push:
branches:
- main
pull_request:
types: [opened, reopened, synchronize, labeled, unlabeled]

permissions:
contents: read
pull-requests: write

jobs:
update_release_draft:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- uses: release-drafter/release-drafter@v6
with:
config-name: release-drafter.yml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
36 changes: 36 additions & 0 deletions .github/workflows/update-changelog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Update Changelog

on:
release:
types: [published]

permissions:
contents: write
pull-requests: write

jobs:
update-changelog:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Update CHANGELOG.md
uses: stefanzweifel/changelog-updater-action@v1
with:
latest-version: ${{ github.event.release.tag_name }}
release-notes: ${{ github.event.release.body }}

- name: Create Pull Request
uses: peter-evans/create-pull-request@v6
with:
commit-message: "docs: update CHANGELOG.md for ${{ github.event.release.tag_name }}"
title: "docs: update CHANGELOG.md for ${{ github.event.release.tag_name }}"
body: |
This PR updates the CHANGELOG.md with release notes for ${{ github.event.release.tag_name }}.

Auto-generated by the Update Changelog workflow.
branch: "changelog/update-${{ github.event.release.tag_name }}"
labels: "changelog:skip"
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Changelog

All notable changes to ZXporter will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

## Historical Releases

For releases prior to automated changelog generation, please see the
[GitHub Releases](https://github.com/devzero-inc/zxporter/releases) page.

[Unreleased]: https://github.com/devzero-inc/zxporter/compare/v0.0.51...HEAD
Comment on lines +1 to +15
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

git tag -l | grep -E '^v0\.0\.51$'

Repository: devzero-inc/zxporter

Length of output: 46


Replace the non-existent v0.0.51 tag reference with a valid version tag.

The comparison URL on line 15 references v0.0.51, but this tag does not exist in the repository. The link will be invalid, breaking documentation for users. Update the URL to reference an actual tagged release or remove the link until a valid comparison point is available.

🧰 Tools
🪛 LanguageTool

[style] ~12-~12: ‘prior to’ might be wordy. Consider a shorter alternative.
Context: ...] ## Historical Releases For releases prior to automated changelog generation, please ...

(EN_WORDINESS_PREMIUM_PRIOR_TO)

🤖 Prompt for AI Agents
In @CHANGELOG.md around lines 1 - 15, The [Unreleased] comparison link currently
points to a non-existent tag "v0.0.51"; update the reference in the CHANGELOG's
"[Unreleased]" link target to a valid release tag (for example replace "v0.0.51"
with the actual latest released tag like "v0.0.50" or the correct tag used in
your repo) or remove the URL entirely if no valid comparison point exists so the
link no longer resolves to a 404.

4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,9 @@ kubectl apply -f https://raw.githubusercontent.com/<org>/zxporter/<tag>/dist/ins

## Contributing

We welcome contributions! Please see our contributing guidelines for more information.
We welcome contributions! Please see our [Contributing Guidelines](.github/CONTRIBUTING.md) for more information.

For a history of changes, see the [CHANGELOG](CHANGELOG.md).

### Development Setup

Expand Down
Loading