Skip to content

ci: inline shared release automation#30

Merged
Xerrion merged 9 commits into
masterfrom
chore/inline-shared-workflows
Mar 15, 2026
Merged

ci: inline shared release automation#30
Xerrion merged 9 commits into
masterfrom
chore/inline-shared-workflows

Conversation

@Xerrion

@Xerrion Xerrion commented Mar 14, 2026

Copy link
Copy Markdown
Owner

Summary

  • inline the three release-related workflows so PhDamage no longer depends on DragonAddons/wow-workflows for release-critical automation
  • vendor the changelog and TOC update helper scripts into this repository and call them locally from GitHub Actions
  • preserve the split workflow model and keep the repo's existing master trigger, daily TOC schedule, and tbc flavor behavior

Summary by CodeRabbit

  • Chores
    • Streamlined CI workflows by inlining release and table-of-contents update processes.
    • Added automated changelog generation for releases.
    • Added automated World of Warcraft Interface version updates for .toc files.
    • Excluded the scripts directory from package distribution.

@Xerrion
Xerrion marked this pull request as ready for review March 14, 2026 09:54
@Xerrion
Xerrion requested a review from Copilot March 14, 2026 09:54
Repository owner deleted a comment from coderabbitai Bot Mar 14, 2026
Repository owner deleted a comment from coderabbitai Bot Mar 14, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds repository-local automation scripts and updates GitHub Actions workflows to handle TOC interface version bumps and release changelog generation/packaging without relying on external reusable workflows.

Changes:

  • Add scripts/update_toc_versions.sh to fetch Blizzard CDN versions and update ## Interface* directives in .toc files.
  • Add scripts/generate_changelog.sh to generate .release/CHANGELOG.md for the BigWigs packager pipeline.
  • Replace external reusable workflows with inline workflow steps; update .pkgmeta to exclude scripts/ from packaged artifacts.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
scripts/update_toc_versions.sh New script to fetch interface versions and update TOC directives.
scripts/generate_changelog.sh New script to generate a cleaned changelog for packaging.
.pkgmeta Excludes scripts/ from packaged output (manual changelog remains .release/CHANGELOG.md).
.github/workflows/toc-update.yml New scheduled workflow to run TOC updater and open/update a PR.
.github/workflows/release.yml New release workflow that vendors the changelog script then runs packager.
.github/workflows/release-pr.yml Switches to release-please action for release PR automation.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread scripts/update_toc_versions.sh
Comment thread scripts/update_toc_versions.sh
Comment thread scripts/update_toc_versions.sh
Comment thread scripts/update_toc_versions.sh
Comment thread scripts/generate_changelog.sh
Comment thread .github/workflows/toc-update.yml
Comment thread .github/workflows/toc-update.yml
Comment thread .github/workflows/release.yml
@coderabbitai

coderabbitai Bot commented Mar 14, 2026

Copy link
Copy Markdown

Warning

Rate limit exceeded

@Xerrion has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 3 minutes and 11 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: d69f1ae5-4085-46a4-9c3e-8cbb5f92ecc5

📥 Commits

Reviewing files that changed from the base of the PR and between 41c4083 and cfc9b4b.

📒 Files selected for processing (4)
  • .github/workflows/lint.yml
  • .github/workflows/release-pr.yml
  • PhDamage.toc
  • scripts/update_toc_versions.sh
📝 Walkthrough

Walkthrough

Three reusable workflows were inlined into explicit jobs; two new Bash scripts were added for changelog generation and WoW Interface version updates; and scripts/ was added to .pkgmeta ignore list.

Changes

Cohort / File(s) Summary
Workflows — release PR
​.github/workflows/release-pr.yml
Replaced reusable workflow/secrets inheritance with an explicit job running on ubuntu-latest that invokes googleapis/release-please-action@v4 with token, config-file, and manifest-file inputs.
Workflows — release
​.github/workflows/release.yml
Replaced external workflow call with an inline job: resolves tag, checks out helper scripts, snapshots/restores vendored changelog script, generates changelog, and runs BigWigsMods/packager@v2 with GITHUB_REF set to the resolved tag. Removes inherited secrets.
Workflows — toc update
​.github/workflows/toc-update.yml
Replaced reusable workflow with an inline job that checks out master, detects changes, commits to chore/toc-interface-version, pushes (force-with-lease), labels, and conditionally creates/updates a PR. Adds issues: write permission.
Package metadata
.pkgmeta
Added scripts/ directory to the ignore list so scripts are excluded from packaged releases.
New scripts — changelog
scripts/generate_changelog.sh
Adds a script that computes current/previous tags, fetches tag date, generates a Markdown changelog (skips release chore commits and Co-authored-by lines), and writes output to a provided path.
New scripts — TOC versions
scripts/update_toc_versions.sh
Adds a script that fetches Blizzard CDN interface versions (with retries and caching), finds .toc files (with excludes), and updates Interface directives per flavor; includes CLI parsing, validation, logging, and per-file updates.

