Skip to content

Commit 219f484

Browse files
committed
feat: Add confluence-authentication option. Upgrade markdown-confluence-sync
1 parent 7968f76 commit 219f484

File tree

12 files changed

+116349
-116798
lines changed

12 files changed

+116349
-116798
lines changed

.github/workflows/test-e2e.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,12 @@ jobs:
4545
]
4646
confluence-url: ${{ secrets.CONFLUENCE_URL }}
4747
confluence-space-key: ${{ secrets.CONFLUENCE_SPACE_KEY }}
48-
confluence-personal-access-token: ${{ secrets.CONFLUENCE_PAT }}
48+
authentication: |
49+
{
50+
"oauth2": {
51+
"accessToken": "${{ secrets.CONFLUENCE_PAT }}"
52+
}
53+
}
4954
log-level: debug
5055

5156
test-e2e:

CHANGELOG.md

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

14+
## [2.3.0] - 2025-10-20
15+
16+
### Added
17+
18+
* feat: Add support for different Confluence authentication methods. Add "confluence-authentication" input, which allows the user to provide the confluence.js authentication configuration as a JSON string
19+
20+
### Changed
21+
22+
* feat: Make `confluence-personal-access-token` input not required. It is deprecated in favor of the new `confluence-authentication` input.
23+
* chore(deps): Bump @telefonica/markdown-confluence-sync from 2.1.1 to 2.2.0 (Add confluence authentication option)
24+
1425
## [2.2.1] - 2025-07-10
1526

1627
### Fixed

README.md

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,12 @@ docs/
7272
confluence-url: 'https://your.confluence.es'
7373
confluence-root-page-id: '123456789'
7474
confluence-space-key: 'YOUR-SPACE-KEY'
75-
confluence-personal-access-token: ${{ secrets.CONFLUENCE_PAT }}
75+
confluence-authentication: |
76+
{
77+
"oauth2": {
78+
"accessToken": "${{ secrets.CONFLUENCE_PAT }}"
79+
}
80+
}
7681
```
7782
7883
> [!TIP]
@@ -114,7 +119,12 @@ For example:
114119
]
115120
confluence-url: 'https://your.confluence.es'
116121
confluence-space-key: 'YOUR-SPACE-KEY'
117-
confluence-personal-access-token: ${{ secrets.CONFLUENCE_PAT }}
122+
confluence-authentication: |
123+
{
124+
"oauth2": {
125+
"accessToken": "${{ secrets.CONFLUENCE_PAT }}"
126+
}
127+
}
118128
```
119129

120130
### Flat operation mode
@@ -142,7 +152,12 @@ confluence_page_id: 123456789
142152
confluence-url: 'https://your.confluence.es'
143153
confluence-root-page-id: '123456789'
144154
confluence-space-key: 'YOUR-SPACE-KEY'
145-
confluence-personal-access-token: ${{ secrets.CONFLUENCE_PAT }}
155+
confluence-authentication: |
156+
{
157+
"oauth2": {
158+
"accessToken": "${{ secrets.CONFLUENCE_PAT }}"
159+
}
160+
}
146161
```
147162

148163
### Mermaid diagrams
@@ -185,7 +200,8 @@ The action accepts a configuration file in the root of the repository, and it ca
185200
| `confluence-url` | Confluence base URL | __Yes__ | |
186201
| `confluence-root-page-id` | ID of the Confluence page under which the pages will be synchronized | __Yes__ | |
187202
| `confluence-space-key` | Key of the Confluence space where the pages will be synced | __Yes__ | |
188-
| `confluence-personal-access-token` | Confluence personal access token | __Yes__ | |
203+
| `confluence-personal-access-token` | Confluence personal access token. Deprecated. Use `confluence-authentication` instead | __No__ | |
204+
| `confluence-authentication` | Confluence authentication object expressed as an stringified JSON (supports multiline). Refer to the [confluence.js docs](https://github.com/MrRefactoring/confluence.js?tab=readme-ov-file#authentication) for more information | No | |
189205
| `confluence-root-page-name` | Customize Confluence page titles by adding a prefix to all of them for improved organization and clarity | No | |
190206
| `confluence-notice-message` | Notice message to add at the beginning of the Confluence pages | No | `<p><strong>AUTOMATION NOTICE: This page is synced automatically, changes made manually will be lost</strong></p>` |
191207
| `confluence-notice-template` | Template string to use for the notice message | No | |
@@ -212,7 +228,11 @@ module.exports = {
212228
docsDir: "docs",
213229
confluence: {
214230
url: "https://my-confluence.es",
215-
personalAccessToken: "*******",
231+
authentication: {
232+
oauth2: {
233+
accessToken: "*****"
234+
}
235+
},
216236
spaceKey: "MY-SPACE",
217237
rootPageId: "my-root-page-id"
218238
}

action.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,12 @@ inputs:
4444
type: string
4545
confluence-personal-access-token:
4646
description: 'Confluence personal access token'
47+
required: false
48+
type: string
49+
confluence-authentication:
50+
description: 'Confluence authentication object expressed as an stringified JSON'
51+
multiline: true
52+
required: false
4753
type: string
4854
confluence-space-key:
4955
description: 'Key of the Confluence space where the pages will be synced'

0 commit comments

Comments
 (0)