Skip to content

Fix automatic changelog generation for PR titles with markdown backticks and make workflow comment-triggered #317

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Aug 13, 2025
Merged
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
32 changes: 23 additions & 9 deletions .github/workflows/update-changelog.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,39 @@
name: Update Changelog

on:
pull_request:
types: [opened, edited]
issue_comment:
types: [created]

jobs:
update-changelog:
# Only run if this is not a PR from a fork to avoid permission issues
# and not a commit made by GitHub Action to avoid infinite loops
if: github.event.pull_request.head.repo.full_name == github.repository && github.actor != 'github-actions[bot]'
# Only run if this is a comment on a PR containing "@actions-user changelog"
# and not a comment made by GitHub Action to avoid infinite loops
if: github.event.issue.pull_request && contains(github.event.comment.body, '@actions-user changelog') && github.actor != 'github-actions[bot]'
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write

steps:
- name: Get PR details
id: pr-details
uses: actions/github-script@v7
with:
script: |
const { data: pullRequest } = await github.rest.pulls.get({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: context.issue.number
});
core.setOutput('number', pullRequest.number);
core.setOutput('title', pullRequest.title);
core.setOutput('head_ref', pullRequest.head.ref);

- name: Checkout repository
uses: actions/checkout@v4
with:
# Checkout the PR head ref
ref: ${{ github.event.pull_request.head.ref }}
ref: ${{ steps.pr-details.outputs.head_ref }}
token: ${{ secrets.GITHUB_TOKEN }}

- name: Set up Python
Expand All @@ -30,8 +44,8 @@ jobs:
- name: Update changelog
run: |
python modify_changelog.py update_changelog \
"${{ github.event.pull_request.number }}" \
"${{ github.event.pull_request.title }}"
"${{ steps.pr-details.outputs.number }}" \
'${{ steps.pr-details.outputs.title }}'

- name: Check for changes
id: changes
Expand All @@ -48,5 +62,5 @@ jobs:
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add docs/changelog.md
git commit -m "Add changelog entry for PR #${{ github.event.pull_request.number }}"
git commit -m "Add changelog entry for PR #${{ steps.pr-details.outputs.number }}"
git push
4 changes: 1 addition & 3 deletions docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,11 @@ _This project uses semantic versioning_

## UNRELEASED

## 11.0.0 (2025-08-08)

- Change conversion between binary operators to consider converting both types [#320](https://github.com/egraphs-good/egglog-python/pull/320)
- Add ability to parse egglog expressions into Python values [#319](https://github.com/egraphs-good/egglog-python/pull/319)
- Deprecates `.eval()` method on primitives in favor of `.value` which can be used with pattern matching.
- Support methods like on expressions [#315](https://github.com/egraphs-good/egglog-python/pull/315)
- Automatically Create Changelog Entry for PRs [#313](https://github.com/egraphs-good/egglog-python/pull/313)
- Automatically Create Changelog Entry for PRs [#313](https://github.com/egraphs-good/egglog-python/pull/313) [#317](https://github.com/egraphs-good/egglog-python/pull/317)
- Upgrade egglog which includes new backend.
- Fixes implementation of the Python Object sort to work with objects with dupliating hashes but the same value.
Also changes the representation to be an index into a list instead of the ID, making egglog programs more deterministic.
Expand Down
Loading