Sequence Diagram(s)

sequenceDiagram
    participant Runner as GitHub Actions Runner (workflow)
    participant Repo as Repository (checkout)
    participant Script as generate_changelog.sh
    participant Packager as BigWigsMods/packager@v2
    participant GitHubAPI as GitHub API

    Runner->>Repo: Checkout helper script & full tag
    Runner->>Script: Execute generate_changelog.sh (env: TAG_NAME, GITHUB_REPOSITORY)
    Script-->>Runner: Emit changelog file
    Runner->>Packager: Invoke packager with GITHUB_REF set to resolved tag
    Packager->>GitHubAPI: Upload package / create release artifacts
    Packager-->>Runner: Return success/failure
Loading
sequenceDiagram
    participant Runner as GitHub Actions Runner (toc-update job)
    participant Repo as Repository (checkout master)
    participant Script as update_toc_versions.sh
    participant Blizzard as Blizzard CDN
    participant GitHubAPI as GitHub API

    Runner->>Repo: Checkout master
    Runner->>Script: Execute update_toc_versions.sh (flavors, excludes)
    Script->>Blizzard: Fetch interface versions (with retries & cache)
    Blizzard-->>Script: Return versions
    Script->>Repo: Update .toc Interface directives
    Script-->>Runner: Report changed files
    Runner->>GitHubAPI: Commit branch, push (force-with-lease)
    Runner->>GitHubAPI: Create or update PR and add label (conditional)
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Poem

🐰 I hopped through workflows, scripts in tow,
Fetched tags and versions where cold winds blow,
Changelogs stitched and TOCs made right,
Branches pushed gently into the night,
The rabbit stamps — everything's snug and tight!

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'ci: inline shared release automation' accurately and concisely summarizes the main objective of this PR: inlining the shared GitHub Actions workflows from the external DragonAddons/wow-workflows repository into this repository.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch chore/inline-shared-workflows
📝 Coding Plan
  • Generate coding plan for human review comments

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 4

🧹 Nitpick comments (1)
scripts/update_toc_versions.sh (1)

232-236: Drop the unused HAS_VANILLA_FLAVOR flag.

It's assigned but never read, so it adds dead state to an already branchy code path.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@scripts/update_toc_versions.sh` around lines 232 - 236, Remove the unused
HAS_VANILLA_FLAVOR flag: delete its initialization and the branch that sets it
inside the loop over the flavors array, leaving only HAS_CLASSIC_FLAVOR logic
(the for loop that checks "$f" == "classic" and sets HAS_CLASSIC_FLAVOR). Also
search for any other references to HAS_VANILLA_FLAVOR and remove them if present
so no dead variable remains.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.github/workflows/release-pr.yml:
- Around line 15-19: The workflow invoking googleapis/release-please-action@v4
is missing the required issues: write permission; update the workflow's
permissions block (top-level or the job that runs the action) to include
"issues: write" alongside any existing permissions (e.g., contents: write and
pull-requests: write) so the release-please action can label and manage PRs
correctly.
- Around line 15-19: Update the release workflow to stop using GITHUB_TOKEN for
the googleapis/release-please-action and instead use a PAT or GitHub App token
(provide a repository/organization secret like RELEASE_PUBLISH_TOKEN) so tag
pushes created by release-please will trigger downstream workflows; in the
workflow step that calls googleapis/release-please-action@v4, replace token: ${{
secrets.GITHUB_TOKEN }} with token: ${{ secrets.RELEASE_PUBLISH_TOKEN }} (or the
GitHub App secret) and ensure the secret has appropriate repo-scoped
permissions. Also add the missing permission "issues: write" to the workflow
permissions block alongside the existing "contents: write" and "pull-requests:
write" entries so release-please has required access for creating release
issues.

In @.github/workflows/toc-update.yml:
- Around line 17-20: The checkout step uses actions/checkout@v6 which by default
fetches a single commit causing git push --force-with-lease to fail when the
remote branch chore/toc-interface-version exists but has no local
remote-tracking ref; update the Checkout invocation to fetch full history (set
fetch-depth: 0) or add an explicit git fetch of the chore/toc-interface-version
branch before the push so the remote-tracking ref exists, and apply the same
change to the other Checkout usage later in the workflow (the other
actions/checkout@v6 block that precedes the push).

