Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ Here are all the inputs [repo-file-sync-action](https://github.com/BetaHuhn/repo
### Outputs

The action sets the `pull_request_urls` output to the URLs of any created Pull Requests. It will be an array of URLs to each PR, e.g. `'["https://github.com/username/repository/pull/number", "..."]'`.
A `modified_files` array consisting of absolute paths to all modified/rendered files is also exported, which could be used for further validation or post-processing. e.g. `["tmp/github.com/my-org/my-repo@default/.github/workflows/build.yaml"]`

## 🛠️ Sync Configuration

Expand Down
7 changes: 7 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ async function run() {

const prUrls = []

const modifiedFiles = []
await forEach(repos, async (item) => {
core.info(`Repository Info`)
core.info(`Slug : ${ item.repo.name }`)
Expand Down Expand Up @@ -111,6 +112,8 @@ async function run() {
useOriginalMessage: useOriginalCommitMessage,
commitMessage: message[destExists].commit
})

modifiedFiles.push(dest)
}
})

Expand Down Expand Up @@ -200,8 +203,12 @@ async function run() {
core.setFailed(err.message)
core.debug(err)
}

})

core.setOutput('modified_files', modifiedFiles)
core.debug('Modified files: ' + modifiedFiles)

// If we created any PRs, set their URLs as the output
if (prUrls) {
core.setOutput('pull_request_urls', prUrls)
Expand Down