From 7ea69700a4c64b3d348394a4b140fddeb00a7d92 Mon Sep 17 00:00:00 2001 From: Travis Kinney Date: Fri, 23 May 2025 20:40:48 -0700 Subject: [PATCH 01/15] Fix typo in AcmeManagingProcessor --- README.md | 2 +- octodns/processor/acme.py | 6 +++--- tests/test_octodns_processor_acme.py | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 97fa57b..50332aa 100644 --- a/README.md +++ b/README.md @@ -330,7 +330,7 @@ Similar to providers, but can only serve to populate records into a zone, cannot | Processor | Description | |--|--| -| [AcmeMangingProcessor](/octodns/processor/acme.py) | Useful when processes external to octoDNS are managing acme challenge DNS records, e.g. LetsEncrypt | +| [AcmeManagingProcessor](/octodns/processor/acme.py) | Useful when processes external to octoDNS are managing acme challenge DNS records, e.g. LetsEncrypt | | [AutoArpa](/octodns/processor/arpa.py) | See [Automatic PTR generation](#automatic-ptr-generation) below | | [EnsureTrailingDots](/octodns/processor/trailing_dots.py) | Processor that ensures ALIAS, CNAME, DNAME, MX, NS, PTR, and SRVs have trailing dots | | [ExcludeRootNsChanges](/octodns/processor/filter.py) | Filter that errors or warns on planned root/APEX NS records changes. | diff --git a/octodns/processor/acme.py b/octodns/processor/acme.py index 793f95a..63e40aa 100644 --- a/octodns/processor/acme.py +++ b/octodns/processor/acme.py @@ -7,14 +7,14 @@ from logging import getLogger from .base import BaseProcessor -class AcmeMangingProcessor(BaseProcessor): - log = getLogger('AcmeMangingProcessor') +class AcmeManagingProcessor(BaseProcessor): + log = getLogger('AcmeManagingProcessor') def __init__(self, name): ''' processors: acme: - class: octodns.processor.acme.AcmeMangingProcessor + class: octodns.processor.acme.AcmeManagingProcessor ... diff --git a/tests/test_octodns_processor_acme.py b/tests/test_octodns_processor_acme.py index 38d4e9d..5b0ee7d 100644 --- a/tests/test_octodns_processor_acme.py +++ b/tests/test_octodns_processor_acme.py @@ -4,7 +4,7 @@ from unittest import TestCase -from octodns.processor.acme import AcmeMangingProcessor +from octodns.processor.acme import AcmeManagingProcessor from octodns.record import Record from octodns.zone import Zone @@ -46,9 +46,9 @@ records = { } -class TestAcmeMangingProcessor(TestCase): +class TestAcmeManagingProcessor(TestCase): def test_process_zones(self): - acme = AcmeMangingProcessor('acme') + acme = AcmeManagingProcessor('acme') source = Zone(zone.name, []) # Unrelated stuff that should be untouched From 926c68943f65202e9aa4a6b6a5f60ea7bc721e84 Mon Sep 17 00:00:00 2001 From: Travis Kinney Date: Fri, 23 May 2025 21:44:24 -0700 Subject: [PATCH 02/15] Apply suggestions from code review --- octodns/processor/acme.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/octodns/processor/acme.py b/octodns/processor/acme.py index 63e40aa..c8c7b1e 100644 --- a/octodns/processor/acme.py +++ b/octodns/processor/acme.py @@ -59,3 +59,6 @@ class AcmeManagingProcessor(BaseProcessor): existing.remove_record(record) return existing + + +AcmeMangingProcessor = AcmeManagingProcessor From bc96139ffdb2e8226a77d98569bbf61b0e29e5ee Mon Sep 17 00:00:00 2001 From: Ross McFarland Date: Sat, 24 May 2025 07:59:08 -0700 Subject: [PATCH 03/15] Changelog entry for AcmeManagingProcessor type-o fix --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d69254e..0df45b4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +## v1.11.? - 2025-??-?? - ??? + +* Correct type-o in name of AcmeManagingProcessor, backwards compatible alias + in place + ## v1.11.0 - 2025-02-03 - Cleanup & deprecations with meta planning * Deprecation warning for Source.populate w/o the lenient param, to be removed From daf3c353561abe91d9af7c2c2f6d4253f0560212 Mon Sep 17 00:00:00 2001 From: Ross McFarland Date: Sat, 24 May 2025 10:57:43 -0700 Subject: [PATCH 04/15] Pass at adding a changelog management script/system --- .changelog/.create_dir | 0 .github/workflows/changelog.yml | 28 ++++ script/changelog | 241 +++++++++++++++++++++++++++++++- 3 files changed, 264 insertions(+), 5 deletions(-) create mode 100644 .changelog/.create_dir create mode 100644 .github/workflows/changelog.yml diff --git a/.changelog/.create_dir b/.changelog/.create_dir new file mode 100644 index 0000000..e69de29 diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.yml new file mode 100644 index 0000000..a45cbd0 --- /dev/null +++ b/.github/workflows/changelog.yml @@ -0,0 +1,28 @@ +name: OctoDNS Changelog +on: + pull_request: + workflow_dispatch: + +jobs: + config: + runs-on: ubuntu-latest + outputs: + json: ${{ steps.load.outputs.json }} + steps: + - uses: actions/checkout@v4 + changelog: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Setup python + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + architecture: x64 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + - name: Changelog Check + run: | + ./script/changelog check diff --git a/script/changelog b/script/changelog index c270fb9..5035683 100755 --- a/script/changelog +++ b/script/changelog @@ -1,7 +1,238 @@ -#!/bin/bash +#!/usr/bin/env python -set -e +from argparse import ArgumentParser +from datetime import datetime +from importlib import import_module +from io import StringIO +from json import loads +from os import getcwd, listdir, makedirs +from os.path import basename, isdir, join +from subprocess import PIPE, run +from sys import argv, exit, path +from uuid import uuid4 -VERSION=v$(grep __version__ octodns/__init__.py | sed -e "s/^[^']*'//" -e "s/'$//") -echo $VERSION -git log --pretty="%h - %cr - %s (%an)" "${VERSION}..HEAD" +from yaml import safe_load_all + + +def create(argv): + prog = basename(argv.pop(0)) + parser = ArgumentParser( + prog=f'{prog} create', + description='TODO: description', + epilog='TODO: epilog', + add_help=True, + ) + + parser.add_argument( + '-t', + '--type', + choices=('none', 'patch', 'minor', 'major'), + required=True, + help='TODO: type', + ) + parser.add_argument('md', metavar='change-description-markdown', nargs='+') + + args = parser.parse_args(argv) + + if not isdir('.changelog'): + makedirs('.changelog') + with open(join('.changelog', f'{uuid4().hex}.md'), 'w') as fh: + fh.write('---\ntype: ') + fh.write(args.type) + fh.write('\n---\n') + fh.write(' '.join(args.md)) + + +def check(argv): + if isdir('.changelog'): + result = run( + ['git', 'diff', '--name-only', 'origin/main', '.changelog/'], + check=False, + stdout=PIPE, + ) + if not result.returncode and result.stdout != b'': + exit(0) + + print( + 'PR is missing required changelog file, run ./script/changelog create' + ) + exit(1) + + +def _get_current_version(module_name): + cwd = getcwd() + path.append(cwd) + module = import_module(module_name) + return tuple(int(v) for v in module.__version__.split('.', 2)) + + +class _ChangeMeta: + _pr_cache = None + + @classmethod + def get(cls, filepath): + if cls._pr_cache is None: + result = run( + [ + 'gh', + 'pr', + 'list', + '--base', + 'main', + '--state', + 'merged', + '--limit=50', + '--json', + 'files,mergedAt,number', + ], + check=True, + stdout=PIPE, + ) + cls._pr_cache = {} + for pr in loads(result.stdout): + for file in pr['files']: + path = file['path'] + if path.startswith('.changelog'): + cls._pr_cache[path] = ( + pr['number'], + datetime.fromisoformat(pr['mergedAt']).replace( + tzinfo=None + ), + ) + + try: + return cls._pr_cache[filepath] + except KeyError: + return None, datetime(year=1970, month=1, day=1) + + +def _get_changelogs(): + ret = [] + dirname = '.changelog' + for filename in listdir(dirname): + if not filename.endswith('.md'): + continue + filepath = join(dirname, filename) + with open(filepath) as fh: + data, md = safe_load_all(fh) + pr, time = _ChangeMeta.get(filepath) + ret.append( + { + 'type': data.get('type', None), + 'md': md, + 'pr': pr, + 'time': time, + 'ordering': { + 'major': 0, + 'minor': 1, + 'patch': 2, + 'none': 3, + '': 3, + }[data.get('type', '').lower()], + } + ) + + ret.sort(key=lambda c: (c['ordering'], c['time'])) + return ret + + +def _get_new_version(current_version, changelogs): + try: + bump_type = changelogs[0]['type'] + except IndexError: + return None + new_version = list(current_version) + if bump_type == 'major': + new_version[0] += 1 + new_version[1] = 0 + new_version[2] = 0 + elif bump_type == 'minor': + new_version[1] += 1 + new_version[2] = 0 + else: + new_version[2] += 1 + return tuple(new_version) + + +def _format_version(version): + return '.'.join(str(v) for v in version) + + +def bump(argv): + buf = StringIO() + + cwd = getcwd() + module_name = basename(cwd).replace('-', '_') + + buf.write('## ') + current_version = _get_current_version(module_name) + changelogs = _get_changelogs() + new_version = _get_new_version(current_version, changelogs) + new_version = _format_version(new_version) + buf.write(new_version) + buf.write(' - ') + buf.write(datetime.now().strftime('%Y-%m-%d')) + buf.write(' - ') + buf.write(' '.join(argv[1:])) + buf.write('\n') + + current_type = None + for changelog in changelogs: + md = changelog['md'] + if not md: + continue + + _type = changelog['type'] + if _type != current_type: + buf.write('\n') + buf.write(_type.capitalize()) + buf.write(':\n') + current_type = _type + buf.write('* ') + buf.write(md) + + pr = changelog['pr'] + if pr: + pr = str(pr) + buf.write(' [#') + buf.write(pr) + buf.write('](https://github.com/octodns/') + buf.write(module_name) + buf.write('/pull/') + buf.write(pr) + buf.write(')') + + buf.write('\n') + + buf.write('\n') + + with open('CHANGELOG.md') as fh: + existing = fh.read() + + with open('CHANGELOG.md', 'w') as fh: + fh.write(buf.getvalue()) + fh.write(existing) + + with open(f'{module_name}/__init__.py') as fh: + existing = fh.read() + + current_version = _format_version(current_version) + with open(f'{module_name}/__init__.py', 'w') as fh: + fh.write(existing.replace(current_version, new_version)) + + +cmds = {'create': create, 'check': check, 'bump': bump} + +try: + cmd = cmds[argv.pop(1).lower()] +except IndexError: + cmd = None + print('TODO: command usage (missing)') + exit(1) +except KeyError: + cmd = None + print('TODO: command usage (unknown)') + exit(1) + + +cmd(argv) From 05ddeb6ed66f421a7a987a18c70216258337df33 Mon Sep 17 00:00:00 2001 From: Ross McFarland Date: Sat, 24 May 2025 10:58:53 -0700 Subject: [PATCH 05/15] Remove stray config section --- .github/workflows/changelog.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.yml index a45cbd0..e52d8b4 100644 --- a/.github/workflows/changelog.yml +++ b/.github/workflows/changelog.yml @@ -4,12 +4,6 @@ on: workflow_dispatch: jobs: - config: - runs-on: ubuntu-latest - outputs: - json: ${{ steps.load.outputs.json }} - steps: - - uses: actions/checkout@v4 changelog: runs-on: ubuntu-latest steps: From 53ebefb0ea0e2f047d72bae9b01eb389fbea9d72 Mon Sep 17 00:00:00 2001 From: Ross McFarland Date: Sat, 24 May 2025 15:49:10 -0700 Subject: [PATCH 06/15] pass at adding help/doc to changelog --- script/changelog | 90 +++++++++++++++++++++++++++++++++++------------- 1 file changed, 66 insertions(+), 24 deletions(-) diff --git a/script/changelog b/script/changelog index 5035683..29b0dd4 100755 --- a/script/changelog +++ b/script/changelog @@ -1,14 +1,14 @@ #!/usr/bin/env python -from argparse import ArgumentParser +from argparse import ArgumentParser, RawTextHelpFormatter from datetime import datetime from importlib import import_module from io import StringIO from json import loads -from os import getcwd, listdir, makedirs +from os import getcwd, listdir, makedirs, remove from os.path import basename, isdir, join from subprocess import PIPE, run -from sys import argv, exit, path +from sys import argv, exit, path, stderr from uuid import uuid4 from yaml import safe_load_all @@ -18,9 +18,9 @@ def create(argv): prog = basename(argv.pop(0)) parser = ArgumentParser( prog=f'{prog} create', - description='TODO: description', - epilog='TODO: epilog', + description='Creates a new changelog entry.', add_help=True, + formatter_class=RawTextHelpFormatter, ) parser.add_argument( @@ -28,20 +28,41 @@ def create(argv): '--type', choices=('none', 'patch', 'minor', 'major'), required=True, - help='TODO: type', + help='''The scope of the change. + +* patch - This is a bug fix +* minor - This adds new functionality or makes changes in a fully backwards + compatible way +* major - This includes substantial new functionality and/or changes that break + compatibility and may require careful migration +* none - This change does not need to be mentioned in the changelog + +See https://semver.org/ for more info''', + ) + parser.add_argument( + 'md', + metavar='change-description-markdown', + nargs='+', + help='''A short description of the changes in this PR, suitable as an entry in +CHANGELOG.md. Should be a single line. Can include simple markdown formatting +and links.''', ) - parser.add_argument('md', metavar='change-description-markdown', nargs='+') args = parser.parse_args(argv) if not isdir('.changelog'): makedirs('.changelog') - with open(join('.changelog', f'{uuid4().hex}.md'), 'w') as fh: + filepath = join('.changelog', f'{uuid4().hex}.md') + with open(filepath, 'w') as fh: fh.write('---\ntype: ') fh.write(args.type) fh.write('\n---\n') fh.write(' '.join(args.md)) + print( + f'Created {filepath}, it can be further edited and should be committed to your branch.' + ) + def check(argv): if isdir('.changelog'): @@ -54,7 +75,8 @@ def check(argv): exit(0) print( - 'PR is missing required changelog file, run ./script/changelog create' + 'PR is missing required changelog file, run ./script/changelog create', + file=stderr, ) exit(1) @@ -116,23 +138,20 @@ def _get_changelogs(): with open(filepath) as fh: data, md = safe_load_all(fh) pr, time = _ChangeMeta.get(filepath) + if not pr: + continue ret.append( { - 'type': data.get('type', None), + 'filepath': filepath, 'md': md, 'pr': pr, 'time': time, - 'ordering': { - 'major': 0, - 'minor': 1, - 'patch': 2, - 'none': 3, - '': 3, - }[data.get('type', '').lower()], + 'type': data.get('type', '').lower(), } ) - ret.sort(key=lambda c: (c['ordering'], c['time'])) + ordering = {'major': 0, 'minor': 1, 'patch': 2, 'none': 3, '': 3} + ret.sort(key=lambda c: (ordering[c['type']], c['time'])) return ret @@ -220,19 +239,42 @@ def bump(argv): with open(f'{module_name}/__init__.py', 'w') as fh: fh.write(existing.replace(current_version, new_version)) + for changelog in changelogs: + remove(changelog['filepath']) + cmds = {'create': create, 'check': check, 'bump': bump} + +def general_usage(msg=None): + global cmds + + exe = basename(argv[0]) + cmds = ','.join(sorted(cmds.keys())) + print(f'usage: {exe} {{{cmds}}} ...') + if msg: + print(msg) + else: + print( + ''' +Creates and checks or changelog entries, located in the .changelog directory. +Additionally supports updating CHANGELOG.md and bumping the package version +based on one or more entries in that directory. +''' + ) + + try: - cmd = cmds[argv.pop(1).lower()] + cmd = cmds[argv[1].lower()] + argv.pop(1) except IndexError: - cmd = None - print('TODO: command usage (missing)') + general_usage('missing command') exit(1) except KeyError: - cmd = None - print('TODO: command usage (unknown)') + if argv[1] in ('-h', '--help', 'help'): + general_usage() + exit(0) + general_usage(f'unknown command "{argv[1]}"') exit(1) - cmd(argv) From d65c176ace22e90abf8e7ca608eb782e807ba6b3 Mon Sep 17 00:00:00 2001 From: Ross McFarland Date: Sat, 24 May 2025 16:07:37 -0700 Subject: [PATCH 07/15] Tweaks to changelog script to suppoort edge cases and dry-run by default --- .git_hooks_pre-commit | 1 + script/changelog | 30 +++++++++++++++++++++++++++++- 2 files changed, 30 insertions(+), 1 deletion(-) diff --git a/.git_hooks_pre-commit b/.git_hooks_pre-commit index 7938eee..de3ba67 100755 --- a/.git_hooks_pre-commit +++ b/.git_hooks_pre-commit @@ -10,3 +10,4 @@ ROOT=$(dirname "$GIT") "$ROOT/script/lint" "$ROOT/script/format" --check --quiet || (echo "Formatting check failed, run ./script/format" && exit 1) "$ROOT/script/coverage" +"$ROOT/script/changelog" check diff --git a/script/changelog b/script/changelog index 29b0dd4..0c7dd42 100755 --- a/script/changelog +++ b/script/changelog @@ -71,7 +71,12 @@ def check(argv): check=False, stdout=PIPE, ) - if not result.returncode and result.stdout != b'': + entries = { + l + for l in result.stdout.decode('utf-8').split() + if l.endswith('.md') + } + if not result.returncode and entries: exit(0) print( @@ -178,6 +183,21 @@ def _format_version(version): def bump(argv): + prog = basename(argv.pop(0)) + parser = ArgumentParser( + prog=f'{prog} bump', + description='Builds a changelog update and calculates a new version number.', + add_help=True, + ) + + parser.add_argument( + '--make-changes', + action='store_true', + help='Write changelog update and bump version number', + ) + + args = parser.parse_args(argv) + buf = StringIO() cwd = getcwd() @@ -187,6 +207,9 @@ def bump(argv): current_version = _get_current_version(module_name) changelogs = _get_changelogs() new_version = _get_new_version(current_version, changelogs) + if not new_version: + print('No changelog entries found that would bump, nothing to do') + exit(1) new_version = _format_version(new_version) buf.write(new_version) buf.write(' - ') @@ -225,6 +248,11 @@ def bump(argv): buf.write('\n') + if not args.make_changes: + print(f'New version number {new_version}\n') + print(buf.getvalue()) + exit(0) + with open('CHANGELOG.md') as fh: existing = fh.read() From 748b390d4d4b6a183fd2f060880b211607d446e1 Mon Sep 17 00:00:00 2001 From: Ross McFarland Date: Sat, 24 May 2025 16:08:14 -0700 Subject: [PATCH 08/15] CONTRIBUTING.md updates, including changelog --- CONTRIBUTING.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 6fed5bd..e26e8a1 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -17,8 +17,11 @@ This project uses the [GitHub Flow](https://guides.github.com/introduction/flow/ 0. Create a new branch: `git checkout -b my-branch-name` 0. Make your change, add tests, and make sure the tests still pass 0. Make sure that `./script/lint` passes without any warnings +0. Run `./script/format` to make sure your changes follow Python's preferred + coding style +0. Run `./script/changelog create ...` to add a changelog entry to your PR 0. Make sure that coverage is at :100:% `./script/coverage` and open `htmlcov/index.html` - * You can open PRs for :eyes: & discussion prior to this + * You can open a draft PR for :eyes: & discussion prior to this 0. Push to your fork and submit a pull request We will handle updating the version, tagging the release, and releasing the gem. Please don't bump the version or otherwise attempt to take on these administrative internal tasks as part of your pull request. From 7b23ff49598b0252d5f2ca938da10aa55be1a098 Mon Sep 17 00:00:00 2001 From: Ross McFarland Date: Sat, 24 May 2025 16:10:51 -0700 Subject: [PATCH 09/15] Include changelog entry for changelog infra --- .changelog/acc2596fb367494db070e6c06abf705a.md | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 .changelog/acc2596fb367494db070e6c06abf705a.md diff --git a/.changelog/acc2596fb367494db070e6c06abf705a.md b/.changelog/acc2596fb367494db070e6c06abf705a.md new file mode 100644 index 0000000..2f3525b --- /dev/null +++ b/.changelog/acc2596fb367494db070e6c06abf705a.md @@ -0,0 +1,4 @@ +--- +type: none +--- +Adding changelog management infra and doc \ No newline at end of file From ab930a46ed010683f273ed3aa52844750817a0b4 Mon Sep 17 00:00:00 2001 From: Ross McFarland Date: Sat, 24 May 2025 16:15:41 -0700 Subject: [PATCH 10/15] changelog check use local main rather than origin --- script/changelog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/changelog b/script/changelog index 0c7dd42..17acbe7 100755 --- a/script/changelog +++ b/script/changelog @@ -67,7 +67,7 @@ and links.''', def check(argv): if isdir('.changelog'): result = run( - ['git', 'diff', '--name-only', 'origin/main', '.changelog/'], + ['git', 'diff', '--name-only', 'main', '.changelog/'], check=False, stdout=PIPE, ) From 2ec3e651dcab1c7476d8e1a1fdbb574993c52192 Mon Sep 17 00:00:00 2001 From: Ross McFarland Date: Sat, 24 May 2025 16:23:28 -0700 Subject: [PATCH 11/15] chagelog action get main too --- .github/workflows/changelog.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.yml index e52d8b4..3e9f43b 100644 --- a/.github/workflows/changelog.yml +++ b/.github/workflows/changelog.yml @@ -8,6 +8,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + - uses: actions/checkout@v4 + ref: main - name: Setup python uses: actions/setup-python@v4 with: From ab17ad53155e3f79a446b01746b173a42273e395 Mon Sep 17 00:00:00 2001 From: Ross McFarland Date: Sat, 24 May 2025 16:26:01 -0700 Subject: [PATCH 12/15] remove changelog entry for testing --- .changelog/acc2596fb367494db070e6c06abf705a.md | 4 ---- 1 file changed, 4 deletions(-) delete mode 100644 .changelog/acc2596fb367494db070e6c06abf705a.md diff --git a/.changelog/acc2596fb367494db070e6c06abf705a.md b/.changelog/acc2596fb367494db070e6c06abf705a.md deleted file mode 100644 index 2f3525b..0000000 --- a/.changelog/acc2596fb367494db070e6c06abf705a.md +++ /dev/null @@ -1,4 +0,0 @@ ---- -type: none ---- -Adding changelog management infra and doc \ No newline at end of file From 4b409ae619a365b2d32872c1bd77e3ba5c2c26be Mon Sep 17 00:00:00 2001 From: Ross McFarland Date: Sat, 24 May 2025 16:30:00 -0700 Subject: [PATCH 13/15] manual fetch main --- .github/workflows/changelog.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.yml index 3e9f43b..18c9285 100644 --- a/.github/workflows/changelog.yml +++ b/.github/workflows/changelog.yml @@ -8,8 +8,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: actions/checkout@v4 - ref: main + - name: Fetch main + run: git fetch origin main --depth 1 - name: Setup python uses: actions/setup-python@v4 with: From e837b381d408c4330d38f3145bb2c58603d5886f Mon Sep 17 00:00:00 2001 From: Ross McFarland Date: Sat, 24 May 2025 16:32:02 -0700 Subject: [PATCH 14/15] add main back to check cmd --- script/changelog | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/changelog b/script/changelog index 17acbe7..0c7dd42 100755 --- a/script/changelog +++ b/script/changelog @@ -67,7 +67,7 @@ and links.''', def check(argv): if isdir('.changelog'): result = run( - ['git', 'diff', '--name-only', 'main', '.changelog/'], + ['git', 'diff', '--name-only', 'origin/main', '.changelog/'], check=False, stdout=PIPE, ) From 47e6af15d500d8d4eb76904e3cb48643d0f584b8 Mon Sep 17 00:00:00 2001 From: Ross McFarland Date: Sat, 24 May 2025 16:33:01 -0700 Subject: [PATCH 15/15] readd changelog entry --- .changelog/acc2596fb367494db070e6c06abf705a.md | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 .changelog/acc2596fb367494db070e6c06abf705a.md diff --git a/.changelog/acc2596fb367494db070e6c06abf705a.md b/.changelog/acc2596fb367494db070e6c06abf705a.md new file mode 100644 index 0000000..2f3525b --- /dev/null +++ b/.changelog/acc2596fb367494db070e6c06abf705a.md @@ -0,0 +1,4 @@ +--- +type: none +--- +Adding changelog management infra and doc \ No newline at end of file