Bases
Release Notes Generator
Generate formatted release notes from git tags with PR details, linked issues, and contributor credits.
Use the Dagu skill to create a release notes generator workflow. Refer to the schema, coding agent, and pitfalls references for correct syntax. Ask the user: - Which repository? (default: the current repo, detected via gh repo view --json nameWithOwner) - Which tags to compare? (default: latest tag vs previous tag, auto-detected) Prerequisites: gh CLI authenticated (gh auth login), at least one AI coding agent CLI installed. The workflow should: 1. Resolve the two git tags to compare. If not specified, auto-detect the latest and previous tags using the GitHub API. Output them as JSON so downstream steps can reference individual fields via JSON path (e.g. ${TAGS.to}). 2. Extract all PR numbers from commits between the two tags using the GitHub compare API with --jq (do NOT use jq CLI). Output one PR number per line. 3. For each PR, fetch details via gh api graphql: number, title, author login, body summary (first ~300 chars), labels, and closingIssuesReferences (number, title, author login). Build a JSON array from the results. - CRITICAL: When iterating over output from a previous step, do NOT use "for X in $VAR" — Dagu captures multiline output into a single string variable, so word splitting does not work. Instead, read the previous step's stdout file line by line: `while IFS= read -r line; do ... done < "${prev_step.stdout}"`. Strip non-numeric characters from each line with `tr -dc '0-9'` before passing to the GraphQL query. - The gh GraphQL query string uses $-prefixed variable names ($owner, $name, $num). These are safe in Dagu scripts because Dagu only expands ${braced} variables and bare $varname patterns that match defined Dagu variables — undefined bare $names are preserved as-is for the shell. However, pass integer variables to -F without quotes (e.g. -F num=$NUM not -F num="$NUM") so gh sends them as integers, not strings. 4. Use a single AI agent step (auto-detect which CLI is available, use the cheapest model) to both categorize each PR and format the final release notes. Feed it the PR details JSON, the changelog template, and context (repo, tags, date, repo owner to exclude from contributors). 5. Save the output to DAG_DOCS_DIR. 6. Use defaults.retry_policy and timeout_sec: 300 on the AI agent step. The changelog format template MUST be defined as a top-level env variable using YAML multiline (|) so users can customize the output without editing step logic. Use this exact template: ``` ## {VERSION} ({DATE}) ### Added - Short title: Description of what was added. ([#PR](https://github.com/{REPO}/pull/PR)) ### Changed - Short title: Description of what changed. ([#PR](https://github.com/{REPO}/pull/PR)) ### Fixed - Short title: Description of what was fixed. ([#PR](https://github.com/{REPO}/pull/PR)) ### Contributors Thanks to our contributors for this release: | Contribution | Contributor | | --- | --- | | Short description of contribution ([#N](link)) | [@user](https://github.com/user) | | Bug report title ([#N](link)) | [@user](https://github.com/user) (report) | Rules: - Each entry starts with a short bolded-style title, then colon, then description. - Group multiple contributions by the same person into one row. - PR authors get a plain entry. Issue reporters get (report) suffix. - Do NOT include the repository owner as a contributor. **Full Changelog**: [{FROM}...{TO}](https://github.com/{REPO}/compare/{FROM}...{TO}) ``` Important: review the pitfalls reference for known workarounds. Follow the coding agent reference for the correct non-interactive command and model flags for each agent CLI.
Getting Started
1. Install Dagu
curl -L https://raw.githubusercontent.com/dagu-org/dagu/main/scripts/installer.sh | bash2. Install Dagu Skill
claude mcp add dagu -- dagu mcp3. Start Dagu
dagu start-allFor more details, see the quickstart guide