Skip to content

feat(setup-git): add setup-git action and changelog utility scripts#12

Open
GoogilyBoogily wants to merge 1 commit into
feat/check-jira-actionfrom
feat/git-utils
Open

feat(setup-git): add setup-git action and changelog utility scripts#12
GoogilyBoogily wants to merge 1 commit into
feat/check-jira-actionfrom
feat/git-utils

Conversation

@GoogilyBoogily
Copy link
Copy Markdown
Contributor

Summary

Adds shared utilities used by the version-bump and release-notes actions in subsequent PRs.

  • actions/setup-git/action.yml: composite action that configures git user.name and git user.email for automated commits. Removes the duplicated git config lines from version-bump.
  • src/validate-changelog.ts: checks CHANGELOG.md for a ## UNRELEASED section; core.setFailed if missing.
  • src/extract-release-notes.ts: parses CHANGELOG.md and outputs the content between the first two ## headers as release_details. Replaces the awk/heredoc pattern used in release-notes.

No wiring to callers yet — this PR is purely additive.

Test plan

  • npm run build produces dist/validate-changelog.js and dist/extract-release-notes.js
  • validate-scripts CI passes

Copilot AI review requested due to automatic review settings May 29, 2026 15:53
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds reusable GitHub Actions utilities to reduce duplication in upcoming workflow/action updates (git identity setup, changelog validation, and release notes extraction).

Changes:

  • Added a new composite action actions/setup-git to configure git user.name / git user.email.
  • Added TypeScript utilities to validate presence of a ## UNRELEASED section and extract release notes from CHANGELOG.md.
  • Committed the compiled dist/ JavaScript outputs for the new scripts.

Reviewed changes

Copilot reviewed 3 out of 5 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
actions/setup-git/action.yml New composite action for configuring git identity for automated commits.
src/validate-changelog.ts Adds changelog validation utility (expects ## UNRELEASED).
src/extract-release-notes.ts Adds release notes extraction utility (content between first two ## headers).
dist/validate-changelog.js Compiled JS output for validate-changelog.
dist/extract-release-notes.js Compiled JS output for extract-release-notes.

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

Comment on lines +17 to +21
- name: "Configure git identity"
run: |
git config user.name '${{ inputs.user-name }}'
git config user.email '${{ inputs.user-email }}'
shell: bash
Comment thread actions/setup-git/action.yml Outdated
user-email:
description: "Git user.email"
required: false
default: "41898282+github-actions[bot]@users.noreply.github.com"
Comment thread src/validate-changelog.ts Outdated
Comment on lines +4 to +8
const changelog = readFileSync('CHANGELOG.md', 'utf8');

if (!/^## UNRELEASED/im.test(changelog)) {
core.setFailed('UNRELEASED section not found in CHANGELOG.md');
}
Comment on lines +6 to +12
const firstHeader = lines.findIndex((line) => /^## /.test(line));
const secondHeader = lines.findIndex((line, index) => index > firstHeader && /^## /.test(line));

const notes = lines
.slice(firstHeader + 1, secondHeader === -1 ? undefined : secondHeader)
.join('\n')
.trim();
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