Skip to content

Commit 18fcb69

Browse files
authored
feat: cwd option (#7)
* feat: Add cwd option
1 parent 34c4fe1 commit 18fcb69

File tree

8 files changed

+59
-19
lines changed

8 files changed

+59
-19
lines changed

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1111
#### Deprecated
1212
#### Removed
1313

14+
## [1.0.0-beta.4] - 2024-11-28
15+
16+
### Added
17+
18+
* feat: Add input `cwd`, enabling the user to set the current working directory from where resolve `docs-dir`, `files-pattern`, and search for the configuration file.
19+
20+
### Changed
21+
22+
* chore: Bump @tid-xcut/markdown-confluence-sync from 1.0.0-beta.3 to 1.0.0-beta.4
23+
1424
## [1.0.0-beta.3] - 2024-11-27
1525

1626
### Removed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ The action accepts a configuration file in the root of the repository, and it ca
130130
| `confluence-notice-template` | Template string to use for the notice message | No | |
131131
| `confluence-dry-run` | Dry run mode: Do not update Confluence pages. Only log pages to sync | No | `false `|
132132
| `log-level` | Log level: `silent`, `silly`, `debug`, `verbose`, `info`, `warn`, `error` | No | `info` |
133+
| `cwd` | Current working directory. Path from where resolve `docs-dir`, `files-pattern`, and search for the configuration file | No | `.` |
133134

134135
### Configuration file
135136

action.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,9 @@ inputs:
5656
'Log create, update or delete requests to Confluence instead of really
5757
making them'
5858
type: boolean
59+
cwd:
60+
description: 'Current working directory. Path from where the library resolve docsDir, filesPattern, and searches for configuration files'
61+
type: string
5962

6063
runs:
6164
using: node20

dist/index.js

Lines changed: 34 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package-lock.json

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "markdown-confluence-sync-action",
33
"description": "GitHub Action to sync markdown files to Confluence",
4-
"version": "1.0.0-beta.3",
4+
"version": "1.0.0-beta.4",
55
"author": "Telefónica Innovación Digital",
66
"homepage": "https://github.com/Telefonica/markdown-confluence-sync-action",
77
"repository": {
@@ -56,7 +56,7 @@
5656
"license": "Apache-2.0",
5757
"dependencies": {
5858
"@actions/core": "1.11.1",
59-
"@tid-xcut/markdown-confluence-sync": "1.0.0-beta.3"
59+
"@tid-xcut/markdown-confluence-sync": "1.0.0-beta.4"
6060
},
6161
"devDependencies": {
6262
"@eslint/js": "9.13.0",

src/main.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,10 @@ export async function run(): Promise<void> {
4848
"confluence-notice-template",
4949
);
5050
const confluenceDryRun: string = core.getInput("confluence-dry-run");
51+
const cwd: string = core.getInput("cwd");
5152

5253
const markdownToConfluence = new MarkdownConfluenceSync({
54+
cwd: valueIfDefined(cwd),
5355
logLevel:
5456
valueIfDefined<MarkdownConfluenceSync.Config["logLevel"]>(logLevel),
5557
mode: valueIfDefined<MarkdownConfluenceSync.Config["mode"]>(mode),

0 commit comments

Comments
 (0)