Skip to content

Commit

Permalink
feat: Support multiple git-path config option (#259)
Browse files Browse the repository at this point in the history
feat: Support multiple git-path config option
  • Loading branch information
TriPSs authored May 21, 2024
2 parents f04dac1 + c8865b2 commit 9bd92b2
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 4 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1076,3 +1076,37 @@ jobs:
env:
OUTPUT_FILE: "CHANGELOG.md"
EXPECTED_FILE: "test-input-file.md"

test-multiple-git-path:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
path: "./"
ref: ${{ github.ref == 'github.event.repository.default_branch' && github.head_ref || github.event.pull_request.head.ref }}
fetch-depth: 0

- run: npm ci --prod
- run: npm run build

- name: Generate changelog
id: changelog
uses: ./
with:
github-token: ${{ secrets.github_token }}
git-branch: ${{ github.ref == github.event.repository.default_branch && github.head_ref || github.event.pull_request.head.ref }}
git-path: |
src/helpers
src/version
.github/workflows
skip-commit: 'true'
skip-tag: 'true'
release-count: 0
create-summary: 'true'

- name: Test output
run: |
echo "${{ steps.changelog.outputs.changelog }}" > change_log
sed "s/\(### \)\(.*\)/*\2*/g" change_log > change_log2
diff change_log change_log2 > /dev/null && echo "The changelog has not been generated." || echo "The changelog has been generated."
2 changes: 1 addition & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -34828,7 +34828,7 @@ async function run() {
const conventionalConfigFile = core.getInput('config-file-path')
const preChangelogGenerationFile = core.getInput('pre-changelog-generation')
const gitUrl = core.getInput('git-url')
const gitPath = core.getInput('git-path')
const gitPath = core.getMultilineInput('git-path')
const infile = core.getInput('input-file')
const skipCi = core.getBooleanInput('skip-ci')
const createSummary = core.getBooleanInput('create-summary')
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ async function run() {
const conventionalConfigFile = core.getInput('config-file-path')
const preChangelogGenerationFile = core.getInput('pre-changelog-generation')
const gitUrl = core.getInput('git-url')
const gitPath = core.getInput('git-path')
const gitPath = core.getMultilineInput('git-path')
const infile = core.getInput('input-file')
const skipCi = core.getBooleanInput('skip-ci')
const createSummary = core.getBooleanInput('create-summary')
Expand Down

0 comments on commit 9bd92b2

Please sign in to comment.