1fexd/poll-github-repo-action
Cron-based job that continuously polls configured repo for changes and creates tracking issues for them
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Stale
- License
- None
Inputs
| name | description | required | default |
|---|---|---|---|
| repo-to-sync | Repository you want to monitor. Must have a format "owner/repo" (like "facebook/react"). | yes | — |
| path-to-sync | Path to the file in <repo-to-sync> that you want to monitor. Can be something like "CHANGELOG.md". | yes | — |
| cache-path | Path to a local file that stores timestamps of the last check in ISO format. This is required to check only a small subset of changes on every run. Can be something like ".sync/CHANGELOG.md.last-sync". | yes | — |
| tracking-issue-label | Label you want to add to created issues. Only works when yes-create-issues is set to true | no | — |
| tracking-issue-title | Template for tracking issue title. Supported placeholder (same as for body): - {{ path }} - path of the file that is tracked, useful if you track multiple files - {{ sha-short }} - short (7 chars) SHA of the observed commit - {{ sha-full }} - full SHA of the observer commit - {{ message }} - message of the observed commit - {{ commit-date }} - creation date of the observer commit - {{ url }} - GitHub URL that points to observer commit Only works when yes-create-issues is set to true | no | — |
| tracking-issue-body | Template for tracking issue body. Supported placeholder (same as for title): - {{ path }} - path of the file that is tracked, useful if you track multiple files - {{ sha-short }} - short (7 chars) SHA of the observed commit - {{ sha-full }} - full SHA of the observer commit - {{ message }} - message of the observed commit - {{ commit-date }} - creation date of the observer commit - {{ url }} - GitHub URL that points to observer commit Only works when yes-create-issues is set to true | no | — |
| token | GitHub token, most probably you want "secrets.GITHUB_TOKEN" | yes | — |
| yes-create-issues | Boolean flag, must be set to 'true' if your configuration is ready. It's recommended to test it first with 'false', just to make sure that it won't create hundreds of issues. | yes | — |
Outputs
| name | description |
|---|---|
| newCommitsInSyncRepo | A boolean indicating wheter there where any new commits to the synced repo or not |
| newCommits | If newCommitsInSyncRepo is true, this contains a stringified JSON array containing an object for each commit with its path, url, sha, message and date Example: [ { "path":"data.txt", "url":"https://github.com/poll-github-repo/dummy-source-repo/commit/a52684431a3fda35c2ac4cde291071a3430f2268", "sha":"a52684431a3fda35c2ac4cde291071a3430f2268", "message":"update data.txt (three)", "date":"2022-03-14T16:23:55Z" } ] |
| createdIssues | If yes-create-issues is true, this contains a stringified JSON array containing an object with the issue number and its url for each created issue Example: [ { "number": 1, "url": "https://github.com/poll-github-repo/dummy-observer-repo/issues/1" } ] |