In `@scripts/update_toc_versions.sh`:
- Around line 55-63: The curl call inside the retry loop (where response=$(curl
-sf "$url" 2>/dev/null) && break) can hang indefinitely; update that invocation
to include a per-attempt timeout by adding --connect-timeout and --max-time
flags (use existing or new variables like CONNECT_TIMEOUT and CURL_MAX_TIME if
available) so each attempt is bounded and the loop can retry; keep the rest of
the loop (attempt, MAX_RETRIES, RETRY_DELAY, product, url, response) unchanged.

---

Nitpick comments:
In `@scripts/update_toc_versions.sh`:
- Around line 232-236: Remove the unused HAS_VANILLA_FLAVOR flag: delete its
initialization and the branch that sets it inside the loop over the flavors
array, leaving only HAS_CLASSIC_FLAVOR logic (the for loop that checks "$f" ==
"classic" and sets HAS_CLASSIC_FLAVOR). Also search for any other references to
HAS_VANILLA_FLAVOR and remove them if present so no dead variable remains.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: d18435b6-f66b-498d-aa64-b25d1a8b141a

📥 Commits

Reviewing files that changed from the base of the PR and between f8b440e and e0bd5fe.

📒 Files selected for processing (6)
  • .github/workflows/release-pr.yml
  • .github/workflows/release.yml
  • .github/workflows/toc-update.yml
  • .pkgmeta
  • scripts/generate_changelog.sh
  • scripts/update_toc_versions.sh

Comment thread .github/workflows/release-pr.yml
Comment thread .github/workflows/toc-update.yml
Comment thread scripts/update_toc_versions.sh

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

♻️ Duplicate comments (1)
.github/workflows/toc-update.yml (1)

17-20: ⚠️ Potential issue | 🟠 Major

Shallow clone breaks --force-with-lease on subsequent runs.

This issue was previously flagged. The default shallow checkout (fetch-depth: 1) does not fetch the remote-tracking ref for chore/toc-interface-version. On the first run, the branch doesn't exist remotely so the push succeeds. On subsequent runs, --force-with-lease fails with "rejected (stale info)" because the local remote-tracking ref is missing.

,

Suggested fix
      - name: Checkout
        uses: actions/checkout@v6
        with:
          ref: master
+         fetch-depth: 0

Or explicitly fetch the branch before pushing:

          git config user.name "github-actions[bot]"
          git config user.email "41898282+github-actions[bot]@users.noreply.github.com"

+         git fetch origin "$BRANCH:refs/remotes/origin/$BRANCH" 2>/dev/null || true
          git checkout -B "$BRANCH"

Also applies to: 51-56

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/toc-update.yml around lines 17 - 20, The checkout step
uses a shallow clone which omits remote-tracking refs and causes
--force-with-lease to fail; update the Checkout step that uses
actions/checkout@v6 (the step named "Checkout") to perform a full clone by
adding with: fetch-depth: 0 (or remove the shallow option), or alternatively
ensure you explicitly fetch the target branch before pushing (e.g., run git
fetch origin chore/toc-interface-version) so the remote-tracking ref exists;
apply the same change to the other checkout occurrence that also uses
actions/checkout@v6.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.github/workflows/toc-update.yml:
- Line 53: Replace the quoted glob so the shell can expand it: change the
command `git add -A '*.toc'` to `git add -A *.toc` (or alternatively use an
explicit Git pathspec like `git add -- '*.toc'` if you want Git to interpret the
pattern); update the line containing `git add -A '*.toc'` to one of these
unquoted/explicit forms so `.toc` files are staged as intended.

---

Duplicate comments:
In @.github/workflows/toc-update.yml:
- Around line 17-20: The checkout step uses a shallow clone which omits
remote-tracking refs and causes --force-with-lease to fail; update the Checkout
step that uses actions/checkout@v6 (the step named "Checkout") to perform a full
clone by adding with: fetch-depth: 0 (or remove the shallow option), or
alternatively ensure you explicitly fetch the target branch before pushing
(e.g., run git fetch origin chore/toc-interface-version) so the remote-tracking
ref exists; apply the same change to the other checkout occurrence that also
uses actions/checkout@v6.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 39c356e7-99ee-44a4-8e18-d171aa08ad15

📥 Commits

Reviewing files that changed from the base of the PR and between e0bd5fe and 41c4083.

📒 Files selected for processing (3)
  • .github/workflows/release-pr.yml
  • .github/workflows/release.yml
  • .github/workflows/toc-update.yml
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/release-pr.yml

Comment thread .github/workflows/toc-update.yml
Xerrion and others added 4 commits March 15, 2026 14:46
@Xerrion
Xerrion merged commit 4347e93 into master Mar 15, 2026
3 checks passed
@Xerrion
Xerrion deleted the chore/inline-shared-workflows branch March 15, 2026 13:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants