├── .eslintrc.cjs ├── .github ├── FUNDING.yml ├── ISSUE_TEMPLATE │ ├── bug_report.yml │ └── config.yml ├── dependabot.yml └── workflows │ ├── dependabot.yml │ ├── latest-tag.yml │ ├── node.yml │ ├── release-scheduler.yml │ └── release.yml ├── .gitignore ├── CHANGELOG.md ├── LICENSE ├── README.md ├── action.yml ├── dist ├── index.js ├── licenses.txt └── package.json ├── package-lock.json ├── package.json ├── release.config.cjs └── src ├── config.js ├── git.js ├── helpers.js └── index.js /.eslintrc.cjs: -------------------------------------------------------------------------------- 1 | module.exports = require('@betahuhn/config').eslint -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | ko_fi: betahuhn 2 | github: betahuhn 3 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.yml: -------------------------------------------------------------------------------- 1 | name: 🐛 Bug report 2 | description: Create a report to help us improve 3 | labels: ["bug"] 4 | body: 5 | - type: textarea 6 | id: description 7 | attributes: 8 | label: 🐞 Describe the bug 9 | description: | 10 | A clear and concise description of what the bug is. 11 | validations: 12 | required: true 13 | 14 | - type: textarea 15 | id: reproduce 16 | attributes: 17 | label: 📚 To reproduce 18 | description: | 19 | Steps to reproduce the behavior. 20 | validations: 21 | required: true 22 | 23 | - type: textarea 24 | id: expected 25 | attributes: 26 | label: 💡 Expected behavior 27 | description: | 28 | A clear and concise description of what you expected to happen. 29 | validations: 30 | required: true 31 | 32 | - type: textarea 33 | id: screenshots 34 | attributes: 35 | label: 🖼️ Screenshots 36 | description: | 37 | If applicable, add screenshots to help explain your problem. 38 | validations: 39 | required: false 40 | 41 | - type: textarea 42 | id: environment 43 | attributes: 44 | label: ⚙️ Environment 45 | description: | 46 | Action version: [e.g. v1.0.0] 47 | validations: 48 | required: true 49 | 50 | - type: textarea 51 | id: additional 52 | attributes: 53 | label: 📋 Additional context 54 | description: | 55 | Add any other context about the problem here. 56 | validations: 57 | required: false 58 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: false 2 | contact_links: 3 | - name: 📚 Docs 4 | url: https://github.com/BetaHuhn/repo-file-sync-action#-usage 5 | about: Checkout repo-file-sync-action's documentation. 6 | - name: 🚀 Feature Request 7 | url: https://github.com/BetaHuhn/repo-file-sync-action/discussions/new?category=ideas 8 | about: Share ideas for new features 9 | - name: ❓ Ask a Question 10 | url: https://github.com/BetaHuhn/repo-file-sync-action/discussions/new?category=q-a 11 | about: Ask the community for help -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: "npm" 4 | directory: "/" 5 | schedule: 6 | interval: "daily" 7 | - package-ecosystem: "github-actions" 8 | directory: "/" 9 | schedule: 10 | interval: "daily" -------------------------------------------------------------------------------- /.github/workflows/dependabot.yml: -------------------------------------------------------------------------------- 1 | name: Dependabot PR CI 2 | on: 3 | schedule: 4 | - cron: "0 */6 * * *" # Every six hours 5 | workflow_dispatch: 6 | jobs: 7 | auto-merge: 8 | name: Auto Merge 9 | runs-on: ubuntu-latest 10 | steps: 11 | - name: Merge minor/patch updates 12 | uses: koj-co/dependabot-pr-action@master 13 | with: 14 | token: ${{ secrets.GH_PAT }} 15 | merge-minor: true 16 | merge-patch: true -------------------------------------------------------------------------------- /.github/workflows/latest-tag.yml: -------------------------------------------------------------------------------- 1 | name: Tag CI 2 | on: 3 | release: 4 | types: [published, edited] 5 | jobs: 6 | latest: 7 | name: Latest 8 | runs-on: windows-latest 9 | steps: 10 | - name: Update latest tag 11 | uses: Actions-R-Us/actions-tagger@latest 12 | env: 13 | GITHUB_TOKEN: "${{ secrets.GH_PAT }}" 14 | with: 15 | publish_latest_tag: true -------------------------------------------------------------------------------- /.github/workflows/node.yml: -------------------------------------------------------------------------------- 1 | name: Node CI 2 | on: 3 | push: 4 | branches-ignore: 5 | - master 6 | pull_request: 7 | branches-ignore: 8 | - master 9 | jobs: 10 | lint: 11 | name: Lint 12 | runs-on: ubuntu-latest 13 | if: "!contains(github.event.head_commit.message, '[skip ci]')" 14 | steps: 15 | - name: Checkout 16 | uses: actions/checkout@v2 17 | - name: Setup Node.js 18 | uses: actions/setup-node@v2 19 | with: 20 | node-version: 14 21 | - name: Cache node modules 22 | uses: c-hive/gha-npm-cache@v1 23 | - name: Install dependencies 24 | run: npm ci 25 | - name: Run lint command 26 | run: npm run lint 27 | build: 28 | name: Build 29 | runs-on: ubuntu-latest 30 | if: "!contains(github.event.head_commit.message, '[skip ci]')" 31 | steps: 32 | - name: Checkout 33 | uses: actions/checkout@v2 34 | - name: Setup Node.js 35 | uses: actions/setup-node@v2 36 | with: 37 | node-version: 14 38 | - name: Cache node modules 39 | uses: c-hive/gha-npm-cache@v1 40 | - name: Install dependencies 41 | run: npm ci 42 | - name: Run build command 43 | run: npm run build -------------------------------------------------------------------------------- /.github/workflows/release-scheduler.yml: -------------------------------------------------------------------------------- 1 | name: Release Scheduler CI 2 | on: 3 | schedule: 4 | - cron: "0 0 * * 1" 5 | workflow_dispatch: 6 | jobs: 7 | releaseScheduler: 8 | runs-on: ubuntu-latest 9 | steps: 10 | - name: Run release-scheduler 11 | uses: koj-co/release-scheduler@master 12 | env: 13 | GH_PAT: ${{ secrets.GH_PAT }} 14 | -------------------------------------------------------------------------------- /.github/workflows/release.yml: -------------------------------------------------------------------------------- 1 | name: Release CI 2 | on: 3 | push: 4 | branches: 5 | - master 6 | jobs: 7 | lint: 8 | name: Lint 9 | runs-on: ubuntu-latest 10 | if: "!contains(github.event.head_commit.message, '[skip ci]')" 11 | steps: 12 | - name: Checkout 13 | uses: actions/checkout@v2 14 | - name: Setup Node.js 15 | uses: actions/setup-node@v2 16 | with: 17 | node-version: 14 18 | - name: Cache node modules 19 | uses: c-hive/gha-npm-cache@v1 20 | - name: Install dependencies 21 | run: npm ci 22 | - name: Run lint command 23 | run: npm run lint 24 | release: 25 | needs: [lint] 26 | name: Build and release 27 | runs-on: ubuntu-latest 28 | if: "!contains(github.event.head_commit.message, '[skip ci]')" 29 | steps: 30 | - name: Checkout 31 | uses: actions/checkout@v2 32 | - name: Setup Node.js 33 | uses: actions/setup-node@v2 34 | with: 35 | node-version: 14 36 | - name: Cache node modules 37 | uses: c-hive/gha-npm-cache@v1 38 | - name: Install dependencies 39 | run: npm ci 40 | - name: Run build command 41 | run: npm run build 42 | - name: Run Semantic Release 43 | run: npx semantic-release 44 | env: 45 | GITHUB_TOKEN: ${{ secrets.GH_PAT }} 46 | NPM_TOKEN: ${{ secrets.NPM_TOKEN }} 47 | COMMIT_ASSETS: dist 48 | GIT_AUTHOR_NAME: "BetaHuhn Bot" 49 | GIT_AUTHOR_EMAIL: "bot@mxis.ch" 50 | GIT_COMMITTER_NAME: "BetaHuhn Bot" 51 | GIT_COMMITTER_EMAIL: "bot@mxis.ch" 52 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | 3 | sync.yml 4 | tmp-*/ 5 | 6 | # Editors 7 | .vscode/ 8 | .idea/ 9 | *.iml 10 | 11 | # Logs 12 | logs 13 | *.log 14 | npm-debug.log* 15 | yarn-debug.log* 16 | yarn-error.log* 17 | 18 | # Runtime data 19 | pids 20 | *.pid 21 | *.seed 22 | *.pid.lock 23 | 24 | # nyc test coverage 25 | .nyc_output 26 | 27 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) 28 | .grunt 29 | 30 | # Bower dependency directory (https://bower.io/) 31 | bower_components 32 | 33 | # node-waf configuration 34 | .lock-wscript 35 | 36 | # Compiled binary addons (https://nodejs.org/api/addons.html) 37 | build/Release 38 | 39 | # Other Dependency directories 40 | jspm_packages/ 41 | 42 | # TypeScript v1 declaration files 43 | typings/ 44 | 45 | # Optional npm cache directory 46 | .npm 47 | 48 | # Optional eslint cache 49 | .eslintcache 50 | 51 | # Optional REPL history 52 | .node_repl_history 53 | 54 | # Output of 'npm pack' 55 | *.tgz 56 | 57 | # Yarn Integrity file 58 | .yarn-integrity 59 | 60 | # dotenv environment variables file 61 | .env 62 | 63 | # next.js build output 64 | .next 65 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ## [v1.21.1] - 2024-05-05 2 | 3 | [Release notes](https://github.com/betahuhn/repo-file-sync-action/releases/tag/v1.21.1) · [Compare](https://github.com/betahuhn/repo-file-sync-action/compare/v1.21.0...v1.21.1) · [Tag](https://github.com/betahuhn/repo-file-sync-action/tree/v1.21.1) · Archive ([zip](https://github.com/betahuhn/repo-file-sync-action/archive/v1.21.1.zip) · [tar.gz](https://github.com/betahuhn/repo-file-sync-action/archive/v1.21.1.tar.gz)) 4 | 5 | ### Bug fixes 6 | 7 | - [`899c636`](https://github.com/betahuhn/repo-file-sync-action/commit/899c636) Create Commit tree using GitHub API (#321) 8 | (Issues: [`#321`](https://github.com/betahuhn/repo-file-sync-action/issues/321) [`#246`](https://github.com/betahuhn/repo-file-sync-action/issues/246)) 9 | 10 | ### Security issues 11 | 12 | - [`88a3448`](https://github.com/betahuhn/repo-file-sync-action/commit/88a3448) Update action to Node 20 (#331) 13 | (Issues: [`#331`](https://github.com/betahuhn/repo-file-sync-action/issues/331) [`#332`](https://github.com/betahuhn/repo-file-sync-action/issues/332)) 14 | 15 | ## [v1.21.0] - 2023-01-10 16 | 17 | [Release notes](https://github.com/betahuhn/repo-file-sync-action/releases/tag/v1.21.0) · [Compare](https://github.com/betahuhn/repo-file-sync-action/compare/v1.20.2...v1.21.0) · [Tag](https://github.com/betahuhn/repo-file-sync-action/tree/v1.21.0) · Archive ([zip](https://github.com/betahuhn/repo-file-sync-action/archive/v1.21.0.zip) · [tar.gz](https://github.com/betahuhn/repo-file-sync-action/archive/v1.21.0.tar.gz)) 18 | 19 | ### New features 20 | 21 | - [`5c87303`](https://github.com/betahuhn/repo-file-sync-action/commit/5c87303) Add GHES support (#291) 22 | (Issues: [`#291`](https://github.com/betahuhn/repo-file-sync-action/issues/291)) 23 | 24 | ## [v1.20.2] - 2023-01-10 25 | 26 | [Release notes](https://github.com/betahuhn/repo-file-sync-action/releases/tag/v1.20.2) · [Compare](https://github.com/betahuhn/repo-file-sync-action/compare/v1.20.1...v1.20.2) · [Tag](https://github.com/betahuhn/repo-file-sync-action/tree/v1.20.2) · Archive ([zip](https://github.com/betahuhn/repo-file-sync-action/archive/v1.20.2.zip) · [tar.gz](https://github.com/betahuhn/repo-file-sync-action/archive/v1.20.2.tar.gz)) 27 | 28 | ### Updates 29 | 30 | - [`bd5425a`](https://github.com/betahuhn/repo-file-sync-action/commit/bd5425a) Make messages compatible with conventional commits (#290) 31 | (Issues: [`#290`](https://github.com/betahuhn/repo-file-sync-action/issues/290)) 32 | 33 | ## [v1.20.1] - 2023-01-09 34 | 35 | [Release notes](https://github.com/betahuhn/repo-file-sync-action/releases/tag/v1.20.1) · [Compare](https://github.com/betahuhn/repo-file-sync-action/compare/v1.20.0...v1.20.1) · [Tag](https://github.com/betahuhn/repo-file-sync-action/tree/v1.20.1) · Archive ([zip](https://github.com/betahuhn/repo-file-sync-action/archive/v1.20.1.zip) · [tar.gz](https://github.com/betahuhn/repo-file-sync-action/archive/v1.20.1.tar.gz)) 36 | 37 | ### Bug fixes 38 | 39 | - [`7f7a929`](https://github.com/betahuhn/repo-file-sync-action/commit/7f7a929) Fix esm imports 40 | 41 | ## [v1.20.0] - 2023-01-07 42 | 43 | [Release notes](https://github.com/betahuhn/repo-file-sync-action/releases/tag/v1.20.0) · [Compare](https://github.com/betahuhn/repo-file-sync-action/compare/v1.19.1...v1.20.0) · [Tag](https://github.com/betahuhn/repo-file-sync-action/tree/v1.20.0) · Archive ([zip](https://github.com/betahuhn/repo-file-sync-action/archive/v1.20.0.zip) · [tar.gz](https://github.com/betahuhn/repo-file-sync-action/archive/v1.20.0.tar.gz)) 44 | 45 | ### New features 46 | 47 | - [`eb95ce4`](https://github.com/betahuhn/repo-file-sync-action/commit/eb95ce4) Add possibility to exclude subfolders from synced folders (#274) 48 | (Issues: [`#274`](https://github.com/betahuhn/repo-file-sync-action/issues/274)) 49 | 50 | ### Updates 51 | 52 | - [`6f1bf85`](https://github.com/betahuhn/repo-file-sync-action/commit/6f1bf85) Move to ESM (#288) 53 | (Issues: [`#288`](https://github.com/betahuhn/repo-file-sync-action/issues/288)) 54 | 55 | ### Bug fixes 56 | 57 | - [`d2b8086`](https://github.com/betahuhn/repo-file-sync-action/commit/d2b8086) Fix linting and exclude 58 | 59 | ## [v1.19.1] - 2023-01-07 60 | 61 | [Release notes](https://github.com/betahuhn/repo-file-sync-action/releases/tag/v1.19.1) · [Compare](https://github.com/betahuhn/repo-file-sync-action/compare/v1.19.0...v1.19.1) · [Tag](https://github.com/betahuhn/repo-file-sync-action/tree/v1.19.1) · Archive ([zip](https://github.com/betahuhn/repo-file-sync-action/archive/v1.19.1.zip) · [tar.gz](https://github.com/betahuhn/repo-file-sync-action/archive/v1.19.1.tar.gz)) 62 | 63 | ### Bug fixes 64 | 65 | - [`5212d28`](https://github.com/betahuhn/repo-file-sync-action/commit/5212d28) Ignore `.git` folder when checking orphaned files (#287) 66 | (Issues: [`#287`](https://github.com/betahuhn/repo-file-sync-action/issues/287)) 67 | 68 | ## [v1.19.0] - 2022-11-30 69 | 70 | [Release notes](https://github.com/betahuhn/repo-file-sync-action/releases/tag/v1.19.0) · [Compare](https://github.com/betahuhn/repo-file-sync-action/compare/v1.18.0...v1.19.0) · [Tag](https://github.com/betahuhn/repo-file-sync-action/tree/v1.19.0) · Archive ([zip](https://github.com/betahuhn/repo-file-sync-action/archive/v1.19.0.zip) · [tar.gz](https://github.com/betahuhn/repo-file-sync-action/archive/v1.19.0.tar.gz)) 71 | 72 | ### New features 73 | 74 | - [`2d309a2`](https://github.com/betahuhn/repo-file-sync-action/commit/2d309a2) Added support for fine grained tokens (#268) 75 | (Issues: [`#268`](https://github.com/betahuhn/repo-file-sync-action/issues/268)) 76 | 77 | ## [v1.18.0] - 2022-11-18 78 | 79 | [Release notes](https://github.com/betahuhn/repo-file-sync-action/releases/tag/v1.18.0) · [Compare](https://github.com/betahuhn/repo-file-sync-action/compare/v1.17.22...v1.18.0) · [Tag](https://github.com/betahuhn/repo-file-sync-action/tree/v1.18.0) · Archive ([zip](https://github.com/betahuhn/repo-file-sync-action/archive/v1.18.0.zip) · [tar.gz](https://github.com/betahuhn/repo-file-sync-action/archive/v1.18.0.tar.gz)) 80 | 81 | ### New features 82 | 83 | - [`a2677cb`](https://github.com/betahuhn/repo-file-sync-action/commit/a2677cb) Add support for compiling Jinja-style templates with Nunjucks in sync process (#271) 84 | (Issues: [`#271`](https://github.com/betahuhn/repo-file-sync-action/issues/271)) 85 | 86 | ### Bug fixes 87 | 88 | - [`ed3f645`](https://github.com/betahuhn/repo-file-sync-action/commit/ed3f645) Fix lint errors 89 | 90 | ## [v1.17.22] - 2022-10-24 91 | 92 | [Release notes](https://github.com/betahuhn/repo-file-sync-action/releases/tag/v1.17.22) · [Compare](https://github.com/betahuhn/repo-file-sync-action/compare/v1.17.21...v1.17.22) · [Tag](https://github.com/betahuhn/repo-file-sync-action/tree/v1.17.22) · Archive ([zip](https://github.com/betahuhn/repo-file-sync-action/archive/v1.17.22.zip) · [tar.gz](https://github.com/betahuhn/repo-file-sync-action/archive/v1.17.22.tar.gz)) 93 | 94 | ### Security issues 95 | 96 | - [`56ab275`](https://github.com/betahuhn/repo-file-sync-action/commit/56ab275) Update action to use node v16 (#261) 97 | (Issues: [`#261`](https://github.com/betahuhn/repo-file-sync-action/issues/261)) 98 | 99 | ## [v1.17.21] - 2022-08-24 100 | 101 | [Release notes](https://github.com/betahuhn/repo-file-sync-action/releases/tag/v1.17.21) · [Compare](https://github.com/betahuhn/repo-file-sync-action/compare/v1.17.20...v1.17.21) · [Tag](https://github.com/betahuhn/repo-file-sync-action/tree/v1.17.21) · Archive ([zip](https://github.com/betahuhn/repo-file-sync-action/archive/v1.17.21.zip) · [tar.gz](https://github.com/betahuhn/repo-file-sync-action/archive/v1.17.21.tar.gz)) 102 | 103 | ### Bug fixes 104 | 105 | - [`ca2043b`](https://github.com/betahuhn/repo-file-sync-action/commit/ca2043b) Don't crash while trying to parse a diff for binary files, fix #128 (#242) 106 | (Issues: [`#128`](https://github.com/betahuhn/repo-file-sync-action/issues/128) [`#242`](https://github.com/betahuhn/repo-file-sync-action/issues/242)) 107 | 108 | ## [v1.17.20] - 2022-08-13 109 | 110 | [Release notes](https://github.com/betahuhn/repo-file-sync-action/releases/tag/v1.17.20) · [Compare](https://github.com/betahuhn/repo-file-sync-action/compare/v1.17.19...v1.17.20) · [Tag](https://github.com/betahuhn/repo-file-sync-action/tree/v1.17.20) · Archive ([zip](https://github.com/betahuhn/repo-file-sync-action/archive/v1.17.20.zip) · [tar.gz](https://github.com/betahuhn/repo-file-sync-action/archive/v1.17.20.tar.gz)) 111 | 112 | ### Bug fixes 113 | 114 | - [`b598643`](https://github.com/betahuhn/repo-file-sync-action/commit/b598643) Fix SKIP_PR option for runs with installation token (#232) 115 | (Issues: [`#232`](https://github.com/betahuhn/repo-file-sync-action/issues/232) [`#153`](https://github.com/betahuhn/repo-file-sync-action/issues/153)) 116 | 117 | ## [v1.17.19] - 2022-06-07 118 | 119 | [Release notes](https://github.com/betahuhn/repo-file-sync-action/releases/tag/v1.17.19) · [Compare](https://github.com/betahuhn/repo-file-sync-action/compare/v1.17.18...v1.17.19) · [Tag](https://github.com/betahuhn/repo-file-sync-action/tree/v1.17.19) · Archive ([zip](https://github.com/betahuhn/repo-file-sync-action/archive/v1.17.19.zip) · [tar.gz](https://github.com/betahuhn/repo-file-sync-action/archive/v1.17.19.tar.gz)) 120 | 121 | ### Bug fixes 122 | 123 | - [`f04e1cc`](https://github.com/betahuhn/repo-file-sync-action/commit/f04e1cc) Pin node-readfiles 124 | 125 | ## [v1.17.18] - 2022-06-06 126 | 127 | [Release notes](https://github.com/betahuhn/repo-file-sync-action/releases/tag/v1.17.18) · [Compare](https://github.com/betahuhn/repo-file-sync-action/compare/v1.17.17...v1.17.18) · [Tag](https://github.com/betahuhn/repo-file-sync-action/tree/v1.17.18) · Archive ([zip](https://github.com/betahuhn/repo-file-sync-action/archive/v1.17.18.zip) · [tar.gz](https://github.com/betahuhn/repo-file-sync-action/archive/v1.17.18.tar.gz)) 128 | 129 | ### Dependency updates 130 | 131 | - [`d51e600`](https://github.com/betahuhn/repo-file-sync-action/commit/d51e600) Bump action-input-parser from 1.2.32 to 1.2.33 132 | - [`b77d978`](https://github.com/betahuhn/repo-file-sync-action/commit/b77d978) Bump node-readfiles from 0.2.0 to 0.3.0 133 | 134 | ## [v1.17.17] - 2022-05-30 135 | 136 | [Release notes](https://github.com/betahuhn/repo-file-sync-action/releases/tag/v1.17.17) · [Compare](https://github.com/betahuhn/repo-file-sync-action/compare/v1.17.16...v1.17.17) · [Tag](https://github.com/betahuhn/repo-file-sync-action/tree/v1.17.17) · Archive ([zip](https://github.com/betahuhn/repo-file-sync-action/archive/v1.17.17.zip) · [tar.gz](https://github.com/betahuhn/repo-file-sync-action/archive/v1.17.17.tar.gz)) 137 | 138 | ### Dependency updates 139 | 140 | - [`5d88df6`](https://github.com/betahuhn/repo-file-sync-action/commit/5d88df6) Bump @vercel/ncc from 0.33.4 to 0.34.0 141 | 142 | ## [v1.17.16] - 2022-05-16 143 | 144 | [Release notes](https://github.com/betahuhn/repo-file-sync-action/releases/tag/v1.17.16) · [Compare](https://github.com/betahuhn/repo-file-sync-action/compare/v1.17.15...v1.17.16) · [Tag](https://github.com/betahuhn/repo-file-sync-action/tree/v1.17.16) · Archive ([zip](https://github.com/betahuhn/repo-file-sync-action/archive/v1.17.16.zip) · [tar.gz](https://github.com/betahuhn/repo-file-sync-action/archive/v1.17.16.tar.gz)) 145 | 146 | ### Dependency updates 147 | 148 | - [`70ceb48`](https://github.com/betahuhn/repo-file-sync-action/commit/70ceb48) Bump @actions/core from 1.8.0 to 1.8.1 149 | - [`944a918`](https://github.com/betahuhn/repo-file-sync-action/commit/944a918) Bump @actions/github from 5.0.1 to 5.0.2 150 | - [`26b80ac`](https://github.com/betahuhn/repo-file-sync-action/commit/26b80ac) Bump @actions/github from 5.0.2 to 5.0.3 151 | - [`e40c856`](https://github.com/betahuhn/repo-file-sync-action/commit/e40c856) Bump @actions/core from 1.8.1 to 1.8.2 152 | 153 | ## [v1.17.15] - 2022-05-09 154 | 155 | [Release notes](https://github.com/betahuhn/repo-file-sync-action/releases/tag/v1.17.15) · [Compare](https://github.com/betahuhn/repo-file-sync-action/compare/v1.17.14...v1.17.15) · [Tag](https://github.com/betahuhn/repo-file-sync-action/tree/v1.17.15) · Archive ([zip](https://github.com/betahuhn/repo-file-sync-action/archive/v1.17.15.zip) · [tar.gz](https://github.com/betahuhn/repo-file-sync-action/archive/v1.17.15.tar.gz)) 156 | 157 | ### Dependency updates 158 | 159 | - [`b3c326d`](https://github.com/betahuhn/repo-file-sync-action/commit/b3c326d) Bump @actions/core from 1.7.0 to 1.8.0 160 | 161 | ## [v1.17.14] - 2022-05-05 162 | 163 | [Release notes](https://github.com/betahuhn/repo-file-sync-action/releases/tag/v1.17.14) · [Compare](https://github.com/betahuhn/repo-file-sync-action/compare/v1.17.13...v1.17.14) · [Tag](https://github.com/betahuhn/repo-file-sync-action/tree/v1.17.14) · Archive ([zip](https://github.com/betahuhn/repo-file-sync-action/archive/v1.17.14.zip) · [tar.gz](https://github.com/betahuhn/repo-file-sync-action/archive/v1.17.14.tar.gz)) 164 | 165 | ### Bug fixes 166 | 167 | - [`64a0312`](https://github.com/betahuhn/repo-file-sync-action/commit/64a0312) Sanitize `/.` from branch name (#200) 168 | (Issues: [`#200`](https://github.com/betahuhn/repo-file-sync-action/issues/200)) 169 | 170 | ### Dependency updates 171 | 172 | - [`1ec3cb1`](https://github.com/betahuhn/repo-file-sync-action/commit/1ec3cb1) Bump action-input-parser from 1.2.31 to 1.2.32 173 | 174 | ## [v1.17.13] - 2022-05-02 175 | 176 | [Release notes](https://github.com/betahuhn/repo-file-sync-action/releases/tag/v1.17.13) · [Compare](https://github.com/betahuhn/repo-file-sync-action/compare/v1.17.12...v1.17.13) · [Tag](https://github.com/betahuhn/repo-file-sync-action/tree/v1.17.13) · Archive ([zip](https://github.com/betahuhn/repo-file-sync-action/archive/v1.17.13.zip) · [tar.gz](https://github.com/betahuhn/repo-file-sync-action/archive/v1.17.13.tar.gz)) 177 | 178 | ### Dependency updates 179 | 180 | - [`0bf4dea`](https://github.com/betahuhn/repo-file-sync-action/commit/0bf4dea) Bump @actions/core from 1.6.0 to 1.7.0 181 | 182 | ## [v1.17.12] - 2022-04-25 183 | 184 | [Release notes](https://github.com/betahuhn/repo-file-sync-action/releases/tag/v1.17.12) · [Compare](https://github.com/betahuhn/repo-file-sync-action/compare/v1.17.11...v1.17.12) · [Tag](https://github.com/betahuhn/repo-file-sync-action/tree/v1.17.12) · Archive ([zip](https://github.com/betahuhn/repo-file-sync-action/archive/v1.17.12.zip) · [tar.gz](https://github.com/betahuhn/repo-file-sync-action/archive/v1.17.12.tar.gz)) 185 | 186 | ### Dependency updates 187 | 188 | - [`d999148`](https://github.com/betahuhn/repo-file-sync-action/commit/d999148) Bump fs-extra from 10.0.1 to 10.1.0 189 | 190 | ## [v1.17.11] - 2022-04-18 191 | 192 | [Release notes](https://github.com/betahuhn/repo-file-sync-action/releases/tag/v1.17.11) · [Compare](https://github.com/betahuhn/repo-file-sync-action/compare/v1.17.10...v1.17.11) · [Tag](https://github.com/betahuhn/repo-file-sync-action/tree/v1.17.11) · Archive ([zip](https://github.com/betahuhn/repo-file-sync-action/archive/v1.17.11.zip) · [tar.gz](https://github.com/betahuhn/repo-file-sync-action/archive/v1.17.11.tar.gz)) 193 | 194 | ### Dependency updates 195 | 196 | - [`0425b26`](https://github.com/betahuhn/repo-file-sync-action/commit/0425b26) Bump @vercel/ncc from 0.33.3 to 0.33.4 197 | 198 | ## [v1.17.10] - 2022-04-04 199 | 200 | [Release notes](https://github.com/betahuhn/repo-file-sync-action/releases/tag/v1.17.10) · [Compare](https://github.com/betahuhn/repo-file-sync-action/compare/v1.17.9...v1.17.10) · [Tag](https://github.com/betahuhn/repo-file-sync-action/tree/v1.17.10) · Archive ([zip](https://github.com/betahuhn/repo-file-sync-action/archive/v1.17.10.zip) · [tar.gz](https://github.com/betahuhn/repo-file-sync-action/archive/v1.17.10.tar.gz)) 201 | 202 | ### Dependency updates 203 | 204 | - [`b58f515`](https://github.com/betahuhn/repo-file-sync-action/commit/b58f515) Bump action-input-parser from 1.2.30 to 1.2.31 205 | - [`2831fde`](https://github.com/betahuhn/repo-file-sync-action/commit/2831fde) Bump @actions/github from 5.0.0 to 5.0.1 206 | 207 | ## [v1.17.9] - 2022-03-28 208 | 209 | [Release notes](https://github.com/betahuhn/repo-file-sync-action/releases/tag/v1.17.9) · [Compare](https://github.com/betahuhn/repo-file-sync-action/compare/v1.17.8...v1.17.9) · [Tag](https://github.com/betahuhn/repo-file-sync-action/tree/v1.17.9) · Archive ([zip](https://github.com/betahuhn/repo-file-sync-action/archive/v1.17.9.zip) · [tar.gz](https://github.com/betahuhn/repo-file-sync-action/archive/v1.17.9.tar.gz)) 210 | 211 | ### Dependency updates 212 | 213 | - [`8ddff85`](https://github.com/betahuhn/repo-file-sync-action/commit/8ddff85) Bump action-input-parser from 1.2.29 to 1.2.30 214 | 215 | ## [v1.17.8] - 2022-03-21 216 | 217 | [Release notes](https://github.com/betahuhn/repo-file-sync-action/releases/tag/v1.17.8) · [Compare](https://github.com/betahuhn/repo-file-sync-action/compare/v1.17.7...v1.17.8) · [Tag](https://github.com/betahuhn/repo-file-sync-action/tree/v1.17.8) · Archive ([zip](https://github.com/betahuhn/repo-file-sync-action/archive/v1.17.8.zip) · [tar.gz](https://github.com/betahuhn/repo-file-sync-action/archive/v1.17.8.tar.gz)) 218 | 219 | ### Dependency updates 220 | 221 | - [`f9b6739`](https://github.com/betahuhn/repo-file-sync-action/commit/f9b6739) Bump @octokit/core from 3.5.1 to 3.6.0 222 | - [`e7b3f5a`](https://github.com/betahuhn/repo-file-sync-action/commit/e7b3f5a) Bump action-input-parser from 1.2.28 to 1.2.29 223 | - [`a046fe1`](https://github.com/betahuhn/repo-file-sync-action/commit/a046fe1) Bump @octokit/plugin-throttling from 3.6.1 to 3.6.2 224 | 225 | ## [v1.17.7] - 2022-03-13 226 | 227 | [Release notes](https://github.com/betahuhn/repo-file-sync-action/releases/tag/v1.17.7) · [Compare](https://github.com/betahuhn/repo-file-sync-action/compare/v1.17.6...v1.17.7) · [Tag](https://github.com/betahuhn/repo-file-sync-action/tree/v1.17.7) · Archive ([zip](https://github.com/betahuhn/repo-file-sync-action/archive/v1.17.7.zip) · [tar.gz](https://github.com/betahuhn/repo-file-sync-action/archive/v1.17.7.tar.gz)) 228 | 229 | ### Dependency updates 230 | 231 | - [`c17e3fc`](https://github.com/betahuhn/repo-file-sync-action/commit/c17e3fc) Bump action-input-parser from 1.2.27 to 1.2.28 232 | 233 | ## [v1.17.6] - 2022-03-07 234 | 235 | [Release notes](https://github.com/betahuhn/repo-file-sync-action/releases/tag/v1.17.6) · [Compare](https://github.com/betahuhn/repo-file-sync-action/compare/v1.17.5...v1.17.6) · [Tag](https://github.com/betahuhn/repo-file-sync-action/tree/v1.17.6) · Archive ([zip](https://github.com/betahuhn/repo-file-sync-action/archive/v1.17.6.zip) · [tar.gz](https://github.com/betahuhn/repo-file-sync-action/archive/v1.17.6.tar.gz)) 236 | 237 | ### Dependency updates 238 | 239 | - [`36cbece`](https://github.com/betahuhn/repo-file-sync-action/commit/36cbece) Bump @octokit/plugin-throttling from 3.5.2 to 3.6.1 240 | 241 | ## [v1.17.5] - 2022-02-28 242 | 243 | [Release notes](https://github.com/betahuhn/repo-file-sync-action/releases/tag/v1.17.5) · [Compare](https://github.com/betahuhn/repo-file-sync-action/compare/v1.17.4...v1.17.5) · [Tag](https://github.com/betahuhn/repo-file-sync-action/tree/v1.17.5) · Archive ([zip](https://github.com/betahuhn/repo-file-sync-action/archive/v1.17.5.zip) · [tar.gz](https://github.com/betahuhn/repo-file-sync-action/archive/v1.17.5.tar.gz)) 244 | 245 | ### Dependency updates 246 | 247 | - [`af3ff1b`](https://github.com/betahuhn/repo-file-sync-action/commit/af3ff1b) Bump fs-extra from 10.0.0 to 10.0.1 248 | 249 | ## [v1.17.4] - 2022-02-19 250 | 251 | [Release notes](https://github.com/betahuhn/repo-file-sync-action/releases/tag/v1.17.4) · [Compare](https://github.com/betahuhn/repo-file-sync-action/compare/v1.17.3...v1.17.4) · [Tag](https://github.com/betahuhn/repo-file-sync-action/tree/v1.17.4) · Archive ([zip](https://github.com/betahuhn/repo-file-sync-action/archive/v1.17.4.zip) · [tar.gz](https://github.com/betahuhn/repo-file-sync-action/archive/v1.17.4.tar.gz)) 252 | 253 | ### Bug fixes 254 | 255 | - [`0e2c893`](https://github.com/betahuhn/repo-file-sync-action/commit/0e2c893) Fix verified commits (#163) 256 | (Issues: [`#163`](https://github.com/betahuhn/repo-file-sync-action/issues/163)) 257 | 258 | ### Dependency updates 259 | 260 | - [`a76f286`](https://github.com/betahuhn/repo-file-sync-action/commit/a76f286) Bump @vercel/ncc from 0.33.2 to 0.33.3 261 | 262 | ## [v1.17.3] - 2022-02-14 263 | 264 | [Release notes](https://github.com/betahuhn/repo-file-sync-action/releases/tag/v1.17.3) · [Compare](https://github.com/betahuhn/repo-file-sync-action/compare/v1.17.2...v1.17.3) · [Tag](https://github.com/betahuhn/repo-file-sync-action/tree/v1.17.3) · Archive ([zip](https://github.com/betahuhn/repo-file-sync-action/archive/v1.17.3.zip) · [tar.gz](https://github.com/betahuhn/repo-file-sync-action/archive/v1.17.3.tar.gz)) 265 | 266 | ### Bug fixes 267 | 268 | - [`899abc4`](https://github.com/betahuhn/repo-file-sync-action/commit/899abc4) Fix replace and deleteOrphaned options (#166) 269 | (Issues: [`#166`](https://github.com/betahuhn/repo-file-sync-action/issues/166)) 270 | 271 | ## [v1.17.2] - 2022-02-14 272 | 273 | [Release notes](https://github.com/betahuhn/repo-file-sync-action/releases/tag/v1.17.2) · [Compare](https://github.com/betahuhn/repo-file-sync-action/compare/v1.17.1...v1.17.2) · [Tag](https://github.com/betahuhn/repo-file-sync-action/tree/v1.17.2) · Archive ([zip](https://github.com/betahuhn/repo-file-sync-action/archive/v1.17.2.zip) · [tar.gz](https://github.com/betahuhn/repo-file-sync-action/archive/v1.17.2.tar.gz)) 274 | 275 | ### Dependency updates 276 | 277 | - [`99ea487`](https://github.com/betahuhn/repo-file-sync-action/commit/99ea487) Bump @vercel/ncc from 0.33.1 to 0.33.2 278 | 279 | ## [v1.17.1] - 2022-02-10 280 | 281 | [Release notes](https://github.com/betahuhn/repo-file-sync-action/releases/tag/v1.17.1) · [Compare](https://github.com/betahuhn/repo-file-sync-action/compare/v1.17.0...v1.17.1) · [Tag](https://github.com/betahuhn/repo-file-sync-action/tree/v1.17.1) · Archive ([zip](https://github.com/betahuhn/repo-file-sync-action/archive/v1.17.1.zip) · [tar.gz](https://github.com/betahuhn/repo-file-sync-action/archive/v1.17.1.tar.gz)) 282 | 283 | ### Bug fixes 284 | 285 | - [`8f9e9fd`](https://github.com/betahuhn/repo-file-sync-action/commit/8f9e9fd) Fix commit message escaping (#164) 286 | (Issues: [`#164`](https://github.com/betahuhn/repo-file-sync-action/issues/164)) 287 | 288 | ## [v1.17.0] - 2022-02-08 289 | 290 | [Release notes](https://github.com/betahuhn/repo-file-sync-action/releases/tag/v1.17.0) · [Compare](https://github.com/betahuhn/repo-file-sync-action/compare/v1.16.5...v1.17.0) · [Tag](https://github.com/betahuhn/repo-file-sync-action/tree/v1.17.0) · Archive ([zip](https://github.com/betahuhn/repo-file-sync-action/archive/v1.17.0.zip) · [tar.gz](https://github.com/betahuhn/repo-file-sync-action/archive/v1.17.0.tar.gz)) 291 | 292 | ### New features 293 | 294 | - [`a547f3c`](https://github.com/betahuhn/repo-file-sync-action/commit/a547f3c) Verified commits when using GH_INSTALLATION_TOKEN as authentication (#153) 295 | (Issues: [`#153`](https://github.com/betahuhn/repo-file-sync-action/issues/153))- [`65a0234`](https://github.com/betahuhn/repo-file-sync-action/commit/65a0234) Request PR review from users and teams (#162) 296 | (Issues: [`#162`](https://github.com/betahuhn/repo-file-sync-action/issues/162)) 297 | 298 | ### Bug fixes 299 | 300 | - [`ea27671`](https://github.com/betahuhn/repo-file-sync-action/commit/ea27671) Include hidden files in check for orphaned files (#160) 301 | (Issues: [`#160`](https://github.com/betahuhn/repo-file-sync-action/issues/160)) 302 | 303 | ## [v1.16.5] - 2022-01-31 304 | 305 | [Release notes](https://github.com/betahuhn/repo-file-sync-action/releases/tag/v1.16.5) · [Compare](https://github.com/betahuhn/repo-file-sync-action/compare/v1.16.4...v1.16.5) · [Tag](https://github.com/betahuhn/repo-file-sync-action/tree/v1.16.5) · Archive ([zip](https://github.com/betahuhn/repo-file-sync-action/archive/v1.16.5.zip) · [tar.gz](https://github.com/betahuhn/repo-file-sync-action/archive/v1.16.5.tar.gz)) 306 | 307 | ### Dependency updates 308 | 309 | - [`8555855`](https://github.com/betahuhn/repo-file-sync-action/commit/8555855) Bump action-input-parser from 1.2.26 to 1.2.27 310 | 311 | ## [v1.16.4] - 2022-01-03 312 | 313 | [Release notes](https://github.com/betahuhn/repo-file-sync-action/releases/tag/v1.16.4) · [Compare](https://github.com/betahuhn/repo-file-sync-action/compare/v1.16.3...v1.16.4) · [Tag](https://github.com/betahuhn/repo-file-sync-action/tree/v1.16.4) · Archive ([zip](https://github.com/betahuhn/repo-file-sync-action/archive/v1.16.4.zip) · [tar.gz](https://github.com/betahuhn/repo-file-sync-action/archive/v1.16.4.tar.gz)) 314 | 315 | ### Dependency updates 316 | 317 | - [`a02872f`](https://github.com/betahuhn/repo-file-sync-action/commit/a02872f) Bump action-input-parser from 1.2.25 to 1.2.26 318 | 319 | ## [v1.16.3] - 2021-12-22 320 | 321 | [Release notes](https://github.com/betahuhn/repo-file-sync-action/releases/tag/v1.16.3) · [Compare](https://github.com/betahuhn/repo-file-sync-action/compare/v1.16.2...v1.16.3) · [Tag](https://github.com/betahuhn/repo-file-sync-action/tree/v1.16.3) · Archive ([zip](https://github.com/betahuhn/repo-file-sync-action/archive/v1.16.3.zip) · [tar.gz](https://github.com/betahuhn/repo-file-sync-action/archive/v1.16.3.tar.gz)) 322 | 323 | ### Bug fixes 324 | 325 | - [`4302bf5`](https://github.com/betahuhn/repo-file-sync-action/commit/4302bf5) Fix bug introduced by last release 326 | 327 | ## [v1.16.2] - 2021-12-22 328 | 329 | [Release notes](https://github.com/betahuhn/repo-file-sync-action/releases/tag/v1.16.2) · [Compare](https://github.com/betahuhn/repo-file-sync-action/compare/v1.16.1...v1.16.2) · [Tag](https://github.com/betahuhn/repo-file-sync-action/tree/v1.16.2) · Archive ([zip](https://github.com/betahuhn/repo-file-sync-action/archive/v1.16.2.zip) · [tar.gz](https://github.com/betahuhn/repo-file-sync-action/archive/v1.16.2.tar.gz)) 330 | 331 | ### Bug fixes 332 | 333 | - [`eb3a718`](https://github.com/betahuhn/repo-file-sync-action/commit/eb3a718) Add trailing slash to destination directories 334 | 335 | ### Dependency updates 336 | 337 | - [`3863803`](https://github.com/betahuhn/repo-file-sync-action/commit/3863803) Bump @vercel/ncc from 0.33.0 to 0.33.1 338 | - [`54932d2`](https://github.com/betahuhn/repo-file-sync-action/commit/54932d2) Bump action-input-parser from 1.2.24 to 1.2.25 339 | 340 | ## [v1.16.1] - 2021-12-19 341 | 342 | [Release notes](https://github.com/betahuhn/repo-file-sync-action/releases/tag/v1.16.1) · [Compare](https://github.com/betahuhn/repo-file-sync-action/compare/v1.16.0...v1.16.1) · [Tag](https://github.com/betahuhn/repo-file-sync-action/tree/v1.16.1) · Archive ([zip](https://github.com/betahuhn/repo-file-sync-action/archive/v1.16.1.zip) · [tar.gz](https://github.com/betahuhn/repo-file-sync-action/archive/v1.16.1.tar.gz)) 343 | 344 | ### Bug fixes 345 | 346 | - [`3b3aefb`](https://github.com/betahuhn/repo-file-sync-action/commit/3b3aefb) Fix assigning labels and assignees, broken by FORK #146 347 | (Issues: [`#146`](https://github.com/betahuhn/repo-file-sync-action/issues/146)) 348 | 349 | ### Dependency updates 350 | 351 | - [`55662fb`](https://github.com/betahuhn/repo-file-sync-action/commit/55662fb) Bump action-input-parser from 1.2.23 to 1.2.24 352 | 353 | ## [v1.16.0] - 2021-12-11 354 | 355 | [Release notes](https://github.com/betahuhn/repo-file-sync-action/releases/tag/v1.16.0) · [Compare](https://github.com/betahuhn/repo-file-sync-action/compare/v1.15.5...v1.16.0) · [Tag](https://github.com/betahuhn/repo-file-sync-action/tree/v1.16.0) · Archive ([zip](https://github.com/betahuhn/repo-file-sync-action/archive/v1.16.0.zip) · [tar.gz](https://github.com/betahuhn/repo-file-sync-action/archive/v1.16.0.tar.gz)) 356 | 357 | ### New features 358 | 359 | - [`80e77fd`](https://github.com/betahuhn/repo-file-sync-action/commit/80e77fd) Add fork workflow functionality (#135) 360 | (Issues: [`#135`](https://github.com/betahuhn/repo-file-sync-action/issues/135) [`#133`](https://github.com/betahuhn/repo-file-sync-action/issues/133)) 361 | 362 | ## [v1.15.5] - 2021-12-06 363 | 364 | [Release notes](https://github.com/betahuhn/repo-file-sync-action/releases/tag/v1.15.5) · [Compare](https://github.com/betahuhn/repo-file-sync-action/compare/v1.15.4...v1.15.5) · [Tag](https://github.com/betahuhn/repo-file-sync-action/tree/v1.15.5) · Archive ([zip](https://github.com/betahuhn/repo-file-sync-action/archive/v1.15.5.zip) · [tar.gz](https://github.com/betahuhn/repo-file-sync-action/archive/v1.15.5.tar.gz)) 365 | 366 | ### Dependency updates 367 | 368 | - [`ecbb6bc`](https://github.com/betahuhn/repo-file-sync-action/commit/ecbb6bc) Bump @vercel/ncc from 0.32.0 to 0.33.0 369 | 370 | ## [v1.15.4] - 2021-11-29 371 | 372 | [Release notes](https://github.com/betahuhn/repo-file-sync-action/releases/tag/v1.15.4) · [Compare](https://github.com/betahuhn/repo-file-sync-action/compare/v1.15.3...v1.15.4) · [Tag](https://github.com/betahuhn/repo-file-sync-action/tree/v1.15.4) · Archive ([zip](https://github.com/betahuhn/repo-file-sync-action/archive/v1.15.4.zip) · [tar.gz](https://github.com/betahuhn/repo-file-sync-action/archive/v1.15.4.tar.gz)) 373 | 374 | ### Dependency updates 375 | 376 | - [`1e2c979`](https://github.com/betahuhn/repo-file-sync-action/commit/1e2c979) Bump action-input-parser from 1.2.22 to 1.2.23 377 | 378 | ## [v1.15.3] - 2021-11-22 379 | 380 | [Release notes](https://github.com/betahuhn/repo-file-sync-action/releases/tag/v1.15.3) · [Compare](https://github.com/betahuhn/repo-file-sync-action/compare/v1.15.2...v1.15.3) · [Tag](https://github.com/betahuhn/repo-file-sync-action/tree/v1.15.3) · Archive ([zip](https://github.com/betahuhn/repo-file-sync-action/archive/v1.15.3.zip) · [tar.gz](https://github.com/betahuhn/repo-file-sync-action/archive/v1.15.3.tar.gz)) 381 | 382 | ### Dependency updates 383 | 384 | - [`69a746d`](https://github.com/betahuhn/repo-file-sync-action/commit/69a746d) Bump @vercel/ncc from 0.31.1 to 0.32.0 385 | 386 | ## [v1.15.2] - 2021-11-09 387 | 388 | [Release notes](https://github.com/betahuhn/repo-file-sync-action/releases/tag/v1.15.2) · [Compare](https://github.com/betahuhn/repo-file-sync-action/compare/v1.15.1...v1.15.2) · [Tag](https://github.com/betahuhn/repo-file-sync-action/tree/v1.15.2) · Archive ([zip](https://github.com/betahuhn/repo-file-sync-action/archive/v1.15.2.zip) · [tar.gz](https://github.com/betahuhn/repo-file-sync-action/archive/v1.15.2.tar.gz)) 389 | 390 | ### Updates 391 | 392 | - [`c113c62`](https://github.com/betahuhn/repo-file-sync-action/commit/c113c62) Mark action as failed if error occurs during sync 393 | (Issues: [`#95`](https://github.com/betahuhn/repo-file-sync-action/issues/95)) 394 | 395 | ### Bug fixes 396 | 397 | - [`53d0397`](https://github.com/betahuhn/repo-file-sync-action/commit/53d0397) Fix rate limit issue (#132) 398 | (Issues: [`#132`](https://github.com/betahuhn/repo-file-sync-action/issues/132) [`#126`](https://github.com/betahuhn/repo-file-sync-action/issues/126)) 399 | 400 | ## [v1.15.1] - 2021-10-25 401 | 402 | [Release notes](https://github.com/betahuhn/repo-file-sync-action/releases/tag/v1.15.1) · [Compare](https://github.com/betahuhn/repo-file-sync-action/compare/v1.15.0...v1.15.1) · [Tag](https://github.com/betahuhn/repo-file-sync-action/tree/v1.15.1) · Archive ([zip](https://github.com/betahuhn/repo-file-sync-action/archive/v1.15.1.zip) · [tar.gz](https://github.com/betahuhn/repo-file-sync-action/archive/v1.15.1.tar.gz)) 403 | 404 | ### Dependency updates 405 | 406 | - [`4e18740`](https://github.com/betahuhn/repo-file-sync-action/commit/4e18740) Bump action-input-parser from 1.2.21 to 1.2.22 407 | 408 | ## [v1.15.0] - 2021-10-16 409 | 410 | [Release notes](https://github.com/betahuhn/repo-file-sync-action/releases/tag/v1.15.0) · [Compare](https://github.com/betahuhn/repo-file-sync-action/compare/v1.14.2...v1.15.0) · [Tag](https://github.com/betahuhn/repo-file-sync-action/tree/v1.15.0) · Archive ([zip](https://github.com/betahuhn/repo-file-sync-action/archive/v1.15.0.zip) · [tar.gz](https://github.com/betahuhn/repo-file-sync-action/archive/v1.15.0.tar.gz)) 411 | 412 | ### New features 413 | 414 | - [`f9fdef0`](https://github.com/betahuhn/repo-file-sync-action/commit/f9fdef0) Save the PR URLs in the `pull_request_urls` output (#121) 415 | (Issues: [`#121`](https://github.com/betahuhn/repo-file-sync-action/issues/121)) 416 | 417 | ### Dependency updates 418 | 419 | - [`cf1dbf7`](https://github.com/betahuhn/repo-file-sync-action/commit/cf1dbf7) Bump action-input-parser from 1.2.20 to 1.2.21 420 | 421 | ## [v1.14.2] - 2021-10-11 422 | 423 | [Release notes](https://github.com/betahuhn/repo-file-sync-action/releases/tag/v1.14.2) · [Compare](https://github.com/betahuhn/repo-file-sync-action/compare/v1.14.1...v1.14.2) · [Tag](https://github.com/betahuhn/repo-file-sync-action/tree/v1.14.2) · Archive ([zip](https://github.com/betahuhn/repo-file-sync-action/archive/v1.14.2.zip) · [tar.gz](https://github.com/betahuhn/repo-file-sync-action/archive/v1.14.2.tar.gz)) 424 | 425 | ### Dependency updates 426 | 427 | - [`9a800c0`](https://github.com/betahuhn/repo-file-sync-action/commit/9a800c0) Bump action-input-parser from 1.2.19 to 1.2.20 428 | 429 | ## [v1.14.1] - 2021-10-04 430 | 431 | [Release notes](https://github.com/betahuhn/repo-file-sync-action/releases/tag/v1.14.1) · [Compare](https://github.com/betahuhn/repo-file-sync-action/compare/v1.14.0...v1.14.1) · [Tag](https://github.com/betahuhn/repo-file-sync-action/tree/v1.14.1) · Archive ([zip](https://github.com/betahuhn/repo-file-sync-action/archive/v1.14.1.zip) · [tar.gz](https://github.com/betahuhn/repo-file-sync-action/archive/v1.14.1.tar.gz)) 432 | 433 | ### Dependency updates 434 | 435 | - [`79cf15c`](https://github.com/betahuhn/repo-file-sync-action/commit/79cf15c) Bump action-input-parser from 1.2.18 to 1.2.19 436 | - [`45e2975`](https://github.com/betahuhn/repo-file-sync-action/commit/45e2975) Bump @actions/core from 1.5.0 to 1.6.0 437 | 438 | ## [v1.14.0] - 2021-09-27 439 | 440 | [Release notes](https://github.com/betahuhn/repo-file-sync-action/releases/tag/v1.14.0) · [Compare](https://github.com/betahuhn/repo-file-sync-action/compare/v1.13.5...v1.14.0) · [Tag](https://github.com/betahuhn/repo-file-sync-action/tree/v1.14.0) · Archive ([zip](https://github.com/betahuhn/repo-file-sync-action/archive/v1.14.0.zip) · [tar.gz](https://github.com/betahuhn/repo-file-sync-action/archive/v1.14.0.tar.gz)) 441 | 442 | ### New features 443 | 444 | - [`8c50c0d`](https://github.com/betahuhn/repo-file-sync-action/commit/8c50c0d) Add COMMIT_AS_PR_TITLE option (#115) 445 | (Issues: [`#115`](https://github.com/betahuhn/repo-file-sync-action/issues/115) [`#103`](https://github.com/betahuhn/repo-file-sync-action/issues/103)) 446 | 447 | ## [v1.13.5] - 2021-09-23 448 | 449 | [Release notes](https://github.com/betahuhn/repo-file-sync-action/releases/tag/v1.13.5) · [Compare](https://github.com/betahuhn/repo-file-sync-action/compare/v1.13.4...v1.13.5) · [Tag](https://github.com/betahuhn/repo-file-sync-action/tree/v1.13.5) · Archive ([zip](https://github.com/betahuhn/repo-file-sync-action/archive/v1.13.5.zip) · [tar.gz](https://github.com/betahuhn/repo-file-sync-action/archive/v1.13.5.tar.gz)) 450 | 451 | ### Bug fixes 452 | 453 | - [`0abefcc`](https://github.com/betahuhn/repo-file-sync-action/commit/0abefcc) Check if exclude exists before using it (#114) 454 | (Issues: [`#114`](https://github.com/betahuhn/repo-file-sync-action/issues/114)) 455 | 456 | ### Dependency updates 457 | 458 | - [`25c6114`](https://github.com/betahuhn/repo-file-sync-action/commit/25c6114) Bump action-input-parser from 1.2.17 to 1.2.18 459 | 460 | ## [v1.13.4] - 2021-09-17 461 | 462 | [Release notes](https://github.com/betahuhn/repo-file-sync-action/releases/tag/v1.13.4) · [Compare](https://github.com/betahuhn/repo-file-sync-action/compare/v1.13.3...v1.13.4) · [Tag](https://github.com/betahuhn/repo-file-sync-action/tree/v1.13.4) · Archive ([zip](https://github.com/betahuhn/repo-file-sync-action/archive/v1.13.4.zip) · [tar.gz](https://github.com/betahuhn/repo-file-sync-action/archive/v1.13.4.tar.gz)) 463 | 464 | ### Bug fixes 465 | 466 | - [`7f838d5`](https://github.com/betahuhn/repo-file-sync-action/commit/7f838d5) Trim whitespace on repos list (#111) 467 | (Issues: [`#111`](https://github.com/betahuhn/repo-file-sync-action/issues/111)) 468 | 469 | ### Dependency updates 470 | 471 | - [`d19a71d`](https://github.com/betahuhn/repo-file-sync-action/commit/d19a71d) Bump action-input-parser from 1.2.16 to 1.2.17 472 | - [`ea75b37`](https://github.com/betahuhn/repo-file-sync-action/commit/ea75b37) Bump @vercel/ncc from 0.31.0 to 0.31.1 473 | 474 | ## [v1.13.3] - 2021-09-13 475 | 476 | [Release notes](https://github.com/betahuhn/repo-file-sync-action/releases/tag/v1.13.3) · [Compare](https://github.com/betahuhn/repo-file-sync-action/compare/v1.13.2...v1.13.3) · [Tag](https://github.com/betahuhn/repo-file-sync-action/tree/v1.13.3) · Archive ([zip](https://github.com/betahuhn/repo-file-sync-action/archive/v1.13.3.zip) · [tar.gz](https://github.com/betahuhn/repo-file-sync-action/archive/v1.13.3.tar.gz)) 477 | 478 | ### Dependency updates 479 | 480 | - [`16e7e90`](https://github.com/betahuhn/repo-file-sync-action/commit/16e7e90) Bump @vercel/ncc from 0.30.0 to 0.31.0 481 | 482 | ## [v1.13.2] - 2021-09-07 483 | 484 | [Release notes](https://github.com/betahuhn/repo-file-sync-action/releases/tag/v1.13.2) · [Compare](https://github.com/betahuhn/repo-file-sync-action/compare/v1.13.1...v1.13.2) · [Tag](https://github.com/betahuhn/repo-file-sync-action/tree/v1.13.2) · Archive ([zip](https://github.com/betahuhn/repo-file-sync-action/archive/v1.13.2.zip) · [tar.gz](https://github.com/betahuhn/repo-file-sync-action/archive/v1.13.2.tar.gz)) 485 | 486 | ### Dependency updates 487 | 488 | - [`c4319ab`](https://github.com/betahuhn/repo-file-sync-action/commit/c4319ab) Bump action-input-parser from 1.2.15 to 1.2.16 489 | - [`3007ff6`](https://github.com/betahuhn/repo-file-sync-action/commit/3007ff6) Bump @octokit/plugin-throttling from 3.5.1 to 3.5.2 490 | 491 | ## [v1.13.1] - 2021-09-06 492 | 493 | [Release notes](https://github.com/betahuhn/repo-file-sync-action/releases/tag/v1.13.1) · [Compare](https://github.com/betahuhn/repo-file-sync-action/compare/v1.13.0...v1.13.1) · [Tag](https://github.com/betahuhn/repo-file-sync-action/tree/v1.13.1) · Archive ([zip](https://github.com/betahuhn/repo-file-sync-action/archive/v1.13.1.zip) · [tar.gz](https://github.com/betahuhn/repo-file-sync-action/archive/v1.13.1.tar.gz)) 494 | 495 | ## [v1.13.0] - 2021-09-06 496 | 497 | [Release notes](https://github.com/betahuhn/repo-file-sync-action/releases/tag/v1.13.0) · [Compare](https://github.com/betahuhn/repo-file-sync-action/compare/v1.12.0...v1.13.0) · [Tag](https://github.com/betahuhn/repo-file-sync-action/tree/v1.13.0) · Archive ([zip](https://github.com/betahuhn/repo-file-sync-action/archive/v1.13.0.zip) · [tar.gz](https://github.com/betahuhn/repo-file-sync-action/archive/v1.13.0.tar.gz)) 498 | 499 | ### New features 500 | 501 | - [`0e59a9c`](https://github.com/betahuhn/repo-file-sync-action/commit/0e59a9c) Display notice with PR link (#101) 502 | (Issues: [`#101`](https://github.com/betahuhn/repo-file-sync-action/issues/101) [`#100`](https://github.com/betahuhn/repo-file-sync-action/issues/100)) 503 | 504 | ### Bug fixes 505 | 506 | - [`013b028`](https://github.com/betahuhn/repo-file-sync-action/commit/013b028) Do not delete excluded files if deleteOrphaned is true (#98) 507 | (Issues: [`#98`](https://github.com/betahuhn/repo-file-sync-action/issues/98) [`#97`](https://github.com/betahuhn/repo-file-sync-action/issues/97)) 508 | 509 | ## [v1.12.0] - 2021-09-04 510 | 511 | [Release notes](https://github.com/betahuhn/repo-file-sync-action/releases/tag/v1.12.0) · [Compare](https://github.com/betahuhn/repo-file-sync-action/compare/v1.11.1...v1.12.0) · [Tag](https://github.com/betahuhn/repo-file-sync-action/tree/v1.12.0) · Archive ([zip](https://github.com/betahuhn/repo-file-sync-action/archive/v1.12.0.zip) · [tar.gz](https://github.com/betahuhn/repo-file-sync-action/archive/v1.12.0.tar.gz)) 512 | 513 | ### New features 514 | 515 | - [`c03c7b0`](https://github.com/betahuhn/repo-file-sync-action/commit/c03c7b0) Add option to use original commit message (#96) 516 | (Issues: [`#96`](https://github.com/betahuhn/repo-file-sync-action/issues/96) [`#13`](https://github.com/betahuhn/repo-file-sync-action/issues/13)) 517 | 518 | ## [v1.11.1] - 2021-09-04 519 | 520 | [Release notes](https://github.com/betahuhn/repo-file-sync-action/releases/tag/v1.11.1) · [Compare](https://github.com/betahuhn/repo-file-sync-action/compare/v1.11.0...v1.11.1) · [Tag](https://github.com/betahuhn/repo-file-sync-action/tree/v1.11.1) · Archive ([zip](https://github.com/betahuhn/repo-file-sync-action/archive/v1.11.1.zip) · [tar.gz](https://github.com/betahuhn/repo-file-sync-action/archive/v1.11.1.tar.gz)) 521 | 522 | ## [v1.11.0] - 2021-09-03 523 | 524 | [Release notes](https://github.com/betahuhn/repo-file-sync-action/releases/tag/v1.11.0) · [Compare](https://github.com/betahuhn/repo-file-sync-action/compare/v1.10.3...v1.11.0) · [Tag](https://github.com/betahuhn/repo-file-sync-action/tree/v1.11.0) · Archive ([zip](https://github.com/betahuhn/repo-file-sync-action/archive/v1.11.0.zip) · [tar.gz](https://github.com/betahuhn/repo-file-sync-action/archive/v1.11.0.tar.gz)) 525 | 526 | ### New features 527 | 528 | - [`4e6eff1`](https://github.com/betahuhn/repo-file-sync-action/commit/4e6eff1) Add option to provide an installation token instead of a PAT (#91) 529 | (Issues: [`#91`](https://github.com/betahuhn/repo-file-sync-action/issues/91)) 530 | 531 | ### Dependency updates 532 | 533 | - [`5b9070f`](https://github.com/betahuhn/repo-file-sync-action/commit/5b9070f) Bump action-input-parser from 1.2.14 to 1.2.15 534 | 535 | ## [v1.10.3] - 2021-08-30 536 | 537 | [Release notes](https://github.com/betahuhn/repo-file-sync-action/releases/tag/v1.10.3) · [Compare](https://github.com/betahuhn/repo-file-sync-action/compare/v1.10.2...v1.10.3) · [Tag](https://github.com/betahuhn/repo-file-sync-action/tree/v1.10.3) · Archive ([zip](https://github.com/betahuhn/repo-file-sync-action/archive/v1.10.3.zip) · [tar.gz](https://github.com/betahuhn/repo-file-sync-action/archive/v1.10.3.tar.gz)) 538 | 539 | ### Dependency updates 540 | 541 | - [`daa09dd`](https://github.com/betahuhn/repo-file-sync-action/commit/daa09dd) Bump action-input-parser from 1.2.13 to 1.2.14 542 | - [`e25059e`](https://github.com/betahuhn/repo-file-sync-action/commit/e25059e) Bump @vercel/ncc from 0.29.2 to 0.30.0 543 | 544 | ## [v1.10.2] - 2021-08-23 545 | 546 | [Release notes](https://github.com/betahuhn/repo-file-sync-action/releases/tag/v1.10.2) · [Compare](https://github.com/betahuhn/repo-file-sync-action/compare/v1.10.1...v1.10.2) · [Tag](https://github.com/betahuhn/repo-file-sync-action/tree/v1.10.2) · Archive ([zip](https://github.com/betahuhn/repo-file-sync-action/archive/v1.10.2.zip) · [tar.gz](https://github.com/betahuhn/repo-file-sync-action/archive/v1.10.2.tar.gz)) 547 | 548 | ### Dependency updates 549 | 550 | - [`a2b31de`](https://github.com/betahuhn/repo-file-sync-action/commit/a2b31de) Bump action-input-parser from 1.2.12 to 1.2.13 551 | - [`a7e270f`](https://github.com/betahuhn/repo-file-sync-action/commit/a7e270f) Bump @vercel/ncc from 0.29.1 to 0.29.2 552 | - [`427b453`](https://github.com/betahuhn/repo-file-sync-action/commit/427b453) Bump @actions/core from 1.4.0 to 1.5.0 553 | 554 | ## [v1.10.1] - 2021-08-16 555 | 556 | [Release notes](https://github.com/betahuhn/repo-file-sync-action/releases/tag/v1.10.1) · [Compare](https://github.com/betahuhn/repo-file-sync-action/compare/v1.10.0...v1.10.1) · [Tag](https://github.com/betahuhn/repo-file-sync-action/tree/v1.10.1) · Archive ([zip](https://github.com/betahuhn/repo-file-sync-action/archive/v1.10.1.zip) · [tar.gz](https://github.com/betahuhn/repo-file-sync-action/archive/v1.10.1.tar.gz)) 557 | 558 | ### Dependency updates 559 | 560 | - [`2bad7c1`](https://github.com/betahuhn/repo-file-sync-action/commit/2bad7c1) Bump @vercel/ncc from 0.29.0 to 0.29.1 561 | 562 | ## [v1.10.0] - 2021-08-11 563 | 564 | [Release notes](https://github.com/betahuhn/repo-file-sync-action/releases/tag/v1.10.0) · [Compare](https://github.com/betahuhn/repo-file-sync-action/compare/v1.9.4...v1.10.0) · [Tag](https://github.com/betahuhn/repo-file-sync-action/tree/v1.10.0) · Archive ([zip](https://github.com/betahuhn/repo-file-sync-action/archive/v1.10.0.zip) · [tar.gz](https://github.com/betahuhn/repo-file-sync-action/archive/v1.10.0.tar.gz)) 565 | 566 | ### New features 567 | 568 | - [`d910669`](https://github.com/betahuhn/repo-file-sync-action/commit/d910669) Add PR_BODY option (#80) 569 | (Issues: [`#80`](https://github.com/betahuhn/repo-file-sync-action/issues/80) [`#78`](https://github.com/betahuhn/repo-file-sync-action/issues/78)) 570 | 571 | ### Dependency updates 572 | 573 | - [`ef72279`](https://github.com/betahuhn/repo-file-sync-action/commit/ef72279) Bump action-input-parser from 1.2.11 to 1.2.12 574 | - [`a0ee16b`](https://github.com/betahuhn/repo-file-sync-action/commit/a0ee16b) Upgrade dependencies 575 | 576 | ## [v1.9.4] - 2021-08-09 577 | 578 | [Release notes](https://github.com/betahuhn/repo-file-sync-action/releases/tag/v1.9.4) · [Compare](https://github.com/betahuhn/repo-file-sync-action/compare/v1.9.3...v1.9.4) · [Tag](https://github.com/betahuhn/repo-file-sync-action/tree/v1.9.4) · Archive ([zip](https://github.com/betahuhn/repo-file-sync-action/archive/v1.9.4.zip) · [tar.gz](https://github.com/betahuhn/repo-file-sync-action/archive/v1.9.4.tar.gz)) 579 | 580 | ### Dependency updates 581 | 582 | - [`b848ad5`](https://github.com/betahuhn/repo-file-sync-action/commit/b848ad5) Bump eslint from 7.31.0 to 7.32.0 583 | - [`fe7d8a0`](https://github.com/betahuhn/repo-file-sync-action/commit/fe7d8a0) Bump action-input-parser from 1.2.10 to 1.2.11 584 | 585 | ## [v1.9.3] - 2021-08-02 586 | 587 | [Release notes](https://github.com/betahuhn/repo-file-sync-action/releases/tag/v1.9.3) · [Compare](https://github.com/betahuhn/repo-file-sync-action/compare/v1.9.2...v1.9.3) · [Tag](https://github.com/betahuhn/repo-file-sync-action/tree/v1.9.3) · Archive ([zip](https://github.com/betahuhn/repo-file-sync-action/archive/v1.9.3.zip) · [tar.gz](https://github.com/betahuhn/repo-file-sync-action/archive/v1.9.3.tar.gz)) 588 | 589 | ### Dependency updates 590 | 591 | - [`9e90f1f`](https://github.com/betahuhn/repo-file-sync-action/commit/9e90f1f) Bump action-input-parser from 1.2.9 to 1.2.10 592 | 593 | ## [v1.9.2] - 2021-07-26 594 | 595 | [Release notes](https://github.com/betahuhn/repo-file-sync-action/releases/tag/v1.9.2) · [Compare](https://github.com/betahuhn/repo-file-sync-action/compare/v1.9.1...v1.9.2) · [Tag](https://github.com/betahuhn/repo-file-sync-action/tree/v1.9.2) · Archive ([zip](https://github.com/betahuhn/repo-file-sync-action/archive/v1.9.2.zip) · [tar.gz](https://github.com/betahuhn/repo-file-sync-action/archive/v1.9.2.tar.gz)) 596 | 597 | ### Dependency updates 598 | 599 | - [`334da0b`](https://github.com/betahuhn/repo-file-sync-action/commit/334da0b) Bump action-input-parser from 1.2.8 to 1.2.9 600 | - [`ed856b2`](https://github.com/betahuhn/repo-file-sync-action/commit/ed856b2) Bump eslint from 7.30.0 to 7.31.0 601 | 602 | ## [v1.9.1] - 2021-07-19 603 | 604 | [Release notes](https://github.com/betahuhn/repo-file-sync-action/releases/tag/v1.9.1) · [Compare](https://github.com/betahuhn/repo-file-sync-action/compare/v1.9.0...v1.9.1) · [Tag](https://github.com/betahuhn/repo-file-sync-action/tree/v1.9.1) · Archive ([zip](https://github.com/betahuhn/repo-file-sync-action/archive/v1.9.1.zip) · [tar.gz](https://github.com/betahuhn/repo-file-sync-action/archive/v1.9.1.tar.gz)) 605 | 606 | ### Dependency updates 607 | 608 | - [`1dd7e0a`](https://github.com/betahuhn/repo-file-sync-action/commit/1dd7e0a) Bump @vercel/ncc from 0.28.6 to 0.29.0 609 | 610 | ## [v1.9.0] - 2021-07-14 611 | 612 | [Release notes](https://github.com/betahuhn/repo-file-sync-action/releases/tag/v1.9.0) · [Compare](https://github.com/betahuhn/repo-file-sync-action/compare/v1.8.5...v1.9.0) · [Tag](https://github.com/betahuhn/repo-file-sync-action/tree/v1.9.0) · Archive ([zip](https://github.com/betahuhn/repo-file-sync-action/archive/v1.9.0.zip) · [tar.gz](https://github.com/betahuhn/repo-file-sync-action/archive/v1.9.0.tar.gz)) 613 | 614 | ### New features 615 | 616 | - [`4a9f0ed`](https://github.com/betahuhn/repo-file-sync-action/commit/4a9f0ed) Add deleteOrphaned option to delete files in the target when they are deleted in the source (#69) 617 | (Issues: [`#69`](https://github.com/betahuhn/repo-file-sync-action/issues/69)) 618 | 619 | ### Dependency updates 620 | 621 | - [`1a071eb`](https://github.com/betahuhn/repo-file-sync-action/commit/1a071eb) Bump action-input-parser from 1.2.7 to 1.2.8 622 | 623 | ## [v1.8.5] - 2021-07-12 624 | 625 | [Release notes](https://github.com/betahuhn/repo-file-sync-action/releases/tag/v1.8.5) · [Compare](https://github.com/betahuhn/repo-file-sync-action/compare/v1.8.4...v1.8.5) · [Tag](https://github.com/betahuhn/repo-file-sync-action/tree/v1.8.5) · Archive ([zip](https://github.com/betahuhn/repo-file-sync-action/archive/v1.8.5.zip) · [tar.gz](https://github.com/betahuhn/repo-file-sync-action/archive/v1.8.5.tar.gz)) 626 | 627 | ### Dependency updates 628 | 629 | - [`e62f3bd`](https://github.com/betahuhn/repo-file-sync-action/commit/e62f3bd) Bump action-input-parser from 1.2.6 to 1.2.7 630 | - [`9ecd32e`](https://github.com/betahuhn/repo-file-sync-action/commit/9ecd32e) Bump eslint from 7.29.0 to 7.30.0 631 | 632 | ## [v1.8.4] - 2021-07-05 633 | 634 | [Release notes](https://github.com/betahuhn/repo-file-sync-action/releases/tag/v1.8.4) · [Compare](https://github.com/betahuhn/repo-file-sync-action/compare/v1.8.3...v1.8.4) · [Tag](https://github.com/betahuhn/repo-file-sync-action/tree/v1.8.4) · Archive ([zip](https://github.com/betahuhn/repo-file-sync-action/archive/v1.8.4.zip) · [tar.gz](https://github.com/betahuhn/repo-file-sync-action/archive/v1.8.4.tar.gz)) 635 | 636 | ## [v1.8.3] - 2021-06-28 637 | 638 | [Release notes](https://github.com/betahuhn/repo-file-sync-action/releases/tag/v1.8.3) · [Compare](https://github.com/betahuhn/repo-file-sync-action/compare/v1.8.2...v1.8.3) · [Tag](https://github.com/betahuhn/repo-file-sync-action/tree/v1.8.3) · Archive ([zip](https://github.com/betahuhn/repo-file-sync-action/archive/v1.8.3.zip) · [tar.gz](https://github.com/betahuhn/repo-file-sync-action/archive/v1.8.3.tar.gz)) 639 | 640 | ## [v1.8.2] - 2021-06-21 641 | 642 | [Release notes](https://github.com/betahuhn/repo-file-sync-action/releases/tag/v1.8.2) · [Compare](https://github.com/betahuhn/repo-file-sync-action/compare/v1.8.1...v1.8.2) · [Tag](https://github.com/betahuhn/repo-file-sync-action/tree/v1.8.2) · Archive ([zip](https://github.com/betahuhn/repo-file-sync-action/archive/v1.8.2.zip) · [tar.gz](https://github.com/betahuhn/repo-file-sync-action/archive/v1.8.2.tar.gz)) 643 | 644 | ## [v1.8.1] - 2021-06-11 645 | 646 | [Release notes](https://github.com/betahuhn/repo-file-sync-action/releases/tag/v1.8.1) · [Compare](https://github.com/betahuhn/repo-file-sync-action/compare/v1.8.0...v1.8.1) · [Tag](https://github.com/betahuhn/repo-file-sync-action/tree/v1.8.1) · Archive ([zip](https://github.com/betahuhn/repo-file-sync-action/archive/v1.8.1.zip) · [tar.gz](https://github.com/betahuhn/repo-file-sync-action/archive/v1.8.1.tar.gz)) 647 | 648 | ### Bug fixes 649 | 650 | - [`6e6698c`](https://github.com/betahuhn/repo-file-sync-action/commit/6e6698c) Allow branch name to contain slash (#57) 651 | (Issues: [`#57`](https://github.com/betahuhn/repo-file-sync-action/issues/57)) 652 | 653 | ### Dependency updates 654 | 655 | - [`3f93a28`](https://github.com/betahuhn/repo-file-sync-action/commit/3f93a28) Upgrade dependencies 656 | 657 | ## [v1.8.0] - 2021-06-02 658 | 659 | [Release notes](https://github.com/betahuhn/repo-file-sync-action/releases/tag/v1.8.0) · [Compare](https://github.com/betahuhn/repo-file-sync-action/compare/v1.7.1...v1.8.0) · [Tag](https://github.com/betahuhn/repo-file-sync-action/tree/v1.8.0) · Archive ([zip](https://github.com/betahuhn/repo-file-sync-action/archive/v1.8.0.zip) · [tar.gz](https://github.com/betahuhn/repo-file-sync-action/archive/v1.8.0.tar.gz)) 660 | 661 | ### New features 662 | 663 | - [`2e2ce4d`](https://github.com/betahuhn/repo-file-sync-action/commit/2e2ce4d) Allow same repository with different branches (#52) 664 | (Issues: [`#52`](https://github.com/betahuhn/repo-file-sync-action/issues/52)) 665 | 666 | ### Dependency updates 667 | 668 | - [`75e0b78`](https://github.com/betahuhn/repo-file-sync-action/commit/75e0b78) Update dependencies 669 | 670 | ## [v1.7.1] - 2021-05-31 671 | 672 | [Release notes](https://github.com/betahuhn/repo-file-sync-action/releases/tag/v1.7.1) · [Compare](https://github.com/betahuhn/repo-file-sync-action/compare/v1.7.0...v1.7.1) · [Tag](https://github.com/betahuhn/repo-file-sync-action/tree/v1.7.1) · Archive ([zip](https://github.com/betahuhn/repo-file-sync-action/archive/v1.7.1.zip) · [tar.gz](https://github.com/betahuhn/repo-file-sync-action/archive/v1.7.1.tar.gz)) 673 | 674 | ### Updates 675 | 676 | - [`cee8520`](https://github.com/betahuhn/repo-file-sync-action/commit/cee8520) Throttle requests when hitting rate limit, fixes #49 677 | (Issues: [`#49`](https://github.com/betahuhn/repo-file-sync-action/issues/49))- [`ec2d589`](https://github.com/betahuhn/repo-file-sync-action/commit/ec2d589) Combine GitHub and Git into one class 678 | 679 | ### Bug fixes 680 | 681 | - [`04ec06a`](https://github.com/betahuhn/repo-file-sync-action/commit/04ec06a) Return rest api from octokit 682 | 683 | ### Dependency updates 684 | 685 | - [`060be53`](https://github.com/betahuhn/repo-file-sync-action/commit/060be53) Update dependencies 686 | - [`228eceb`](https://github.com/betahuhn/repo-file-sync-action/commit/228eceb) Use latest @actions/github version 687 | 688 | ## [v1.7.0] - 2021-05-21 689 | 690 | [Release notes](https://github.com/betahuhn/repo-file-sync-action/releases/tag/v1.7.0) · [Compare](https://github.com/betahuhn/repo-file-sync-action/compare/v1.6.0...v1.7.0) · [Tag](https://github.com/betahuhn/repo-file-sync-action/tree/v1.7.0) · Archive ([zip](https://github.com/betahuhn/repo-file-sync-action/archive/v1.7.0.zip) · [tar.gz](https://github.com/betahuhn/repo-file-sync-action/archive/v1.7.0.tar.gz)) 691 | 692 | ### New features 693 | 694 | - [`6f08f7d`](https://github.com/betahuhn/repo-file-sync-action/commit/6f08f7d) Add COMMIT_BODY option (#44) 695 | (Issues: [`#44`](https://github.com/betahuhn/repo-file-sync-action/issues/44)) 696 | 697 | ## [v1.6.0] - 2021-05-05 698 | 699 | [Release notes](https://github.com/betahuhn/repo-file-sync-action/releases/tag/v1.6.0) · [Compare](https://github.com/betahuhn/repo-file-sync-action/compare/v1.5.1...v1.6.0) · [Tag](https://github.com/betahuhn/repo-file-sync-action/tree/v1.6.0) · Archive ([zip](https://github.com/betahuhn/repo-file-sync-action/archive/v1.6.0.zip) · [tar.gz](https://github.com/betahuhn/repo-file-sync-action/archive/v1.6.0.tar.gz)) 700 | 701 | ### New features 702 | 703 | - [`de55684`](https://github.com/betahuhn/repo-file-sync-action/commit/de55684) Add branch prefix option #32 704 | (Issues: [`#32`](https://github.com/betahuhn/repo-file-sync-action/issues/32)) 705 | 706 | ### Updates 707 | 708 | - [`b3d8a1e`](https://github.com/betahuhn/repo-file-sync-action/commit/b3d8a1e) Use external library for input parsing 709 | 710 | ### Dependency updates 711 | 712 | - [`4831ccc`](https://github.com/betahuhn/repo-file-sync-action/commit/4831ccc) Update dependencies 713 | 714 | ## [v1.5.1] - 2021-05-03 715 | 716 | [Release notes](https://github.com/betahuhn/repo-file-sync-action/releases/tag/v1.5.1) · [Compare](https://github.com/betahuhn/repo-file-sync-action/compare/v1.5.0...v1.5.1) · [Tag](https://github.com/betahuhn/repo-file-sync-action/tree/v1.5.1) · Archive ([zip](https://github.com/betahuhn/repo-file-sync-action/archive/v1.5.1.zip) · [tar.gz](https://github.com/betahuhn/repo-file-sync-action/archive/v1.5.1.tar.gz)) 717 | 718 | ### Dependency updates 719 | 720 | - [`000bf45`](https://github.com/betahuhn/repo-file-sync-action/commit/000bf45) Bump eslint from 7.24.0 to 7.25.0 (#29) 721 | (Issues: [`#29`](https://github.com/betahuhn/repo-file-sync-action/issues/29)) 722 | 723 | ## [v1.5.0] - 2021-04-19 724 | 725 | [Release notes](https://github.com/betahuhn/repo-file-sync-action/releases/tag/v1.5.0) · [Compare](https://github.com/betahuhn/repo-file-sync-action/compare/v1.4.0...v1.5.0) · [Tag](https://github.com/betahuhn/repo-file-sync-action/tree/v1.5.0) · Archive ([zip](https://github.com/betahuhn/repo-file-sync-action/archive/v1.5.0.zip) · [tar.gz](https://github.com/betahuhn/repo-file-sync-action/archive/v1.5.0.tar.gz)) 726 | 727 | ### New features 728 | 729 | - [`b557527`](https://github.com/betahuhn/repo-file-sync-action/commit/b557527) Add option to exclude certain files when syncing directories #26 730 | (Issues: [`#26`](https://github.com/betahuhn/repo-file-sync-action/issues/26)) 731 | 732 | ### Bug fixes 733 | 734 | - [`9dc51bf`](https://github.com/betahuhn/repo-file-sync-action/commit/9dc51bf) Use fs-extra instead of actions/io #15 735 | (Issues: [`#15`](https://github.com/betahuhn/repo-file-sync-action/issues/15)) 736 | 737 | ### Dependency updates 738 | 739 | - [`bd44655`](https://github.com/betahuhn/repo-file-sync-action/commit/bd44655) Update dependencies 740 | 741 | ## [v1.4.0] - 2021-03-18 742 | 743 | [Release notes](https://github.com/betahuhn/repo-file-sync-action/releases/tag/v1.4.0) · [Compare](https://github.com/betahuhn/repo-file-sync-action/compare/v1.3.1...v1.4.0) · [Tag](https://github.com/betahuhn/repo-file-sync-action/tree/v1.4.0) · Archive ([zip](https://github.com/betahuhn/repo-file-sync-action/archive/v1.4.0.zip) · [tar.gz](https://github.com/betahuhn/repo-file-sync-action/archive/v1.4.0.tar.gz)) 744 | 745 | ### New features 746 | 747 | - [`d359236`](https://github.com/betahuhn/repo-file-sync-action/commit/d359236) Add skip PR option #14 748 | (Issues: [`#14`](https://github.com/betahuhn/repo-file-sync-action/issues/14)) 749 | 750 | ### Dependency updates 751 | 752 | - [`4c44045`](https://github.com/betahuhn/repo-file-sync-action/commit/4c44045) Bump eslint from 7.21.0 to 7.22.0 (#12) 753 | (Issues: [`#12`](https://github.com/betahuhn/repo-file-sync-action/issues/12)) 754 | 755 | ## [v1.3.1] - 2021-03-15 756 | 757 | [Release notes](https://github.com/betahuhn/repo-file-sync-action/releases/tag/v1.3.1) · [Compare](https://github.com/betahuhn/repo-file-sync-action/compare/v1.3.0...v1.3.1) · [Tag](https://github.com/betahuhn/repo-file-sync-action/tree/v1.3.1) · Archive ([zip](https://github.com/betahuhn/repo-file-sync-action/archive/v1.3.1.zip) · [tar.gz](https://github.com/betahuhn/repo-file-sync-action/archive/v1.3.1.tar.gz)) 758 | 759 | ## [v1.3.0] - 2021-03-08 760 | 761 | [Release notes](https://github.com/betahuhn/repo-file-sync-action/releases/tag/v1.3.0) · [Compare](https://github.com/betahuhn/repo-file-sync-action/compare/v1.2.0...v1.3.0) · [Tag](https://github.com/betahuhn/repo-file-sync-action/tree/v1.3.0) · Archive ([zip](https://github.com/betahuhn/repo-file-sync-action/archive/v1.3.0.zip) · [tar.gz](https://github.com/betahuhn/repo-file-sync-action/archive/v1.3.0.tar.gz)) 762 | 763 | [repo-file-sync-action](https://github.com/betahuhn/repo-file-sync-action) will now check if there's an existing sync PR on the target repository and overwrite it with the new changes. This behavior can be turned of with the `OVERWRITE_EXISTING_PR` option. 764 | 765 | ### New features 766 | 767 | - [`2a4e127`](https://github.com/betahuhn/repo-file-sync-action/commit/2a4e127) Check for and overwrite existing PR 768 | 769 | ### Updates 770 | 771 | - [`5e590a1`](https://github.com/betahuhn/repo-file-sync-action/commit/5e590a1) Improve code structure/readability 772 | - [`1e8745f`](https://github.com/betahuhn/repo-file-sync-action/commit/1e8745f) Move exec function to helpers 773 | 774 | ### Bug fixes 775 | 776 | - [`d7fe133`](https://github.com/betahuhn/repo-file-sync-action/commit/d7fe133) Parse boolean action input as actual boolean 777 | 778 | ## [v1.2.0] - 2021-03-03 779 | 780 | [Release notes](https://github.com/betahuhn/repo-file-sync-action/releases/tag/v1.2.0) · [Compare](https://github.com/betahuhn/repo-file-sync-action/compare/v1.1.1...v1.2.0) · [Tag](https://github.com/betahuhn/repo-file-sync-action/tree/v1.2.0) · Archive ([zip](https://github.com/betahuhn/repo-file-sync-action/archive/v1.2.0.zip) · [tar.gz](https://github.com/betahuhn/repo-file-sync-action/archive/v1.2.0.tar.gz)) 781 | 782 | ### New features 783 | 784 | - [`18215cb`](https://github.com/betahuhn/repo-file-sync-action/commit/18215cb) Support custom GitHub Enterprise Host [#8](https://github.com/BetaHuhn/repo-file-sync-action/discussions/8) 785 | 786 | ## [v1.1.1] - 2021-01-18 787 | 788 | [Release notes](https://github.com/betahuhn/repo-file-sync-action/releases/tag/v1.1.1) · [Compare](https://github.com/betahuhn/repo-file-sync-action/compare/v1.1.0...v1.1.1) · [Tag](https://github.com/betahuhn/repo-file-sync-action/tree/v1.1.1) · Archive ([zip](https://github.com/betahuhn/repo-file-sync-action/archive/v1.1.1.zip) · [tar.gz](https://github.com/betahuhn/repo-file-sync-action/archive/v1.1.1.tar.gz)) 789 | 790 | ## [v1.1.0] - 2021-01-10 791 | 792 | [Release notes](https://github.com/betahuhn/repo-file-sync-action/releases/tag/v1.1.0) · [Compare](https://github.com/betahuhn/repo-file-sync-action/compare/v1.0.1...v1.1.0) · [Tag](https://github.com/betahuhn/repo-file-sync-action/tree/v1.1.0) · Archive ([zip](https://github.com/betahuhn/repo-file-sync-action/archive/v1.1.0.zip) · [tar.gz](https://github.com/betahuhn/repo-file-sync-action/archive/v1.1.0.tar.gz)) 793 | 794 | ### New features 795 | 796 | - [`35e1508`](https://github.com/betahuhn/repo-file-sync-action/commit/35e1508) Cleanup tmp directories 797 | 798 | ### Bug fixes 799 | 800 | - [`b7e5310`](https://github.com/betahuhn/repo-file-sync-action/commit/b7e5310) Fix parsing of boolean config options [skip-ci] 801 | 802 | ## [v1.0.1] - 2021-01-09 803 | 804 | [Release notes](https://github.com/betahuhn/repo-file-sync-action/releases/tag/v1.0.1) · [Compare](https://github.com/betahuhn/repo-file-sync-action/compare/v1.0.0...v1.0.1) · [Tag](https://github.com/betahuhn/repo-file-sync-action/tree/v1.0.1) · Archive ([zip](https://github.com/betahuhn/repo-file-sync-action/archive/v1.0.1.zip) · [tar.gz](https://github.com/betahuhn/repo-file-sync-action/archive/v1.0.1.tar.gz)) 805 | 806 | ### Bug fixes 807 | 808 | - [`40b7915`](https://github.com/betahuhn/repo-file-sync-action/commit/40b7915) Fix parsing of multiple groups 809 | 810 | ## [v1.0.0] - 2021-01-09 811 | 812 | [Release notes](https://github.com/betahuhn/repo-file-sync-action/releases/tag/v1.0.0) · [Tag](https://github.com/betahuhn/repo-file-sync-action/tree/v1.0.0) · Archive ([zip](https://github.com/betahuhn/repo-file-sync-action/archive/v1.0.0.zip) · [tar.gz](https://github.com/betahuhn/repo-file-sync-action/archive/v1.0.0.tar.gz)) 813 | 814 | ### New features 815 | 816 | - [`a863fe8`](https://github.com/betahuhn/repo-file-sync-action/commit/a863fe8) Add support for directories [skip ci] 817 | 818 | ### Updates 819 | 820 | - [`c4c6e88`](https://github.com/betahuhn/repo-file-sync-action/commit/c4c6e88) Remove pattern option [skip ci] 821 | - [`22cc9e5`](https://github.com/betahuhn/repo-file-sync-action/commit/22cc9e5) Remove delete option [skip ci] 822 | 823 | ### Bug fixes 824 | 825 | - [`bb0c4aa`](https://github.com/betahuhn/repo-file-sync-action/commit/bb0c4aa) Use Node v12 [skip ci] 826 | - [`1266e84`](https://github.com/betahuhn/repo-file-sync-action/commit/1266e84) Use run_id instead of run_number [skip ci] 827 | 828 | ### Breaking changes 829 | 830 | - [`75a118d`](https://github.com/betahuhn/repo-file-sync-action/commit/75a118d) First release 831 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 Maximilian Schiller 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |
2 | 3 | # Repo File Sync Action 4 | 5 | [![Build CI](https://github.com/BetaHuhn/repo-file-sync-action/workflows/Test%20CI/badge.svg)](https://github.com/BetaHuhn/repo-file-sync-action/actions?query=workflow%3A%22Test+CI%22) [![GitHub](https://img.shields.io/github/license/mashape/apistatus.svg)](https://github.com/BetaHuhn/repo-file-sync-action/blob/master/LICENSE) ![David](https://img.shields.io/david/betahuhn/repo-file-sync-action) 6 | 7 | Keep files like Action workflows or entire directories in sync between multiple repositories. 8 | 9 |
10 | 11 | ## 👋 Introduction 12 | 13 | With [repo-file-sync-action](https://github.com/BetaHuhn/repo-file-sync-action) you can sync files, like workflow `.yml` files, configuration files or whole directories between repositories or branches. It works by running a GitHub Action in your main repository everytime you push something to that repo. The action will use a `sync.yml` config file to figure out which files it should sync where. If it finds a file which is out of sync it will open a pull request in the target repository with the changes. 14 | 15 | ## 🚀 Features 16 | 17 | - Keep GitHub Actions workflow files in sync across all your repositories 18 | - Sync any file or a whole directory to as many repositories as you want 19 | - Easy configuration for any use case 20 | - Create a pull request in the target repo so you have the last say on what gets merged 21 | - Automatically label pull requests to integrate with other actions like [automerge-action](https://github.com/pascalgn/automerge-action) 22 | - Assign users to the pull request 23 | - Render [Jinja](https://jinja.palletsprojects.com/)-style templates as use variables thanks to [Nunjucks](https://mozilla.github.io/nunjucks/) 24 | 25 | ## 📚 Usage 26 | 27 | 28 | ### Workflow 29 | 30 | Create a `.yml` file in your `.github/workflows` folder (you can find more info about the structure in the [GitHub Docs](https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-syntax-for-github-actions)): 31 | 32 | **.github/workflows/sync.yml** 33 | 34 | ```yml 35 | name: Sync Files 36 | on: 37 | push: 38 | branches: 39 | - main 40 | - master 41 | workflow_dispatch: 42 | jobs: 43 | sync: 44 | runs-on: ubuntu-latest 45 | steps: 46 | - name: Checkout Repository 47 | uses: actions/checkout@main 48 | - name: Run GitHub File Sync 49 | uses: BetaHuhn/repo-file-sync-action@v1 50 | with: 51 | GH_PAT: ${{ secrets.GH_PAT }} 52 | ``` 53 | 54 | #### Token 55 | 56 | In order for the Action to access your repositories you have to specify a [Personal Access token](https://docs.github.com/en/free-pro-team@latest/github/authenticating-to-github/creating-a-personal-access-token) as the value for `GH_PAT` (`GITHUB_TOKEN` will **not** work). The PAT needs the full repo scope ([#31](https://github.com/BetaHuhn/repo-file-sync-action/discussions/31#discussioncomment-674804)). 57 | 58 | It is recommended to set the token as a 59 | [Repository Secret](https://docs.github.com/en/free-pro-team@latest/actions/reference/encrypted-secrets#creating-encrypted-secrets-for-a-repository). 60 | 61 | Alternatively, you can provide the token of a GitHub App Installation via the `GH_INSTALLATION_TOKEN` input. You can obtain such token for example via [this](https://github.com/marketplace/actions/github-app-token) action. Tokens from apps have the advantage that they provide more granular access control. 62 | 63 | The app needs to be configured for each repo you want to sync to, and have the `Contents` read & write and `Metadata` read-only permission. If you want to use PRs (default setting) you additionally need `Pull requests` read & write access, and to sync workflow files you need `Workflows` read & write access. 64 | 65 | If using an installation token you are required to provide the `GIT_EMAIL` and `GIT_USERNAME` input. 66 | 67 | ### Sync configuration 68 | 69 | The last step is to create a `.yml` file in the `.github` folder of your repository and specify what file(s) to sync to which repositories: 70 | 71 | **.github/sync.yml** 72 | 73 | ```yml 74 | user/repository: 75 | - .github/workflows/test.yml 76 | - .github/workflows/lint.yml 77 | 78 | user/repository2: 79 | - source: workflows/stale.yml 80 | dest: .github/workflows/stale.yml 81 | ``` 82 | 83 | More info on how to specify what files to sync where [below](#%EF%B8%8F-sync-configuration). 84 | 85 | ### Versioning 86 | 87 | To always use the latest version of the action add the `latest` tag to the action name like this: 88 | 89 | ```yml 90 | uses: BetaHuhn/repo-file-sync-action@latest 91 | ``` 92 | 93 | If you want to make sure that your workflow doesn't suddenly break when a new major version is released, use the `v1` tag instead (recommended usage): 94 | 95 | ```yml 96 | uses: BetaHuhn/repo-file-sync-action@v1 97 | ``` 98 | 99 | With the `v1` tag you will always get the latest non-breaking version which will include potential bug fixes in the future. If you use a specific version, make sure to regularly check if a new version is available, or enable Dependabot. 100 | 101 | ## ⚙️ Action Inputs 102 | 103 | Here are all the inputs [repo-file-sync-action](https://github.com/BetaHuhn/repo-file-sync-action) takes: 104 | 105 | | Key | Value | Required | Default | 106 | | ------------- | ------------- | ------------- | ------------- | 107 | | `GH_PAT` | Your [Personal Access token](https://docs.github.com/en/free-pro-team@latest/github/authenticating-to-github/creating-a-personal-access-token) | **`GH_PAT` or `GH_INSTALLATION_TOKEN` required** | N/A | 108 | | `GH_INSTALLATION_TOKEN` | Token from a GitHub App installation | **`GH_PAT` or `GH_INSTALLATION_TOKEN` required** | N/A | 109 | | `CONFIG_PATH` | Path to the sync configuration file | **No** | .github/sync.yml | 110 | | `IS_FINE_GRAINED` | Labels the GH_PAT as a fine grained token | **No** | false | 111 | | `PR_LABELS` | Labels which will be added to the pull request. Set to false to turn off | **No** | sync | 112 | | `ASSIGNEES` | Users to assign to the pull request | **No** | N/A | 113 | | `REVIEWERS` | Users to request a review of the pull request from | **No** | N/A | 114 | | `TEAM_REVIEWERS` | Teams to request a review of the pull request from | **No** | N/A | 115 | | `COMMIT_PREFIX` | Prefix for commit message and pull request title | **No** | 🔄 | 116 | | `COMMIT_BODY` | Commit message body. Will be appended to commit message, separated by two line returns. | **No** | '' | 117 | | `PR_BODY` | Additional content to add in the PR description. | **No** | '' | 118 | | `ORIGINAL_MESSAGE` | Use original commit message instead. Only works if the file(s) were changed and the action was triggered by pushing a single commit. | **No** | false | 119 | | `COMMIT_AS_PR_TITLE` | Use first line of the commit message as PR title. Only works if `ORIGINAL_MESSAGE` is `true` and working. | **No** | false | 120 | | `COMMIT_EACH_FILE` | Commit each file seperately | **No** | true | 121 | | `GIT_EMAIL` | The e-mail address used to commit the synced files | **Only when using installation token** | the email of the PAT used | 122 | | `GIT_USERNAME` | The username used to commit the synced files | **Only when using installation token** | the username of the PAT used | 123 | | `OVERWRITE_EXISTING_PR` | Overwrite any existing Sync PR with the new changes | **No** | true | 124 | | `BRANCH_PREFIX` | Specify a different prefix for the new branch in the target repo | **No** | repo-sync/SOURCE_REPO_NAME | 125 | | `TMP_DIR` | The working directory where all git operations will be done | **No** | tmp-${ Date.now().toString() } | 126 | | `DRY_RUN` | Run everything except that nothing will be pushed | **No** | false | 127 | | `SKIP_CLEANUP` | Skips removing the temporary directory. Useful for debugging | **No** | false | 128 | | `SKIP_PR` | Skips creating a Pull Request and pushes directly to the default branch | **No** | false | 129 | | `FORK` | A Github account username. Changes will be pushed to a fork of target repos on this account. | **No** | false | 130 | 131 | ### Outputs 132 | 133 | 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", "..."]'`. 134 | 135 | ## 🛠️ Sync Configuration 136 | 137 | In order to tell [repo-file-sync-action](https://github.com/BetaHuhn/repo-file-sync-action) what files to sync where, you have to create a `sync.yml` file in the `.github` directory of your main repository (see [action-inputs](#%EF%B8%8F-action-inputs) on how to change the location). 138 | 139 | The top-level key should be used to specify the target repository in the format `username`/`repository-name`@`branch`, after that you can list all the files you want to sync to that individual repository: 140 | 141 | ```yml 142 | user/repo: 143 | - path/to/file.txt 144 | user/repo2@develop: 145 | - path/to/file2.txt 146 | ``` 147 | 148 | There are multiple ways to specify which files to sync to each individual repository. 149 | 150 | ### List individual file(s) 151 | 152 | The easiest way to sync files is the list them on a new line for each repository: 153 | 154 | ```yml 155 | user/repo: 156 | - .github/workflows/build.yml 157 | - LICENSE 158 | - .gitignore 159 | ``` 160 | 161 | ### Different destination path/filename(s) 162 | 163 | Using the `dest` option you can specify a destination path in the target repo and/or change the filename for each source file: 164 | 165 | ```yml 166 | user/repo: 167 | - source: workflows/build.yml 168 | dest: .github/workflows/build.yml 169 | - source: LICENSE.md 170 | dest: LICENSE 171 | ``` 172 | 173 | ### Sync entire directories 174 | 175 | You can also specify entire directories to sync: 176 | 177 | ```yml 178 | user/repo: 179 | - source: workflows/ 180 | dest: .github/workflows/ 181 | ``` 182 | 183 | ### Exclude certain files when syncing directories 184 | 185 | Using the `exclude` key you can specify files you want to exclude when syncing entire directories (#26). 186 | 187 | ```yml 188 | user/repo: 189 | - source: workflows/ 190 | dest: .github/workflows/ 191 | exclude: | 192 | node.yml 193 | lint.yml 194 | ``` 195 | 196 | > **Note:** the exclude file path is relative to the source path 197 | 198 | ### Don't replace existing file(s) 199 | 200 | By default if a file already exists in the target repository, it will be replaced. You can change this behaviour by setting the `replace` option to `false`: 201 | 202 | ```yml 203 | user/repo: 204 | - source: .github/workflows/lint.yml 205 | replace: false 206 | ``` 207 | 208 | ### Using templates 209 | 210 | You can render templates before syncing by using the [Jinja](https://jinja.palletsprojects.com/)-style template syntax. It will be compiled using [Nunjucks](https://mozilla.github.io/nunjucks/) and the output written to the specific file(s) or folder(s). 211 | 212 | Nunjucks supports variables and blocks among other things. To enable, set the `template` field to a context dictionary, or in case of no variables, `true`: 213 | 214 | ```yml 215 | user/repo: 216 | - source: src/README.md 217 | template: 218 | user: 219 | name: 'Maxi' 220 | handle: '@BetaHuhn' 221 | ``` 222 | 223 | In the source file you can then use these variables like this: 224 | 225 | ```yml 226 | # README.md 227 | 228 | Created by {{ user.name }} ({{ user.handle }}) 229 | ``` 230 | 231 | Result: 232 | 233 | ```yml 234 | # README.md 235 | 236 | Created by Maxi (@BetaHuhn) 237 | ``` 238 | 239 | You can also use `extends` with a relative path to inherit other templates. Take a look at Nunjucks [template syntax](https://mozilla.github.io/nunjucks/templating.html) for more info. 240 | 241 | ```yml 242 | user/repo: 243 | - source: .github/workflows/child.yml 244 | template: true 245 | ``` 246 | 247 | ```yml 248 | # child.yml 249 | {% extends './parent.yml' %} 250 | 251 | {% block some_block %} 252 | This is some content 253 | {% endblock %} 254 | ``` 255 | 256 | ### Delete orphaned files 257 | 258 | With the `deleteOrphaned` option you can choose to delete files in the target repository if they are deleted in the source repository. The option defaults to `false` and only works when [syncing entire directories](#sync-entire-directories): 259 | 260 | ```yml 261 | user/repo: 262 | - source: workflows/ 263 | dest: .github/workflows/ 264 | deleteOrphaned: true 265 | ``` 266 | 267 | It only takes effect on that specific directory. 268 | 269 | ### Sync the same files to multiple repositories 270 | 271 | Instead of repeating yourself listing the same files for multiple repositories, you can create a group: 272 | 273 | ```yml 274 | group: 275 | repos: | 276 | user/repo 277 | user/repo1 278 | files: 279 | - source: workflows/build.yml 280 | dest: .github/workflows/build.yml 281 | - source: LICENSE.md 282 | dest: LICENSE 283 | ``` 284 | 285 | You can create multiple groups like this: 286 | 287 | ```yml 288 | group: 289 | # first group 290 | - files: 291 | - source: workflows/build.yml 292 | dest: .github/workflows/build.yml 293 | - source: LICENSE.md 294 | dest: LICENSE 295 | repos: | 296 | user/repo1 297 | user/repo2 298 | 299 | # second group 300 | - files: 301 | - source: configs/dependabot.yml 302 | dest: .github/dependabot.yml 303 | repos: | 304 | user/repo3 305 | user/repo4 306 | ``` 307 | 308 | ### Syncing branches 309 | 310 | You can also sync different branches from the same or different repositories (#51). For example, a repository named `foo/bar` with branch `main`, and `sync.yml` contents: 311 | 312 | ```yml 313 | group: 314 | repos: | 315 | foo/bar@de 316 | foo/bar@es 317 | foo/bar@fr 318 | files: 319 | - source: .github/workflows/ 320 | dest: .github/workflows/ 321 | ``` 322 | 323 | Here all files in `.github/workflows/` will be synced from the `main` branch to the branches `de`/`es`/`fr`. 324 | 325 | ## 📖 Examples 326 | 327 | Here are a few examples to help you get started! 328 | 329 | ### Basic Example 330 | 331 | **.github/sync.yml** 332 | 333 | ```yml 334 | user/repository: 335 | - LICENSE 336 | - .gitignore 337 | ``` 338 | 339 | ### Sync all workflow files 340 | 341 | This example will keep all your `.github/workflows` files in sync across multiple repositories: 342 | 343 | **.github/sync.yml** 344 | 345 | ```yml 346 | group: 347 | repos: | 348 | user/repo1 349 | user/repo2 350 | files: 351 | - source: .github/workflows/ 352 | dest: .github/workflows/ 353 | ``` 354 | 355 | ### Custom labels 356 | 357 | By default [repo-file-sync-action](https://github.com/BetaHuhn/repo-file-sync-action) will add the `sync` label to every PR it creates. You can turn this off by setting `PR_LABELS` to false, or specify your own labels: 358 | 359 | **.github/workflows/sync.yml** 360 | 361 | ```yml 362 | - name: Run GitHub File Sync 363 | uses: BetaHuhn/repo-file-sync-action@v1 364 | with: 365 | GH_PAT: ${{ secrets.GH_PAT }} 366 | PR_LABELS: | 367 | file-sync 368 | automerge 369 | ``` 370 | 371 | ### Assign a user to the PR 372 | 373 | You can tell [repo-file-sync-action](https://github.com/BetaHuhn/repo-file-sync-action) to assign users to the PR with `ASSIGNEES`: 374 | 375 | **.github/workflows/sync.yml** 376 | 377 | ```yml 378 | - name: Run GitHub File Sync 379 | uses: BetaHuhn/repo-file-sync-action@v1 380 | with: 381 | GH_PAT: ${{ secrets.GH_PAT }} 382 | ASSIGNEES: BetaHuhn 383 | ``` 384 | 385 | ### Request a PR review 386 | 387 | You can tell [repo-file-sync-action](https://github.com/BetaHuhn/repo-file-sync-action) to request a review of the PR from users with `REVIEWERS` and from teams with `TEAM_REVIEWERS`: 388 | 389 | **.github/workflows/sync.yml** 390 | 391 | ```yml 392 | - name: Run GitHub File Sync 393 | uses: BetaHuhn/repo-file-sync-action@v1 394 | with: 395 | GH_PAT: ${{ secrets.GH_PAT }} 396 | REVIEWERS: | 397 | BetaHuhn 398 | BetaHuhnBot 399 | TEAM_REVIEWERS: engineering 400 | ``` 401 | 402 | ### Custom GitHub Enterprise Host 403 | 404 | If your target repository is hosted on a GitHub Enterprise Server you can specify a custom host name like this: 405 | 406 | **.github/workflows/sync.yml** 407 | 408 | ```yml 409 | https://custom.host/user/repo: 410 | - path/to/file.txt 411 | 412 | # or in a group 413 | 414 | group: 415 | - files: 416 | - source: path/to/file.txt 417 | dest: path/to/file.txt 418 | repos: | 419 | https://custom.host/user/repo 420 | ``` 421 | 422 | > **Note:** The key has to start with http to indicate that you want to use a custom host. 423 | 424 | ### Different branch prefix 425 | 426 | By default all new branches created in the target repo will be in the this format: `repo-sync/SOURCE_REPO_NAME/SOURCE_BRANCH_NAME`, with the SOURCE_REPO_NAME being replaced with the name of the source repo and SOURCE_BRANCH_NAME with the name of the source branch. 427 | 428 | If your repo name contains invalid characters, like a dot ([#32](https://github.com/BetaHuhn/repo-file-sync-action/issues/32)), you can specify a different prefix for the branch (the text before `/SOURCE_BRANCH_NAME`): 429 | 430 | **.github/workflows/sync.yml** 431 | 432 | ```yml 433 | uses: BetaHuhn/repo-file-sync-action@v1 434 | with: 435 | GH_PAT: ${{ secrets.GH_PAT }} 436 | BRANCH_PREFIX: custom-branch 437 | ``` 438 | 439 | The new branch will then be `custom-branch/SOURCE_BRANCH_NAME`. 440 | 441 | > You can use `SOURCE_REPO_NAME` in your custom branch prefix as well and it will be replaced with the actual repo name 442 | 443 | ### Custom commit body 444 | 445 | You can specify a custom commit body. This will be appended to the commit message, separated by two new lines. For example: 446 | 447 | **.github/workflows/sync.yml** 448 | 449 | ```yml 450 | - name: Run GitHub File Sync 451 | uses: BetaHuhn/repo-file-sync-action@v1 452 | with: 453 | GH_PAT: ${{ secrets.GH_PAT }} 454 | COMMIT_BODY: "Change-type: patch" 455 | ``` 456 | 457 | The above example would result in a commit message that looks something like this: 458 | ``` 459 | 🔄 synced local '' with remote '' 460 | 461 | Change-type: patch 462 | ``` 463 | 464 | ### Add content to the PR body 465 | 466 | You can add more content to the PR body with the `PR_BODY` option. For example: 467 | 468 | **.github/workflows/sync.yml** 469 | 470 | ```yml 471 | - name: Run GitHub File Sync 472 | uses: BetaHuhn/repo-file-sync-action@v1 473 | with: 474 | GH_PAT: ${{ secrets.GH_PAT }} 475 | PR_BODY: This is your custom PR Body 476 | ``` 477 | 478 | It will be added below the first line of the body and above the list of changed files. The above example would result in a PR body that looks something like this: 479 | 480 | ``` 481 | synced local file(s) with GITHUB_REPOSITORY. 482 | 483 | This is your custom PR Body 484 | 485 | ▶ Changed files 486 | 487 | --- 488 | 489 | This PR was created automatically by the repo-file-sync-action workflow run xxx. 490 | ``` 491 | 492 | ### Fork and pull request workflow 493 | 494 | If you do not wish to grant this action write access to target repositories, you can specify a bot/user Github acccount that you do have access to with the `FORK` parameter. 495 | 496 | A fork of each target repository will be created on this account, and all changes will be pushed to a branch on the fork, instead of upstream. Pull requests will be opened from the forks to target repositories. 497 | 498 | Note: while you can open pull requests to target repositories without write access, some features, like applying labels, are not possible. 499 | 500 | ```yml 501 | uses: BetaHuhn/repo-file-sync-action@v1 502 | with: 503 | GH_PAT: ${{ secrets.GH_PAT }} 504 | FORK: file-sync-bot 505 | ``` 506 | 507 | ### Advanced sync config 508 | 509 | Here's how I keep common files in sync across my repositories. The main repository [`github-files`](https://github.com/BetaHuhn/github-files) contains all the files I want to sync and the [repo-file-sync-action](https://github.com/BetaHuhn/repo-file-sync-action) Action which runs on every push. 510 | 511 | Using groups I can specify which file(s) should be synced to which repositories: 512 | 513 | **.github/sync.yml** 514 | 515 | ```yml 516 | group: 517 | # dependabot files 518 | - files: 519 | - source: configs/dependabot.yml 520 | dest: .github/dependabot.yml 521 | - source: workflows/dependencies/dependabot.yml 522 | dest: .github/workflows/dependabot.yml 523 | repos: | 524 | BetaHuhn/do-spaces-action 525 | BetaHuhn/running-at 526 | BetaHuhn/spaces-cli 527 | BetaHuhn/metadata-scraper 528 | BetaHuhn/ejs-serve 529 | BetaHuhn/feedback-js 530 | BetaHuhn/drkmd.js 531 | 532 | # GitHub Sponsors config 533 | - files: 534 | - source: configs/FUNDING.yml 535 | dest: .github/FUNDING.yml 536 | repos: | 537 | BetaHuhn/do-spaces-action 538 | BetaHuhn/running-at 539 | BetaHuhn/spaces-cli 540 | BetaHuhn/qrgen 541 | BetaHuhn/metadata-scraper 542 | BetaHuhn/ejs-serve 543 | BetaHuhn/feedback-js 544 | BetaHuhn/drkmd.js 545 | 546 | # Semantic release 547 | - files: 548 | - source: workflows/versioning/release-scheduler.yml 549 | dest: .github/workflows/release-scheduler.yml 550 | - source: workflows/versioning/release.yml 551 | dest: .github/workflows/release.yml 552 | - source: configs/release.config.js 553 | dest: release.config.js 554 | repos: | 555 | BetaHuhn/do-spaces-action 556 | BetaHuhn/metadata-scraper 557 | BetaHuhn/feedback-js 558 | BetaHuhn/drkmd.js 559 | 560 | # Stale issues workflow 561 | - files: 562 | - source: workflows/issues/stale.yml 563 | dest: .github/workflows/stale.yml 564 | repos: | 565 | BetaHuhn/do-spaces-action 566 | BetaHuhn/running-at 567 | BetaHuhn/spaces-cli 568 | BetaHuhn/qrgen 569 | BetaHuhn/metadata-scraper 570 | BetaHuhn/ejs-serve 571 | BetaHuhn/feedback-js 572 | BetaHuhn/drkmd.js 573 | 574 | # Lint CI workflow 575 | - files: 576 | - source: workflows/node/lint.yml 577 | dest: .github/workflows/lint.yml 578 | repos: | 579 | BetaHuhn/do-spaces-action 580 | BetaHuhn/running-at 581 | BetaHuhn/spaces-cli 582 | BetaHuhn/metadata-scraper 583 | BetaHuhn/ejs-serve 584 | BetaHuhn/feedback-js 585 | BetaHuhn/drkmd.js 586 | 587 | # MIT License 588 | - files: 589 | - source: LICENSE 590 | dest: LICENSE 591 | repos: | 592 | BetaHuhn/do-spaces-action 593 | BetaHuhn/running-at 594 | BetaHuhn/spaces-cli 595 | BetaHuhn/qrgen 596 | BetaHuhn/metadata-scraper 597 | BetaHuhn/ejs-serve 598 | BetaHuhn/feedback-js 599 | BetaHuhn/drkmd.js 600 | ``` 601 | 602 | ## 💻 Development 603 | 604 | Issues and PRs are very welcome! 605 | 606 | The actual source code of this library is in the `src` folder. 607 | 608 | - run `yarn lint` or `npm run lint` to run eslint. 609 | - run `yarn start` or `npm run start` to run the Action locally. 610 | - run `yarn build` or `npm run build` to produce a production version of [repo-file-sync-action](https://github.com/BetaHuhn/repo-file-sync-action) in the `dist` folder. 611 | 612 | ## ❔ About 613 | 614 | This project was developed by me ([@betahuhn](https://github.com/BetaHuhn)) in my free time. If you want to support me: 615 | 616 | [![Donate via PayPal](https://img.shields.io/badge/paypal-donate-009cde.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=394RTSBEEEFEE) 617 | 618 | [![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/F1F81S2RK) 619 | 620 | ### Credits 621 | 622 | This Action was inspired by: 623 | 624 | - [action-github-workflow-sync](https://github.com/varunsridharan/action-github-workflow-sync) 625 | - [files-sync-action](https://github.com/adrianjost/files-sync-action) 626 | 627 | ## 📄 License 628 | 629 | Copyright 2021 Maximilian Schiller 630 | 631 | This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details. 632 | -------------------------------------------------------------------------------- /action.yml: -------------------------------------------------------------------------------- 1 | name: 'Repo File Sync Action' 2 | description: 'GitHub Action to Sync Files like Workflows Between Repositories.' 3 | author: 'BetaHuhn' 4 | 5 | inputs: 6 | GH_PAT: 7 | description: | 8 | GitHub Personal Access Token to use to get repos and write secrets 9 | required: false 10 | GH_INSTALLATION_TOKEN: 11 | description: | 12 | GitHub App Installation Token to used to access repos 13 | required: false 14 | CONFIG_PATH: 15 | description: | 16 | The path for the sync configuration file 17 | required: false 18 | IS_FINE_GRAINED: 19 | description: | 20 | Label GH_PAT as a fine grained token 21 | required: false 22 | PR_LABELS: 23 | description: | 24 | Labels which will be added to the pull request. Defaults to sync. Set to false to turn off 25 | required: false 26 | PR_BODY: 27 | description: | 28 | Additional content to add in the PR description. Defaults to '' 29 | required: false 30 | ASSIGNEES: 31 | description: | 32 | Users to assign to the pull request. Defaults to none 33 | required: false 34 | REVIEWERS: 35 | description: | 36 | Users to request a review of the pull request from. Defaults to none 37 | required: false 38 | TEAM_REVIEWERS: 39 | description: | 40 | Teams to request a review of the pull request from. Defaults to none 41 | required: false 42 | COMMIT_PREFIX: 43 | description: | 44 | Prefix for commit message and pull request title. Defaults to 🔄 45 | required: false 46 | COMMIT_BODY: 47 | description: | 48 | Commit message body. Will be appended to commit message, separated by two line returns. Defaults to '' 49 | required: false 50 | COMMIT_EACH_FILE: 51 | description: | 52 | Commit each file seperately. Defaults to true 53 | required: false 54 | GIT_EMAIL: 55 | description: | 56 | The e-mail address used to commit the synced files. Defaults to the email of the GitHub PAT 57 | required: false 58 | GIT_USERNAME: 59 | description: | 60 | The username used to commit the synced files. Defaults to the username of the GitHub PAT 61 | required: false 62 | TMP_DIR: 63 | description: | 64 | The working directory where all sync operations will be done. Defaults to `tmp-${Date.now().toString()}` 65 | required: false 66 | DRY_RUN: 67 | description: | 68 | Run everything except for nothing will be updated. Defaults to false 69 | required: false 70 | SKIP_CLEANUP: 71 | description: | 72 | Skip removing the temporary directory (useful for debugging). Defaults to false 73 | required: false 74 | OVERWRITE_EXISTING_PR: 75 | description: | 76 | Overwrite any existing Sync PR with the new changes. Defaults to true 77 | required: false 78 | ORIGINAL_MESSAGE: 79 | description: | 80 | Re-use the original commit message for commits. Works only if the action is triggered by pushing one commit. Defaults to false 81 | required: false 82 | COMMIT_AS_PR_TITLE: 83 | description: | 84 | Re-use the commit message as PR title. Works only if ORIGINAL_MESSAGE is on and PR has one commit. Defaults to false 85 | required: false 86 | SKIP_PR: 87 | description: | 88 | Skips creating a Pull Request and pushes directly to the default branch. Defaults to false 89 | required: false 90 | BRANCH_PREFIX: 91 | description: | 92 | Specify a different prefix for the new branch in the target repo. Defaults to repo-sync/SOURCE_REPO_NAME 93 | required: false 94 | FORK: 95 | description: | 96 | Specify the user account that will be used in a fork and pull-request workflow. Defaults 97 | false. 98 | required: false 99 | 100 | outputs: 101 | pull_request_urls: 102 | description: 'The URLs to the created Pull Requests as an array' 103 | 104 | runs: 105 | using: 'node20' 106 | main: 'dist/index.js' 107 | 108 | branding: 109 | icon: 'git-pull-request' 110 | color: 'gray-dark' 111 | -------------------------------------------------------------------------------- /dist/licenses.txt: -------------------------------------------------------------------------------- 1 | @actions/core 2 | MIT 3 | The MIT License (MIT) 4 | 5 | Copyright 2019 GitHub 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 8 | 9 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 10 | 11 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 12 | 13 | @actions/github 14 | MIT 15 | The MIT License (MIT) 16 | 17 | Copyright 2019 GitHub 18 | 19 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 20 | 21 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 22 | 23 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 24 | 25 | @actions/http-client 26 | MIT 27 | Actions Http Client for Node.js 28 | 29 | Copyright (c) GitHub, Inc. 30 | 31 | All rights reserved. 32 | 33 | MIT License 34 | 35 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and 36 | associated documentation files (the "Software"), to deal in the Software without restriction, 37 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, 38 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, 39 | subject to the following conditions: 40 | 41 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 42 | 43 | THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT 44 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN 45 | NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 46 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 47 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 48 | 49 | 50 | @octokit/auth-token 51 | MIT 52 | The MIT License 53 | 54 | Copyright (c) 2019 Octokit contributors 55 | 56 | Permission is hereby granted, free of charge, to any person obtaining a copy 57 | of this software and associated documentation files (the "Software"), to deal 58 | in the Software without restriction, including without limitation the rights 59 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 60 | copies of the Software, and to permit persons to whom the Software is 61 | furnished to do so, subject to the following conditions: 62 | 63 | The above copyright notice and this permission notice shall be included in 64 | all copies or substantial portions of the Software. 65 | 66 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 67 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 68 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 69 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 70 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 71 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 72 | THE SOFTWARE. 73 | 74 | 75 | @octokit/core 76 | MIT 77 | The MIT License 78 | 79 | Copyright (c) 2019 Octokit contributors 80 | 81 | Permission is hereby granted, free of charge, to any person obtaining a copy 82 | of this software and associated documentation files (the "Software"), to deal 83 | in the Software without restriction, including without limitation the rights 84 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 85 | copies of the Software, and to permit persons to whom the Software is 86 | furnished to do so, subject to the following conditions: 87 | 88 | The above copyright notice and this permission notice shall be included in 89 | all copies or substantial portions of the Software. 90 | 91 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 92 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 93 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 94 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 95 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 96 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 97 | THE SOFTWARE. 98 | 99 | 100 | @octokit/endpoint 101 | MIT 102 | The MIT License 103 | 104 | Copyright (c) 2018 Octokit contributors 105 | 106 | Permission is hereby granted, free of charge, to any person obtaining a copy 107 | of this software and associated documentation files (the "Software"), to deal 108 | in the Software without restriction, including without limitation the rights 109 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 110 | copies of the Software, and to permit persons to whom the Software is 111 | furnished to do so, subject to the following conditions: 112 | 113 | The above copyright notice and this permission notice shall be included in 114 | all copies or substantial portions of the Software. 115 | 116 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 117 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 118 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 119 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 120 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 121 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 122 | THE SOFTWARE. 123 | 124 | 125 | @octokit/graphql 126 | MIT 127 | The MIT License 128 | 129 | Copyright (c) 2018 Octokit contributors 130 | 131 | Permission is hereby granted, free of charge, to any person obtaining a copy 132 | of this software and associated documentation files (the "Software"), to deal 133 | in the Software without restriction, including without limitation the rights 134 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 135 | copies of the Software, and to permit persons to whom the Software is 136 | furnished to do so, subject to the following conditions: 137 | 138 | The above copyright notice and this permission notice shall be included in 139 | all copies or substantial portions of the Software. 140 | 141 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 142 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 143 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 144 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 145 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 146 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 147 | THE SOFTWARE. 148 | 149 | 150 | @octokit/plugin-paginate-rest 151 | MIT 152 | MIT License Copyright (c) 2019 Octokit contributors 153 | 154 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 155 | 156 | The above copyright notice and this permission notice (including the next paragraph) shall be included in all copies or substantial portions of the Software. 157 | 158 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 159 | 160 | 161 | @octokit/plugin-rest-endpoint-methods 162 | MIT 163 | MIT License Copyright (c) 2019 Octokit contributors 164 | 165 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 166 | 167 | The above copyright notice and this permission notice (including the next paragraph) shall be included in all copies or substantial portions of the Software. 168 | 169 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 170 | 171 | 172 | @octokit/plugin-throttling 173 | MIT 174 | The MIT License 175 | 176 | Copyright (c) 2018 Octokit contributors 177 | 178 | Permission is hereby granted, free of charge, to any person obtaining a copy 179 | of this software and associated documentation files (the "Software"), to deal 180 | in the Software without restriction, including without limitation the rights 181 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 182 | copies of the Software, and to permit persons to whom the Software is 183 | furnished to do so, subject to the following conditions: 184 | 185 | The above copyright notice and this permission notice shall be included in 186 | all copies or substantial portions of the Software. 187 | 188 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 189 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 190 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 191 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 192 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 193 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 194 | THE SOFTWARE. 195 | 196 | 197 | @octokit/request 198 | MIT 199 | The MIT License 200 | 201 | Copyright (c) 2018 Octokit contributors 202 | 203 | Permission is hereby granted, free of charge, to any person obtaining a copy 204 | of this software and associated documentation files (the "Software"), to deal 205 | in the Software without restriction, including without limitation the rights 206 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 207 | copies of the Software, and to permit persons to whom the Software is 208 | furnished to do so, subject to the following conditions: 209 | 210 | The above copyright notice and this permission notice shall be included in 211 | all copies or substantial portions of the Software. 212 | 213 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 214 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 215 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 216 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 217 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 218 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 219 | THE SOFTWARE. 220 | 221 | 222 | @octokit/request-error 223 | MIT 224 | The MIT License 225 | 226 | Copyright (c) 2019 Octokit contributors 227 | 228 | Permission is hereby granted, free of charge, to any person obtaining a copy 229 | of this software and associated documentation files (the "Software"), to deal 230 | in the Software without restriction, including without limitation the rights 231 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 232 | copies of the Software, and to permit persons to whom the Software is 233 | furnished to do so, subject to the following conditions: 234 | 235 | The above copyright notice and this permission notice shall be included in 236 | all copies or substantial portions of the Software. 237 | 238 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 239 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 240 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 241 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 242 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 243 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 244 | THE SOFTWARE. 245 | 246 | 247 | @putout/git-status-porcelain 248 | MIT 249 | 250 | @vercel/ncc 251 | MIT 252 | Copyright 2018 ZEIT, Inc. 253 | 254 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 255 | 256 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 257 | 258 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 259 | 260 | a-sync-waterfall 261 | MIT 262 | The MIT License (MIT) 263 | 264 | Copyright (c) 2013 Elan Shanker 265 | 266 | Permission is hereby granted, free of charge, to any person obtaining a copy 267 | of this software and associated documentation files (the “Software”), to deal 268 | in the Software without restriction, including without limitation the rights 269 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 270 | copies of the Software, and to permit persons to whom the Software is 271 | furnished to do so, subject to the following conditions: 272 | 273 | The above copyright notice and this permission notice shall be included in 274 | all copies or substantial portions of the Software. 275 | 276 | THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 277 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 278 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 279 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 280 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 281 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 282 | THE SOFTWARE. 283 | 284 | 285 | action-input-parser 286 | MIT 287 | MIT License 288 | 289 | Copyright (c) 2021 Maximilian Schiller 290 | 291 | Permission is hereby granted, free of charge, to any person obtaining a copy 292 | of this software and associated documentation files (the "Software"), to deal 293 | in the Software without restriction, including without limitation the rights 294 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 295 | copies of the Software, and to permit persons to whom the Software is 296 | furnished to do so, subject to the following conditions: 297 | 298 | The above copyright notice and this permission notice shall be included in all 299 | copies or substantial portions of the Software. 300 | 301 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 302 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 303 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 304 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 305 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 306 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 307 | SOFTWARE. 308 | 309 | 310 | asap 311 | MIT 312 | 313 | Copyright 2009–2014 Contributors. All rights reserved. 314 | 315 | Permission is hereby granted, free of charge, to any person obtaining a copy 316 | of this software and associated documentation files (the "Software"), to 317 | deal in the Software without restriction, including without limitation the 318 | rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 319 | sell copies of the Software, and to permit persons to whom the Software is 320 | furnished to do so, subject to the following conditions: 321 | 322 | The above copyright notice and this permission notice shall be included in 323 | all copies or substantial portions of the Software. 324 | 325 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 326 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 327 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 328 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 329 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 330 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 331 | IN THE SOFTWARE. 332 | 333 | 334 | 335 | before-after-hook 336 | Apache-2.0 337 | Apache License 338 | Version 2.0, January 2004 339 | http://www.apache.org/licenses/ 340 | 341 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 342 | 343 | 1. Definitions. 344 | 345 | "License" shall mean the terms and conditions for use, reproduction, 346 | and distribution as defined by Sections 1 through 9 of this document. 347 | 348 | "Licensor" shall mean the copyright owner or entity authorized by 349 | the copyright owner that is granting the License. 350 | 351 | "Legal Entity" shall mean the union of the acting entity and all 352 | other entities that control, are controlled by, or are under common 353 | control with that entity. For the purposes of this definition, 354 | "control" means (i) the power, direct or indirect, to cause the 355 | direction or management of such entity, whether by contract or 356 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 357 | outstanding shares, or (iii) beneficial ownership of such entity. 358 | 359 | "You" (or "Your") shall mean an individual or Legal Entity 360 | exercising permissions granted by this License. 361 | 362 | "Source" form shall mean the preferred form for making modifications, 363 | including but not limited to software source code, documentation 364 | source, and configuration files. 365 | 366 | "Object" form shall mean any form resulting from mechanical 367 | transformation or translation of a Source form, including but 368 | not limited to compiled object code, generated documentation, 369 | and conversions to other media types. 370 | 371 | "Work" shall mean the work of authorship, whether in Source or 372 | Object form, made available under the License, as indicated by a 373 | copyright notice that is included in or attached to the work 374 | (an example is provided in the Appendix below). 375 | 376 | "Derivative Works" shall mean any work, whether in Source or Object 377 | form, that is based on (or derived from) the Work and for which the 378 | editorial revisions, annotations, elaborations, or other modifications 379 | represent, as a whole, an original work of authorship. For the purposes 380 | of this License, Derivative Works shall not include works that remain 381 | separable from, or merely link (or bind by name) to the interfaces of, 382 | the Work and Derivative Works thereof. 383 | 384 | "Contribution" shall mean any work of authorship, including 385 | the original version of the Work and any modifications or additions 386 | to that Work or Derivative Works thereof, that is intentionally 387 | submitted to Licensor for inclusion in the Work by the copyright owner 388 | or by an individual or Legal Entity authorized to submit on behalf of 389 | the copyright owner. For the purposes of this definition, "submitted" 390 | means any form of electronic, verbal, or written communication sent 391 | to the Licensor or its representatives, including but not limited to 392 | communication on electronic mailing lists, source code control systems, 393 | and issue tracking systems that are managed by, or on behalf of, the 394 | Licensor for the purpose of discussing and improving the Work, but 395 | excluding communication that is conspicuously marked or otherwise 396 | designated in writing by the copyright owner as "Not a Contribution." 397 | 398 | "Contributor" shall mean Licensor and any individual or Legal Entity 399 | on behalf of whom a Contribution has been received by Licensor and 400 | subsequently incorporated within the Work. 401 | 402 | 2. Grant of Copyright License. Subject to the terms and conditions of 403 | this License, each Contributor hereby grants to You a perpetual, 404 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 405 | copyright license to reproduce, prepare Derivative Works of, 406 | publicly display, publicly perform, sublicense, and distribute the 407 | Work and such Derivative Works in Source or Object form. 408 | 409 | 3. Grant of Patent License. Subject to the terms and conditions of 410 | this License, each Contributor hereby grants to You a perpetual, 411 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 412 | (except as stated in this section) patent license to make, have made, 413 | use, offer to sell, sell, import, and otherwise transfer the Work, 414 | where such license applies only to those patent claims licensable 415 | by such Contributor that are necessarily infringed by their 416 | Contribution(s) alone or by combination of their Contribution(s) 417 | with the Work to which such Contribution(s) was submitted. If You 418 | institute patent litigation against any entity (including a 419 | cross-claim or counterclaim in a lawsuit) alleging that the Work 420 | or a Contribution incorporated within the Work constitutes direct 421 | or contributory patent infringement, then any patent licenses 422 | granted to You under this License for that Work shall terminate 423 | as of the date such litigation is filed. 424 | 425 | 4. Redistribution. You may reproduce and distribute copies of the 426 | Work or Derivative Works thereof in any medium, with or without 427 | modifications, and in Source or Object form, provided that You 428 | meet the following conditions: 429 | 430 | (a) You must give any other recipients of the Work or 431 | Derivative Works a copy of this License; and 432 | 433 | (b) You must cause any modified files to carry prominent notices 434 | stating that You changed the files; and 435 | 436 | (c) You must retain, in the Source form of any Derivative Works 437 | that You distribute, all copyright, patent, trademark, and 438 | attribution notices from the Source form of the Work, 439 | excluding those notices that do not pertain to any part of 440 | the Derivative Works; and 441 | 442 | (d) If the Work includes a "NOTICE" text file as part of its 443 | distribution, then any Derivative Works that You distribute must 444 | include a readable copy of the attribution notices contained 445 | within such NOTICE file, excluding those notices that do not 446 | pertain to any part of the Derivative Works, in at least one 447 | of the following places: within a NOTICE text file distributed 448 | as part of the Derivative Works; within the Source form or 449 | documentation, if provided along with the Derivative Works; or, 450 | within a display generated by the Derivative Works, if and 451 | wherever such third-party notices normally appear. The contents 452 | of the NOTICE file are for informational purposes only and 453 | do not modify the License. You may add Your own attribution 454 | notices within Derivative Works that You distribute, alongside 455 | or as an addendum to the NOTICE text from the Work, provided 456 | that such additional attribution notices cannot be construed 457 | as modifying the License. 458 | 459 | You may add Your own copyright statement to Your modifications and 460 | may provide additional or different license terms and conditions 461 | for use, reproduction, or distribution of Your modifications, or 462 | for any such Derivative Works as a whole, provided Your use, 463 | reproduction, and distribution of the Work otherwise complies with 464 | the conditions stated in this License. 465 | 466 | 5. Submission of Contributions. Unless You explicitly state otherwise, 467 | any Contribution intentionally submitted for inclusion in the Work 468 | by You to the Licensor shall be under the terms and conditions of 469 | this License, without any additional terms or conditions. 470 | Notwithstanding the above, nothing herein shall supersede or modify 471 | the terms of any separate license agreement you may have executed 472 | with Licensor regarding such Contributions. 473 | 474 | 6. Trademarks. This License does not grant permission to use the trade 475 | names, trademarks, service marks, or product names of the Licensor, 476 | except as required for reasonable and customary use in describing the 477 | origin of the Work and reproducing the content of the NOTICE file. 478 | 479 | 7. Disclaimer of Warranty. Unless required by applicable law or 480 | agreed to in writing, Licensor provides the Work (and each 481 | Contributor provides its Contributions) on an "AS IS" BASIS, 482 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 483 | implied, including, without limitation, any warranties or conditions 484 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 485 | PARTICULAR PURPOSE. You are solely responsible for determining the 486 | appropriateness of using or redistributing the Work and assume any 487 | risks associated with Your exercise of permissions under this License. 488 | 489 | 8. Limitation of Liability. In no event and under no legal theory, 490 | whether in tort (including negligence), contract, or otherwise, 491 | unless required by applicable law (such as deliberate and grossly 492 | negligent acts) or agreed to in writing, shall any Contributor be 493 | liable to You for damages, including any direct, indirect, special, 494 | incidental, or consequential damages of any character arising as a 495 | result of this License or out of the use or inability to use the 496 | Work (including but not limited to damages for loss of goodwill, 497 | work stoppage, computer failure or malfunction, or any and all 498 | other commercial damages or losses), even if such Contributor 499 | has been advised of the possibility of such damages. 500 | 501 | 9. Accepting Warranty or Additional Liability. While redistributing 502 | the Work or Derivative Works thereof, You may choose to offer, 503 | and charge a fee for, acceptance of support, warranty, indemnity, 504 | or other liability obligations and/or rights consistent with this 505 | License. However, in accepting such obligations, You may act only 506 | on Your own behalf and on Your sole responsibility, not on behalf 507 | of any other Contributor, and only if You agree to indemnify, 508 | defend, and hold each Contributor harmless for any liability 509 | incurred by, or claims asserted against, such Contributor by reason 510 | of your accepting any such warranty or additional liability. 511 | 512 | END OF TERMS AND CONDITIONS 513 | 514 | APPENDIX: How to apply the Apache License to your work. 515 | 516 | To apply the Apache License to your work, attach the following 517 | boilerplate notice, with the fields enclosed by brackets "{}" 518 | replaced with your own identifying information. (Don't include 519 | the brackets!) The text should be enclosed in the appropriate 520 | comment syntax for the file format. We also recommend that a 521 | file or class name and description of purpose be included on the 522 | same "printed page" as the copyright notice for easier 523 | identification within third-party archives. 524 | 525 | Copyright 2018 Gregor Martynus and other contributors. 526 | 527 | Licensed under the Apache License, Version 2.0 (the "License"); 528 | you may not use this file except in compliance with the License. 529 | You may obtain a copy of the License at 530 | 531 | http://www.apache.org/licenses/LICENSE-2.0 532 | 533 | Unless required by applicable law or agreed to in writing, software 534 | distributed under the License is distributed on an "AS IS" BASIS, 535 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 536 | See the License for the specific language governing permissions and 537 | limitations under the License. 538 | 539 | 540 | bottleneck 541 | MIT 542 | The MIT License (MIT) 543 | 544 | Copyright (c) 2014 Simon Grondin 545 | 546 | Permission is hereby granted, free of charge, to any person obtaining a copy of 547 | this software and associated documentation files (the "Software"), to deal in 548 | the Software without restriction, including without limitation the rights to 549 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 550 | the Software, and to permit persons to whom the Software is furnished to do so, 551 | subject to the following conditions: 552 | 553 | The above copyright notice and this permission notice shall be included in all 554 | copies or substantial portions of the Software. 555 | 556 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 557 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 558 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 559 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 560 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 561 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 562 | 563 | 564 | deprecation 565 | ISC 566 | The ISC License 567 | 568 | Copyright (c) Gregor Martynus and contributors 569 | 570 | Permission to use, copy, modify, and/or distribute this software for any 571 | purpose with or without fee is hereby granted, provided that the above 572 | copyright notice and this permission notice appear in all copies. 573 | 574 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 575 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 576 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 577 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 578 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 579 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR 580 | IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 581 | 582 | 583 | dotenv 584 | BSD-2-Clause 585 | Copyright (c) 2015, Scott Motte 586 | All rights reserved. 587 | 588 | Redistribution and use in source and binary forms, with or without 589 | modification, are permitted provided that the following conditions are met: 590 | 591 | * Redistributions of source code must retain the above copyright notice, this 592 | list of conditions and the following disclaimer. 593 | 594 | * Redistributions in binary form must reproduce the above copyright notice, 595 | this list of conditions and the following disclaimer in the documentation 596 | and/or other materials provided with the distribution. 597 | 598 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 599 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 600 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 601 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 602 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 603 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 604 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 605 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 606 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 607 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 608 | 609 | 610 | es6-promise 611 | MIT 612 | Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors 613 | 614 | Permission is hereby granted, free of charge, to any person obtaining a copy of 615 | this software and associated documentation files (the "Software"), to deal in 616 | the Software without restriction, including without limitation the rights to 617 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies 618 | of the Software, and to permit persons to whom the Software is furnished to do 619 | so, subject to the following conditions: 620 | 621 | The above copyright notice and this permission notice shall be included in all 622 | copies or substantial portions of the Software. 623 | 624 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 625 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 626 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 627 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 628 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 629 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 630 | SOFTWARE. 631 | 632 | 633 | fs-extra 634 | MIT 635 | (The MIT License) 636 | 637 | Copyright (c) 2011-2017 JP Richardson 638 | 639 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files 640 | (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, 641 | merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is 642 | furnished to do so, subject to the following conditions: 643 | 644 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 645 | 646 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE 647 | WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS 648 | OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 649 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 650 | 651 | 652 | graceful-fs 653 | ISC 654 | The ISC License 655 | 656 | Copyright (c) Isaac Z. Schlueter, Ben Noordhuis, and Contributors 657 | 658 | Permission to use, copy, modify, and/or distribute this software for any 659 | purpose with or without fee is hereby granted, provided that the above 660 | copyright notice and this permission notice appear in all copies. 661 | 662 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 663 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 664 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 665 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 666 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 667 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR 668 | IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 669 | 670 | 671 | is-plain-object 672 | MIT 673 | The MIT License (MIT) 674 | 675 | Copyright (c) 2014-2017, Jon Schlinkert. 676 | 677 | Permission is hereby granted, free of charge, to any person obtaining a copy 678 | of this software and associated documentation files (the "Software"), to deal 679 | in the Software without restriction, including without limitation the rights 680 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 681 | copies of the Software, and to permit persons to whom the Software is 682 | furnished to do so, subject to the following conditions: 683 | 684 | The above copyright notice and this permission notice shall be included in 685 | all copies or substantial portions of the Software. 686 | 687 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 688 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 689 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 690 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 691 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 692 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 693 | THE SOFTWARE. 694 | 695 | 696 | js-yaml 697 | MIT 698 | (The MIT License) 699 | 700 | Copyright (C) 2011-2015 by Vitaly Puzrin 701 | 702 | Permission is hereby granted, free of charge, to any person obtaining a copy 703 | of this software and associated documentation files (the "Software"), to deal 704 | in the Software without restriction, including without limitation the rights 705 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 706 | copies of the Software, and to permit persons to whom the Software is 707 | furnished to do so, subject to the following conditions: 708 | 709 | The above copyright notice and this permission notice shall be included in 710 | all copies or substantial portions of the Software. 711 | 712 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 713 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 714 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 715 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 716 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 717 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 718 | THE SOFTWARE. 719 | 720 | 721 | jsonfile 722 | MIT 723 | (The MIT License) 724 | 725 | Copyright (c) 2012-2015, JP Richardson 726 | 727 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files 728 | (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, 729 | merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is 730 | furnished to do so, subject to the following conditions: 731 | 732 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 733 | 734 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE 735 | WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS 736 | OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 737 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 738 | 739 | 740 | node-fetch 741 | MIT 742 | The MIT License (MIT) 743 | 744 | Copyright (c) 2016 David Frank 745 | 746 | Permission is hereby granted, free of charge, to any person obtaining a copy 747 | of this software and associated documentation files (the "Software"), to deal 748 | in the Software without restriction, including without limitation the rights 749 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 750 | copies of the Software, and to permit persons to whom the Software is 751 | furnished to do so, subject to the following conditions: 752 | 753 | The above copyright notice and this permission notice shall be included in all 754 | copies or substantial portions of the Software. 755 | 756 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 757 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 758 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 759 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 760 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 761 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 762 | SOFTWARE. 763 | 764 | 765 | 766 | node-readfiles 767 | MIT 768 | (The MIT License) 769 | 770 | Copyright (c) 2016 Alejandro Gonzalez 771 | 772 | Permission is hereby granted, free of charge, to any person obtaining 773 | a copy of this software and associated documentation files (the 774 | 'Software'), to deal in the Software without restriction, including 775 | without limitation the rights to use, copy, modify, merge, publish, 776 | distribute, sublicense, and/or sell copies of the Software, and to 777 | permit persons to whom the Software is furnished to do so, subject to 778 | the following conditions: 779 | 780 | The above copyright notice and this permission notice shall be 781 | included in all copies or substantial portions of the Software. 782 | 783 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, 784 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 785 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 786 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 787 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 788 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 789 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 790 | 791 | nunjucks 792 | BSD-2-Clause 793 | Copyright (c) 2012-2015, James Long 794 | All rights reserved. 795 | 796 | Redistribution and use in source and binary forms, with or without 797 | modification, are permitted provided that the following conditions are 798 | met: 799 | 800 | Redistributions of source code must retain the above copyright 801 | notice, this list of conditions and the following disclaimer. 802 | 803 | Redistributions in binary form must reproduce the above copyright 804 | notice, this list of conditions and the following disclaimer in 805 | the documentation and/or other materials provided with the 806 | distribution. 807 | 808 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 809 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 810 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 811 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 812 | HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 813 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 814 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 815 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 816 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 817 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 818 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 819 | 820 | once 821 | ISC 822 | The ISC License 823 | 824 | Copyright (c) Isaac Z. Schlueter and Contributors 825 | 826 | Permission to use, copy, modify, and/or distribute this software for any 827 | purpose with or without fee is hereby granted, provided that the above 828 | copyright notice and this permission notice appear in all copies. 829 | 830 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 831 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 832 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 833 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 834 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 835 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR 836 | IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 837 | 838 | 839 | tr46 840 | MIT 841 | 842 | tunnel 843 | MIT 844 | The MIT License (MIT) 845 | 846 | Copyright (c) 2012 Koichi Kobayashi 847 | 848 | Permission is hereby granted, free of charge, to any person obtaining a copy 849 | of this software and associated documentation files (the "Software"), to deal 850 | in the Software without restriction, including without limitation the rights 851 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 852 | copies of the Software, and to permit persons to whom the Software is 853 | furnished to do so, subject to the following conditions: 854 | 855 | The above copyright notice and this permission notice shall be included in 856 | all copies or substantial portions of the Software. 857 | 858 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 859 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 860 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 861 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 862 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 863 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 864 | THE SOFTWARE. 865 | 866 | 867 | universal-user-agent 868 | ISC 869 | # [ISC License](https://spdx.org/licenses/ISC) 870 | 871 | Copyright (c) 2018, Gregor Martynus (https://github.com/gr2m) 872 | 873 | Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. 874 | 875 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 876 | 877 | 878 | universalify 879 | MIT 880 | (The MIT License) 881 | 882 | Copyright (c) 2017, Ryan Zimmerman 883 | 884 | Permission is hereby granted, free of charge, to any person obtaining a copy of 885 | this software and associated documentation files (the 'Software'), to deal in 886 | the Software without restriction, including without limitation the rights to 887 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 888 | the Software, and to permit persons to whom the Software is furnished to do so, 889 | subject to the following conditions: 890 | 891 | The above copyright notice and this permission notice shall be included in all 892 | copies or substantial portions of the Software. 893 | 894 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 895 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 896 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 897 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 898 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 899 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 900 | 901 | 902 | uuid 903 | MIT 904 | The MIT License (MIT) 905 | 906 | Copyright (c) 2010-2020 Robert Kieffer and other contributors 907 | 908 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 909 | 910 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 911 | 912 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 913 | 914 | 915 | webidl-conversions 916 | BSD-2-Clause 917 | # The BSD 2-Clause License 918 | 919 | Copyright (c) 2014, Domenic Denicola 920 | All rights reserved. 921 | 922 | Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 923 | 924 | 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 925 | 926 | 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 927 | 928 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 929 | 930 | 931 | whatwg-url 932 | MIT 933 | The MIT License (MIT) 934 | 935 | Copyright (c) 2015–2016 Sebastian Mayr 936 | 937 | Permission is hereby granted, free of charge, to any person obtaining a copy 938 | of this software and associated documentation files (the "Software"), to deal 939 | in the Software without restriction, including without limitation the rights 940 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 941 | copies of the Software, and to permit persons to whom the Software is 942 | furnished to do so, subject to the following conditions: 943 | 944 | The above copyright notice and this permission notice shall be included in 945 | all copies or substantial portions of the Software. 946 | 947 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 948 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 949 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 950 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 951 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 952 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 953 | THE SOFTWARE. 954 | 955 | 956 | wrappy 957 | ISC 958 | The ISC License 959 | 960 | Copyright (c) Isaac Z. Schlueter and Contributors 961 | 962 | Permission to use, copy, modify, and/or distribute this software for any 963 | purpose with or without fee is hereby granted, provided that the above 964 | copyright notice and this permission notice appear in all copies. 965 | 966 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 967 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 968 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 969 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 970 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 971 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR 972 | IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 973 | -------------------------------------------------------------------------------- /dist/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "module" 3 | } 4 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "repo-file-sync-action", 3 | "version": "1.21.1", 4 | "description": "GitHub Action to keep files like Action workflows or entire directories in sync between multiple repositories.", 5 | "main": "dist/index.js", 6 | "type": "module", 7 | "scripts": { 8 | "lint": "eslint ./src", 9 | "start": "node src/index.js", 10 | "build": "ncc build src/index.js -o dist -m --license licenses.txt" 11 | }, 12 | "repository": { 13 | "type": "git", 14 | "url": "git+https://github.com/betahuhn/repo-file-sync-action.git" 15 | }, 16 | "keywords": [ 17 | "sync", 18 | "file-sync", 19 | "workflow-sync", 20 | "github-workflow", 21 | "github-actions", 22 | "github-action-workflow-sync" 23 | ], 24 | "author": "Maximilian Schiller ", 25 | "license": "MIT", 26 | "bugs": { 27 | "url": "https://github.com/betahuhn/repo-file-sync-action/issues" 28 | }, 29 | "homepage": "https://github.com/marketplace/actions/repo-file-sync-action", 30 | "dependencies": { 31 | "@actions/core": "^1.10.0", 32 | "@actions/github": "^5.1.1", 33 | "@octokit/plugin-throttling": "^3.6.2", 34 | "@putout/git-status-porcelain": "^1.1.0", 35 | "action-input-parser": "^1.2.33", 36 | "fs-extra": "^10.1.0", 37 | "js-yaml": "^4.1.0", 38 | "node-readfiles": "0.2.0", 39 | "nunjucks": "^3.2.3" 40 | }, 41 | "devDependencies": { 42 | "@betahuhn/config": "^1.2.0", 43 | "@octokit/core": "^3.6.0", 44 | "@vercel/ncc": "^0.34.0", 45 | "eslint": "^7.32.0" 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /release.config.cjs: -------------------------------------------------------------------------------- 1 | module.exports = require('@betahuhn/config').releaseMaster -------------------------------------------------------------------------------- /src/config.js: -------------------------------------------------------------------------------- 1 | import * as core from '@actions/core' 2 | import * as yaml from 'js-yaml' 3 | import fs from 'fs-extra' 4 | import * as path from 'path' 5 | import { getInput } from 'action-input-parser' 6 | 7 | const REPLACE_DEFAULT = true 8 | const TEMPLATE_DEFAULT = false 9 | const DELETE_ORPHANED_DEFAULT = false 10 | 11 | let context 12 | 13 | try { 14 | 15 | let isInstallationToken = false 16 | let token = getInput({ 17 | key: 'GH_PAT' 18 | }) 19 | 20 | if (!token) { 21 | token = getInput({ 22 | key: 'GH_INSTALLATION_TOKEN' 23 | }) 24 | isInstallationToken = true 25 | if (!token) { 26 | core.setFailed('You must provide either GH_PAT or GH_INSTALLATION_TOKEN') 27 | process.exit(1) 28 | } 29 | } 30 | 31 | context = { 32 | GITHUB_TOKEN: token, 33 | GITHUB_SERVER_URL: process.env.GITHUB_SERVER_URL || 'https://github.com', 34 | IS_INSTALLATION_TOKEN: isInstallationToken, 35 | GIT_EMAIL: getInput({ 36 | key: 'GIT_EMAIL' 37 | }), 38 | GIT_USERNAME: getInput({ 39 | key: 'GIT_USERNAME' 40 | }), 41 | CONFIG_PATH: getInput({ 42 | key: 'CONFIG_PATH', 43 | default: '.github/sync.yml' 44 | }), 45 | IS_FINE_GRAINED: getInput({ 46 | key: 'IS_FINE_GRAINED', 47 | default: false 48 | }), 49 | COMMIT_BODY: getInput({ 50 | key: 'COMMIT_BODY', 51 | default: '' 52 | }), 53 | COMMIT_PREFIX: getInput({ 54 | key: 'COMMIT_PREFIX', 55 | default: '🔄' 56 | }), 57 | COMMIT_EACH_FILE: getInput({ 58 | key: 'COMMIT_EACH_FILE', 59 | type: 'boolean', 60 | default: true 61 | }), 62 | PR_LABELS: getInput({ 63 | key: 'PR_LABELS', 64 | default: [ 'sync' ], 65 | type: 'array', 66 | disableable: true 67 | }), 68 | PR_BODY: getInput({ 69 | key: 'PR_BODY', 70 | default: '' 71 | }), 72 | ASSIGNEES: getInput({ 73 | key: 'ASSIGNEES', 74 | type: 'array' 75 | }), 76 | REVIEWERS: getInput({ 77 | key: 'REVIEWERS', 78 | type: 'array' 79 | }), 80 | TEAM_REVIEWERS: getInput({ 81 | key: 'TEAM_REVIEWERS', 82 | type: 'array' 83 | }), 84 | TMP_DIR: getInput({ 85 | key: 'TMP_DIR', 86 | default: `tmp-${ Date.now().toString() }` 87 | }), 88 | DRY_RUN: getInput({ 89 | key: 'DRY_RUN', 90 | type: 'boolean', 91 | default: false 92 | }), 93 | SKIP_CLEANUP: getInput({ 94 | key: 'SKIP_CLEANUP', 95 | type: 'boolean', 96 | default: false 97 | }), 98 | OVERWRITE_EXISTING_PR: getInput({ 99 | key: 'OVERWRITE_EXISTING_PR', 100 | type: 'boolean', 101 | default: true 102 | }), 103 | GITHUB_REPOSITORY: getInput({ 104 | key: 'GITHUB_REPOSITORY', 105 | required: true 106 | }), 107 | SKIP_PR: getInput({ 108 | key: 'SKIP_PR', 109 | type: 'boolean', 110 | default: false 111 | }), 112 | ORIGINAL_MESSAGE: getInput({ 113 | key: 'ORIGINAL_MESSAGE', 114 | type: 'boolean', 115 | default: false 116 | }), 117 | COMMIT_AS_PR_TITLE: getInput({ 118 | key: 'COMMIT_AS_PR_TITLE', 119 | type: 'boolean', 120 | default: false 121 | }), 122 | BRANCH_PREFIX: getInput({ 123 | key: 'BRANCH_PREFIX', 124 | default: 'repo-sync/SOURCE_REPO_NAME' 125 | }), 126 | FORK: getInput({ 127 | key: 'FORK', 128 | default: false, 129 | disableable: true 130 | }) 131 | } 132 | 133 | core.setSecret(context.GITHUB_TOKEN) 134 | 135 | core.debug(JSON.stringify(context, null, 2)) 136 | 137 | while (fs.existsSync(context.TMP_DIR)) { 138 | context.TMP_DIR = `tmp-${ Date.now().toString() }` 139 | core.warning(`TEMP_DIR already exists. Using "${ context.TMP_DIR }" now.`) 140 | } 141 | 142 | } catch (err) { 143 | core.setFailed(err.message) 144 | process.exit(1) 145 | } 146 | 147 | const parseRepoName = (fullRepo) => { 148 | let host = new URL(context.GITHUB_SERVER_URL).host 149 | 150 | if (fullRepo.startsWith('http')) { 151 | const url = new URL(fullRepo) 152 | host = url.host 153 | 154 | fullRepo = url.pathname.replace(/^\/+/, '') // Remove leading slash 155 | 156 | core.info('Using custom host') 157 | } 158 | 159 | const user = fullRepo.split('/')[0] 160 | const name = fullRepo.split('/')[1].split('@')[0] 161 | const branch = fullRepo.split('@')[1] || 'default' 162 | 163 | return { 164 | fullName: `${ host }/${ user }/${ name }`, 165 | uniqueName: `${ host }/${ user }/${ name }@${ branch }`, 166 | host, 167 | user, 168 | name, 169 | branch 170 | } 171 | } 172 | 173 | const parseExclude = (text, src) => { 174 | if (text === undefined || typeof text !== 'string') return undefined 175 | 176 | const files = text.split('\n').filter((i) => i) 177 | 178 | return files.map((file) => path.join(src, file)) 179 | } 180 | 181 | const parseFiles = (files) => { 182 | return files.map((item) => { 183 | if (typeof item === 'string') 184 | item = { source: item } 185 | 186 | if (item.source !== undefined) { 187 | return { 188 | source: item.source, 189 | dest: item.dest || item.source, 190 | template: item.template === undefined ? TEMPLATE_DEFAULT : item.template, 191 | replace: item.replace === undefined ? REPLACE_DEFAULT : item.replace, 192 | deleteOrphaned: item.deleteOrphaned === undefined ? DELETE_ORPHANED_DEFAULT : item.deleteOrphaned, 193 | exclude: parseExclude(item.exclude, item.source) 194 | } 195 | } 196 | 197 | core.warning('Warn: No source files specified') 198 | }) 199 | } 200 | 201 | export async function parseConfig() { 202 | const fileContent = await fs.promises.readFile(context.CONFIG_PATH) 203 | 204 | const configObject = yaml.load(fileContent.toString()) 205 | 206 | const result = {} 207 | 208 | Object.keys(configObject).forEach((key) => { 209 | if (key === 'group') { 210 | const rawObject = configObject[key] 211 | 212 | const groups = Array.isArray(rawObject) ? rawObject : [ rawObject ] 213 | 214 | groups.forEach((group) => { 215 | const repos = typeof group.repos === 'string' ? group.repos.split('\n').map((n) => n.trim()).filter((n) => n) : group.repos 216 | 217 | repos.forEach((name) => { 218 | const files = parseFiles(group.files) 219 | const repo = parseRepoName(name) 220 | 221 | if (result[repo.uniqueName] !== undefined) { 222 | result[repo.uniqueName].files.push(...files) 223 | return 224 | } 225 | 226 | result[repo.uniqueName] = { 227 | repo, 228 | files 229 | } 230 | }) 231 | }) 232 | } else { 233 | const files = parseFiles(configObject[key]) 234 | const repo = parseRepoName(key) 235 | 236 | if (result[repo.uniqueName] !== undefined) { 237 | result[repo.uniqueName].files.push(...files) 238 | return 239 | } 240 | 241 | result[repo.uniqueName] = { 242 | repo, 243 | files 244 | } 245 | } 246 | }) 247 | 248 | return Object.values(result) 249 | } 250 | 251 | export default context -------------------------------------------------------------------------------- /src/git.js: -------------------------------------------------------------------------------- 1 | import { parse } from '@putout/git-status-porcelain' 2 | import * as core from '@actions/core' 3 | import * as github from '@actions/github' 4 | import { GitHub, getOctokitOptions } from '@actions/github/lib/utils.js' 5 | import { throttling } from '@octokit/plugin-throttling' 6 | import * as path from 'path' 7 | 8 | import config from './config.js' 9 | 10 | const { 11 | GITHUB_TOKEN, 12 | GITHUB_SERVER_URL, 13 | IS_INSTALLATION_TOKEN, 14 | IS_FINE_GRAINED, 15 | GIT_USERNAME, 16 | GIT_EMAIL, 17 | TMP_DIR, 18 | COMMIT_BODY, 19 | COMMIT_PREFIX, 20 | GITHUB_REPOSITORY, 21 | OVERWRITE_EXISTING_PR, 22 | SKIP_PR, 23 | PR_BODY, 24 | BRANCH_PREFIX, 25 | FORK 26 | } = config 27 | 28 | import { dedent, execCmd } from './helpers.js' 29 | 30 | export default class Git { 31 | constructor() { 32 | const Octokit = GitHub.plugin(throttling) 33 | 34 | const options = getOctokitOptions(GITHUB_TOKEN, { 35 | baseUrl: process.env.GITHUB_API_URL || 'https://api.github.com', 36 | throttle: { 37 | onRateLimit: (retryAfter) => { 38 | core.debug(`Hit GitHub API rate limit, retrying after ${ retryAfter }s`) 39 | return true 40 | }, 41 | onSecondaryRateLimit: (retryAfter) => { 42 | core.debug(`Hit secondary GitHub API rate limit, retrying after ${ retryAfter }s`) 43 | return true 44 | } 45 | } 46 | }) 47 | 48 | const octokit = new Octokit(options) 49 | 50 | // We only need the rest client 51 | this.github = octokit.rest 52 | } 53 | 54 | async initRepo(repo) { 55 | // Reset repo specific values 56 | this.existingPr = undefined 57 | this.prBranch = undefined 58 | this.baseBranch = undefined 59 | 60 | // Set values to current repo 61 | this.repo = repo 62 | this.workingDir = path.join(TMP_DIR, repo.uniqueName) 63 | this.gitUrl = `https://${ IS_INSTALLATION_TOKEN ? 'x-access-token:' : '' }${ IS_FINE_GRAINED ? 'oauth:' : '' }${ GITHUB_TOKEN }@${ repo.fullName }.git` 64 | 65 | await this.clone() 66 | await this.setIdentity() 67 | await this.getBaseBranch() 68 | await this.getLastCommitSha() 69 | 70 | if (FORK) { 71 | const forkUrl = new URL(GITHUB_SERVER_URL) 72 | forkUrl.username = GITHUB_TOKEN 73 | forkUrl.pathname = `${ FORK }/${ this.repo.name }.git` 74 | await this.createFork() 75 | await this.createRemote(forkUrl.toString()) 76 | 77 | } 78 | } 79 | 80 | async createFork() { 81 | core.debug(`Creating fork with OWNER: ${ this.repo.user } and REPO: ${ this.repo.name }`) 82 | await this.github.repos.createFork({ 83 | owner: this.repo.user, 84 | repo: this.repo.name 85 | }) 86 | } 87 | 88 | async createRemote(forkUrl) { 89 | return execCmd( 90 | `git remote add fork ${ forkUrl }`, 91 | this.workingDir 92 | ) 93 | } 94 | 95 | async clone() { 96 | core.debug(`Cloning ${ this.repo.fullName } into ${ this.workingDir }`) 97 | 98 | return execCmd( 99 | `git clone --depth 1 ${ this.repo.branch !== 'default' ? '--branch "' + this.repo.branch + '"' : '' } ${ this.gitUrl } ${ this.workingDir }` 100 | ) 101 | } 102 | 103 | async setIdentity() { 104 | let username = GIT_USERNAME 105 | let email = GIT_EMAIL 106 | 107 | if (email === undefined) { 108 | if (!IS_INSTALLATION_TOKEN) { 109 | const { data } = await this.github.users.getAuthenticated() 110 | email = data.email 111 | username = data.login 112 | } 113 | } 114 | 115 | core.debug(`Setting git user to email: ${ email }, username: ${ username }`) 116 | 117 | return execCmd( 118 | `git config --local user.name "${ username }" && git config --local user.email "${ email }"`, 119 | this.workingDir 120 | ) 121 | } 122 | 123 | async getBaseBranch() { 124 | this.baseBranch = await execCmd( 125 | `git rev-parse --abbrev-ref HEAD`, 126 | this.workingDir 127 | ) 128 | } 129 | 130 | async createPrBranch() { 131 | const prefix = BRANCH_PREFIX.replace('SOURCE_REPO_NAME', GITHUB_REPOSITORY.split('/')[1]) 132 | 133 | let newBranch = path.join(prefix, this.repo.branch).replace(/\\/g, '/').replace(/\/\./g, '/') 134 | 135 | if (OVERWRITE_EXISTING_PR === false) { 136 | newBranch += `-${ Math.round((new Date()).getTime() / 1000) }` 137 | } 138 | 139 | core.debug(`Creating PR Branch ${ newBranch }`) 140 | 141 | await execCmd( 142 | `git checkout -b "${ newBranch }"`, 143 | this.workingDir 144 | ) 145 | 146 | this.prBranch = newBranch 147 | } 148 | 149 | async add(file) { 150 | return execCmd( 151 | `git add -f "${ file }"`, 152 | this.workingDir 153 | ) 154 | } 155 | 156 | isOneCommitPush() { 157 | return github.context.eventName === 'push' && github.context.payload.commits.length === 1 158 | } 159 | 160 | originalCommitMessage() { 161 | return github.context.payload.commits[0].message 162 | } 163 | 164 | parseGitDiffOutput(string) { // parses git diff output and returns a dictionary mapping the file path to the diff output for this file 165 | // split diff into separate entries for separate files. \ndiff --git should be a reliable way to detect the separation, as content of files is always indented 166 | return `\n${ string }`.split('\ndiff --git').slice(1).reduce((resultDict, fileDiff) => { 167 | const lines = fileDiff.split('\n') 168 | const lastHeaderLineIndex = lines.findIndex((line) => line.startsWith('+++')) 169 | if (lastHeaderLineIndex === -1) return resultDict // ignore binary files 170 | 171 | const plainDiff = lines.slice(lastHeaderLineIndex + 1).join('\n').trim() 172 | let filePath = '' 173 | if (lines[lastHeaderLineIndex].startsWith('+++ b/')) { // every file except removed files 174 | filePath = lines[lastHeaderLineIndex].slice(6) // remove '+++ b/' 175 | } else { // for removed file need to use header line with filename before deletion 176 | filePath = lines[lastHeaderLineIndex - 1].slice(6) // remove '--- a/' 177 | } 178 | return { ...resultDict, [filePath]: plainDiff } 179 | }, {}) 180 | } 181 | 182 | async getChangesFromLastCommit(source) { // gets array of git diffs for the source, which either can be a file or a dict 183 | if (this.lastCommitChanges === undefined) { 184 | const diff = await this.github.repos.compareCommits({ 185 | mediaType: { 186 | format: 'diff' 187 | }, 188 | owner: github.context.payload.repository.owner.name, 189 | repo: github.context.payload.repository.name, 190 | base: github.context.payload.before, 191 | head: github.context.payload.after 192 | }) 193 | this.lastCommitChanges = this.parseGitDiffOutput(diff.data) 194 | } 195 | if (source.endsWith('/')) { 196 | return Object.keys(this.lastCommitChanges).filter((filePath) => filePath.startsWith(source)).reduce((result, key) => [ ...result, this.lastCommitChanges[key] ], []) 197 | } else { 198 | return this.lastCommitChanges[source] === undefined ? [] : [ this.lastCommitChanges[source] ] 199 | } 200 | } 201 | 202 | async getLastCommitSha() { 203 | this.lastCommitSha = await execCmd( 204 | `git rev-parse HEAD`, 205 | this.workingDir 206 | ) 207 | } 208 | 209 | async changes(destination) { // gets array of git diffs for the destination, which either can be a file or a dict 210 | const output = await execCmd( 211 | `git diff HEAD ${ destination }`, 212 | this.workingDir 213 | ) 214 | return Object.values(this.parseGitDiffOutput(output)) 215 | } 216 | 217 | async hasChanges() { 218 | const statusOutput = await execCmd( 219 | `git status --porcelain`, 220 | this.workingDir 221 | ) 222 | 223 | return parse(statusOutput).length !== 0 224 | } 225 | 226 | async commit(msg) { 227 | let message = msg !== undefined ? msg : `${ COMMIT_PREFIX } synced file(s) with ${ GITHUB_REPOSITORY }` 228 | if (COMMIT_BODY) { 229 | message += `\n\n${ COMMIT_BODY }` 230 | } 231 | return execCmd( 232 | `git commit -m '${ message.replace(/'/g, '\'\\\'\'') }'`, 233 | this.workingDir 234 | ) 235 | } 236 | 237 | // Returns a git tree parsed for the specified commit sha 238 | async getTreeId(commitSha) { 239 | core.debug(`Getting treeId for commit ${ commitSha }`) 240 | const output = (await execCmd( 241 | `git cat-file -p ${ commitSha }`, 242 | this.workingDir 243 | )).split('\n') 244 | 245 | const commitHeaders = output.slice(0, output.findIndex((e) => e === '')) 246 | const tree = commitHeaders.find((e) => e.startsWith('tree')).replace('tree ', '') 247 | 248 | return tree 249 | } 250 | 251 | async getTreeDiff(referenceTreeId, differenceTreeId) { 252 | const output = await execCmd( 253 | `git diff-tree ${ referenceTreeId } ${ differenceTreeId } -r`, 254 | this.workingDir 255 | ) 256 | 257 | const diff = [] 258 | for (const line of output.split('\n')) { 259 | const splitted = line 260 | .replace(/^:/, '') 261 | .replace('\t', ' ') 262 | .split(' ') 263 | 264 | const [ 265 | newMode, 266 | previousMode, 267 | newBlob, 268 | previousBlob, 269 | change, 270 | path 271 | ] = splitted 272 | 273 | diff.push({ 274 | newMode, 275 | previousMode, 276 | newBlob, 277 | previousBlob, 278 | change, 279 | path 280 | }) 281 | } 282 | 283 | return diff 284 | } 285 | 286 | // Creates the blob objects in GitHub for the files that are not in the previous commit only 287 | async uploadGitHubBlob(blob) { 288 | core.debug(`Uploading GitHub Blob for blob ${ blob }`) 289 | const fileContent = await execCmd( 290 | `git cat-file -p ${ blob }`, 291 | this.workingDir, 292 | false 293 | ) 294 | 295 | // Creates the blob. We don't need to store the response because the local sha is the same and we can use it to reference the blob 296 | return this.github.git.createBlob({ 297 | owner: this.repo.user, 298 | repo: this.repo.name, 299 | content: Buffer.from(fileContent).toString('base64'), 300 | encoding: 'base64' 301 | }) 302 | } 303 | 304 | // Gets the commit list in chronological order 305 | async getCommitsToPush() { 306 | const output = await execCmd( 307 | `git log --format=%H --reverse ${ SKIP_PR === false ? `` : `origin/` }${ this.baseBranch }..HEAD`, 308 | this.workingDir 309 | ) 310 | 311 | const commits = output.split('\n') 312 | return commits 313 | } 314 | 315 | async getCommitMessage(commitSha) { 316 | return await execCmd( 317 | `git log -1 --format=%B ${ commitSha }`, 318 | this.workingDir 319 | ) 320 | } 321 | 322 | // A wrapper for running all the flow to generate all the pending commits using the GitHub API 323 | async createGithubVerifiedCommits() { 324 | core.debug(`Creating Commits using GitHub API`) 325 | const commits = await this.getCommitsToPush() 326 | 327 | if (SKIP_PR === false) { 328 | // Creates the PR branch if doesn't exists 329 | try { 330 | await this.github.git.createRef({ 331 | owner: this.repo.user, 332 | repo: this.repo.name, 333 | sha: this.lastCommitSha, 334 | ref: 'refs/heads/' + this.prBranch 335 | }) 336 | 337 | core.debug(`Created new branch ${ this.prBranch }`) 338 | } catch (error) { 339 | // If the branch exists ignores the error 340 | if (error.message !== 'Reference already exists') throw error 341 | } 342 | } 343 | 344 | for (const commit of commits) { 345 | await this.createGithubCommit(commit) 346 | } 347 | 348 | core.debug(`Updating branch ${ SKIP_PR === false ? this.prBranch : this.baseBranch } ref`) 349 | await this.github.git.updateRef({ 350 | owner: this.repo.user, 351 | repo: this.repo.name, 352 | ref: `heads/${ SKIP_PR === false ? this.prBranch : this.baseBranch }`, 353 | sha: this.lastCommitSha, 354 | force: true 355 | }) 356 | core.debug(`Commit using GitHub API completed`) 357 | } 358 | 359 | async status() { 360 | return execCmd( 361 | `git status`, 362 | this.workingDir 363 | ) 364 | } 365 | 366 | async push() { 367 | if (FORK) { 368 | return execCmd( 369 | `git push -u fork ${ this.prBranch } --force`, 370 | this.workingDir 371 | ) 372 | } 373 | if (IS_INSTALLATION_TOKEN) { 374 | return await this.createGithubVerifiedCommits() 375 | } 376 | return execCmd( 377 | `git push ${ this.gitUrl } --force`, 378 | this.workingDir 379 | ) 380 | } 381 | 382 | async findExistingPr() { 383 | const { data } = await this.github.pulls.list({ 384 | owner: this.repo.user, 385 | repo: this.repo.name, 386 | state: 'open', 387 | head: `${ FORK ? FORK : this.repo.user }:${ this.prBranch }` 388 | }) 389 | 390 | this.existingPr = data[0] 391 | 392 | return this.existingPr 393 | } 394 | 395 | async setPrWarning() { 396 | await this.github.pulls.update({ 397 | owner: this.repo.user, 398 | repo: this.repo.name, 399 | pull_number: this.existingPr.number, 400 | body: dedent(` 401 | ⚠️ This PR is being automatically resynced ⚠️ 402 | 403 | ${ this.existingPr.body } 404 | `) 405 | }) 406 | } 407 | 408 | async removePrWarning() { 409 | await this.github.pulls.update({ 410 | owner: this.repo.user, 411 | repo: this.repo.name, 412 | pull_number: this.existingPr.number, 413 | body: this.existingPr.body.replace('⚠️ This PR is being automatically resynced ⚠️', '') 414 | }) 415 | } 416 | 417 | async createOrUpdatePr(changedFiles, title) { 418 | const body = dedent(` 419 | synced local file(s) with [${ GITHUB_REPOSITORY }](${ GITHUB_SERVER_URL }/${ GITHUB_REPOSITORY }). 420 | 421 | ${ PR_BODY } 422 | 423 | ${ changedFiles } 424 | 425 | --- 426 | 427 | This PR was created automatically by the [repo-file-sync-action](https://github.com/BetaHuhn/repo-file-sync-action) workflow run [#${ process.env.GITHUB_RUN_ID || 0 }](${ GITHUB_SERVER_URL }/${ GITHUB_REPOSITORY }/actions/runs/${ process.env.GITHUB_RUN_ID || 0 }) 428 | `) 429 | 430 | if (this.existingPr) { 431 | core.info(`Overwriting existing PR`) 432 | 433 | const { data } = await this.github.pulls.update({ 434 | owner: this.repo.user, 435 | repo: this.repo.name, 436 | title: `${ COMMIT_PREFIX } synced file(s) with ${ GITHUB_REPOSITORY }`, 437 | pull_number: this.existingPr.number, 438 | body: body 439 | }) 440 | 441 | return data 442 | } 443 | 444 | core.info(`Creating new PR`) 445 | 446 | const { data } = await this.github.pulls.create({ 447 | owner: this.repo.user, 448 | repo: this.repo.name, 449 | title: title === undefined ? `${ COMMIT_PREFIX } synced file(s) with ${ GITHUB_REPOSITORY }` : title, 450 | body: body, 451 | head: `${ FORK ? FORK : this.repo.user }:${ this.prBranch }`, 452 | base: this.baseBranch 453 | }) 454 | 455 | this.existingPr = data 456 | 457 | return data 458 | } 459 | 460 | async addPrLabels(labels) { 461 | await this.github.issues.addLabels({ 462 | owner: this.repo.user, 463 | repo: this.repo.name, 464 | issue_number: this.existingPr.number, 465 | labels: labels 466 | }) 467 | } 468 | 469 | async addPrAssignees(assignees) { 470 | await this.github.issues.addAssignees({ 471 | owner: this.repo.user, 472 | repo: this.repo.name, 473 | issue_number: this.existingPr.number, 474 | assignees: assignees 475 | }) 476 | } 477 | 478 | async addPrReviewers(reviewers) { 479 | await this.github.pulls.requestReviewers({ 480 | owner: this.repo.user, 481 | repo: this.repo.name, 482 | pull_number: this.existingPr.number, 483 | reviewers: reviewers 484 | }) 485 | } 486 | 487 | async addPrTeamReviewers(reviewers) { 488 | await this.github.pulls.requestReviewers({ 489 | owner: this.repo.user, 490 | repo: this.repo.name, 491 | pull_number: this.existingPr.number, 492 | team_reviewers: reviewers 493 | }) 494 | } 495 | 496 | async createGithubCommit(commitSha) { 497 | const [ treeId, parentTreeId, commitMessage ] = await Promise.all([ 498 | this.getTreeId(`${ commitSha }`), 499 | this.getTreeId(`${ commitSha }~1`), 500 | this.getCommitMessage(commitSha) 501 | ]) 502 | 503 | const treeDiff = await this.getTreeDiff(treeId, parentTreeId) 504 | core.debug(`Uploading the blobs to GitHub`) 505 | const blobsToCreate = treeDiff 506 | .filter((e) => e.newMode !== '000000') // Do not upload the blob if it is being removed 507 | 508 | await Promise.all(blobsToCreate.map((e) => this.uploadGitHubBlob(e.newBlob))) 509 | core.debug(`Creating a GitHub tree`) 510 | const tree = treeDiff.map((e) => { 511 | if (e.newMode === '000000') { // Set the sha to null to remove the file 512 | e.newMode = e.previousMode 513 | e.newBlob = null 514 | } 515 | 516 | const entry = { 517 | path: e.path, 518 | mode: e.newMode, 519 | type: 'blob', 520 | sha: e.newBlob 521 | } 522 | 523 | return entry 524 | }) 525 | 526 | let treeSha 527 | try { 528 | const request = await this.github.git.createTree({ 529 | owner: this.repo.user, 530 | repo: this.repo.name, 531 | tree, 532 | base_tree: parentTreeId 533 | }) 534 | treeSha = request.data.sha 535 | } catch (error) { 536 | error.message = `Cannot create a new GitHub Tree: ${ error.message }` 537 | throw error 538 | } 539 | 540 | core.debug(`Creating a commit for the GitHub tree`) 541 | const request = await this.github.git.createCommit({ 542 | owner: this.repo.user, 543 | repo: this.repo.name, 544 | message: commitMessage, 545 | parents: [ this.lastCommitSha ], 546 | tree: treeSha 547 | }) 548 | this.lastCommitSha = request.data.sha 549 | } 550 | } -------------------------------------------------------------------------------- /src/helpers.js: -------------------------------------------------------------------------------- 1 | import fs from 'fs-extra' 2 | import readfiles from 'node-readfiles' 3 | import { exec } from 'child_process' 4 | import * as core from '@actions/core' 5 | import * as path from 'path' 6 | import nunjucks from 'nunjucks' 7 | 8 | nunjucks.configure({ autoescape: true, trimBlocks: true, lstripBlocks: true }) 9 | 10 | // From https://github.com/toniov/p-iteration/blob/master/lib/static-methods.js - MIT © Antonio V 11 | export async function forEach(array, callback) { 12 | for (let index = 0; index < array.length; index++) { 13 | // eslint-disable-next-line callback-return 14 | await callback(array[index], index, array) 15 | } 16 | } 17 | 18 | // From https://github.com/MartinKolarik/dedent-js/blob/master/src/index.ts - MIT © 2015 Martin Kolárik 19 | export function dedent(templateStrings, ...values) { 20 | const matches = [] 21 | const strings = typeof templateStrings === 'string' ? [ templateStrings ] : templateStrings.slice() 22 | strings[strings.length - 1] = strings[strings.length - 1].replace(/\r?\n([\t ]*)$/, '') 23 | for (let i = 0; i < strings.length; i++) { 24 | let match 25 | // eslint-disable-next-line no-cond-assign 26 | if (match = strings[i].match(/\n[\t ]+/g)) { 27 | matches.push(...match) 28 | } 29 | } 30 | if (matches.length) { 31 | const size = Math.min(...matches.map((value) => value.length - 1)) 32 | const pattern = new RegExp(`\n[\t ]{${ size }}`, 'g') 33 | for (let i = 0; i < strings.length; i++) { 34 | strings[i] = strings[i].replace(pattern, '\n') 35 | } 36 | } 37 | strings[0] = strings[0].replace(/^\r?\n/, '') 38 | let string = strings[0] 39 | for (let i = 0; i < values.length; i++) { 40 | string += values[i] + strings[i + 1] 41 | } 42 | return string 43 | } 44 | 45 | export function execCmd(command, workingDir, trimResult = true) { 46 | core.debug(`EXEC: "${ command }" IN ${ workingDir }`) 47 | return new Promise((resolve, reject) => { 48 | exec( 49 | command, 50 | { 51 | cwd: workingDir, 52 | maxBuffer: 1024 * 1024 * 4 53 | }, 54 | function(error, stdout) { 55 | error ? reject(error) : resolve( 56 | trimResult ? stdout.trim() : stdout 57 | ) 58 | } 59 | ) 60 | }) 61 | } 62 | 63 | export function addTrailingSlash(str) { 64 | return str.endsWith('/') ? str : str + '/' 65 | } 66 | 67 | export async function pathIsDirectory(path) { 68 | const stat = await fs.lstat(path) 69 | return stat.isDirectory() 70 | } 71 | 72 | export async function write(src, dest, context) { 73 | if (typeof context !== 'object') { 74 | context = {} 75 | } 76 | const content = nunjucks.render(src, context) 77 | await fs.outputFile(dest, content) 78 | } 79 | 80 | export async function copy(src, dest, isDirectory, file) { 81 | const deleteOrphaned = isDirectory && file.deleteOrphaned 82 | const exclude = file.exclude 83 | 84 | const filterFunc = (file) => { 85 | 86 | if (exclude !== undefined) { 87 | 88 | // Check if file-path is one of the present filepaths in the excluded paths 89 | // This has presedence over the single file, and therefore returns before the single file check 90 | let filePath = '' 91 | if (file.endsWith('/')) { 92 | // File item is a folder 93 | filePath = file 94 | } else { 95 | // File item is a file 96 | filePath = file.split('\/').slice(0, -1).join('/') + '/' 97 | } 98 | 99 | if (exclude.includes(filePath)) { 100 | core.debug(`Excluding file ${ file } since its path is included as one of the excluded paths.`) 101 | return false 102 | } 103 | 104 | 105 | // Or if the file itself is in the excluded files 106 | if (exclude.includes(file)) { 107 | core.debug(`Excluding file ${ file } since it is explicitly added in the exclusion list.`) 108 | return false 109 | } 110 | } 111 | return true 112 | } 113 | 114 | if (file.template) { 115 | if (isDirectory) { 116 | core.debug(`Render all files in directory ${ src } to ${ dest }`) 117 | 118 | const srcFileList = await readfiles(src, { readContents: false, hidden: true }) 119 | for (const srcFile of srcFileList) { 120 | if (!filterFunc(srcFile)) { continue } 121 | 122 | const srcPath = path.join(src, srcFile) 123 | const destPath = path.join(dest, srcFile) 124 | await write(srcPath, destPath, file.template) 125 | } 126 | } else { 127 | core.debug(`Render file ${ src } to ${ dest }`) 128 | 129 | await write(src, dest, file.template) 130 | } 131 | } else { 132 | core.debug(`Copy ${ src } to ${ dest }`) 133 | await fs.copy(src, dest, file.exclude !== undefined && { filter: filterFunc }) 134 | } 135 | 136 | 137 | // If it is a directory and deleteOrphaned is enabled - check if there are any files that were removed from source dir and remove them in destination dir 138 | if (deleteOrphaned) { 139 | 140 | const srcFileList = await readfiles(src, { readContents: false, hidden: true }) 141 | const destFileList = await readfiles(dest, { readContents: false, hidden: true }) 142 | 143 | for (const destFile of destFileList) { 144 | if (destFile.startsWith('.git')) return 145 | if (srcFileList.indexOf(destFile) === -1) { 146 | const filePath = path.join(dest, destFile) 147 | core.debug(`Found an orphaned file in the target repo - ${ filePath }`) 148 | 149 | if (file.exclude !== undefined && file.exclude.includes(path.join(src, destFile))) { 150 | core.debug(`Excluding file ${ destFile }`) 151 | } else { 152 | core.debug(`Removing file ${ destFile }`) 153 | await fs.remove(filePath) 154 | } 155 | } 156 | } 157 | } 158 | } 159 | 160 | export async function remove(src) { 161 | 162 | core.debug(`RM: ${ src }`) 163 | 164 | return fs.remove(src) 165 | } 166 | 167 | export function arrayEquals(array1, array2) { 168 | return Array.isArray(array1) && Array.isArray(array2) && array1.length === array2.length && array1.every((value, i) => value === array2[i]) 169 | } -------------------------------------------------------------------------------- /src/index.js: -------------------------------------------------------------------------------- 1 | import * as core from '@actions/core' 2 | import * as fs from 'fs' 3 | 4 | import Git from './git.js' 5 | import { forEach, dedent, addTrailingSlash, pathIsDirectory, copy, remove, arrayEquals } from './helpers.js' 6 | 7 | import { parseConfig, default as config } from './config.js' 8 | 9 | const { 10 | COMMIT_EACH_FILE, 11 | COMMIT_PREFIX, 12 | PR_LABELS, 13 | ASSIGNEES, 14 | DRY_RUN, 15 | TMP_DIR, 16 | SKIP_CLEANUP, 17 | OVERWRITE_EXISTING_PR, 18 | SKIP_PR, 19 | ORIGINAL_MESSAGE, 20 | COMMIT_AS_PR_TITLE, 21 | FORK, 22 | REVIEWERS, 23 | TEAM_REVIEWERS 24 | } = config 25 | 26 | async function run() { 27 | // Reuse octokit for each repo 28 | const git = new Git() 29 | 30 | const repos = await parseConfig() 31 | 32 | const prUrls = [] 33 | 34 | await forEach(repos, async (item) => { 35 | core.info(`Repository Info`) 36 | core.info(`Slug : ${ item.repo.name }`) 37 | core.info(`Owner : ${ item.repo.user }`) 38 | core.info(`Https Url : https://${ item.repo.fullName }`) 39 | core.info(`Branch : ${ item.repo.branch }`) 40 | core.info(' ') 41 | try { 42 | 43 | // Clone and setup the git repository locally 44 | await git.initRepo(item.repo) 45 | 46 | let existingPr 47 | if (SKIP_PR === false) { 48 | await git.createPrBranch() 49 | 50 | // Check for existing PR and add warning message that the PR maybe about to change 51 | existingPr = OVERWRITE_EXISTING_PR ? await git.findExistingPr() : undefined 52 | if (existingPr && DRY_RUN === false) { 53 | core.info(`Found existing PR ${ existingPr.number }`) 54 | await git.setPrWarning() 55 | } 56 | } 57 | 58 | core.info(`Locally syncing file(s) between source and target repository`) 59 | const modified = [] 60 | 61 | // Loop through all selected files of the source repo 62 | await forEach(item.files, async (file) => { 63 | const fileExists = fs.existsSync(file.source) 64 | if (fileExists === false) return core.warning(`Source ${ file.source } not found`) 65 | 66 | const localDestination = `${ git.workingDir }/${ file.dest }` 67 | 68 | const destExists = fs.existsSync(localDestination) 69 | if (destExists === true && file.replace === false) return core.warning(`File(s) already exist(s) in destination and 'replace' option is set to false`) 70 | 71 | const isDirectory = await pathIsDirectory(file.source) 72 | const source = isDirectory ? `${ addTrailingSlash(file.source) }` : file.source 73 | const dest = isDirectory ? `${ addTrailingSlash(localDestination) }` : localDestination 74 | 75 | if (isDirectory) core.info(`Source is directory`) 76 | 77 | await copy(source, dest, isDirectory, file) 78 | 79 | await git.add(file.dest) 80 | 81 | // Commit each file separately, if option is set to false commit all files at once later 82 | if (COMMIT_EACH_FILE === true) { 83 | const hasChanges = await git.hasChanges() 84 | 85 | if (hasChanges === false) return core.debug('File(s) already up to date') 86 | 87 | core.debug(`Creating commit for file(s) ${ file.dest }`) 88 | 89 | // Use different commit/pr message based on if the source is a directory or file 90 | const directory = isDirectory ? 'directory' : '' 91 | const otherFiles = isDirectory ? 'and copied all sub files/folders' : '' 92 | const useOriginalCommitMessage = ORIGINAL_MESSAGE && git.isOneCommitPush() && arrayEquals(await git.getChangesFromLastCommit(file.source), await git.changes(file.dest)) 93 | 94 | const message = { 95 | true: { 96 | commit: useOriginalCommitMessage ? git.originalCommitMessage() : `${ COMMIT_PREFIX } synced local '${ file.dest }' with remote '${ file.source }'`, 97 | pr: `synced local ${ directory } ${ file.dest } with remote ${ directory } ${ file.source }` 98 | }, 99 | false: { 100 | commit: useOriginalCommitMessage ? git.originalCommitMessage() : `${ COMMIT_PREFIX } created local '${ file.dest }' from remote '${ file.source }'`, 101 | pr: `created local ${ directory } ${ file.dest } ${ otherFiles } from remote ${ directory } ${ file.source }` 102 | } 103 | } 104 | 105 | // Commit and add file to modified array so we later know if there are any changes to actually push 106 | await git.commit(message[destExists].commit) 107 | modified.push({ 108 | dest: file.dest, 109 | source: file.source, 110 | message: message[destExists].pr, 111 | useOriginalMessage: useOriginalCommitMessage, 112 | commitMessage: message[destExists].commit 113 | }) 114 | } 115 | }) 116 | 117 | if (DRY_RUN) { 118 | core.warning('Dry run, no changes will be pushed') 119 | 120 | core.debug('Git Status:') 121 | core.debug(await git.status()) 122 | 123 | return 124 | } 125 | 126 | const hasChanges = await git.hasChanges() 127 | 128 | // If no changes left and nothing was modified we can assume nothing has changed/needs to be pushed 129 | if (hasChanges === false && modified.length < 1) { 130 | core.info('File(s) already up to date') 131 | 132 | if (existingPr) await git.removePrWarning() 133 | 134 | return 135 | } 136 | 137 | // If there are still local changes left (i.e. not committed each file separately), commit them before pushing 138 | if (hasChanges === true) { 139 | core.debug(`Creating commit for remaining files`) 140 | 141 | let useOriginalCommitMessage = ORIGINAL_MESSAGE && git.isOneCommitPush() 142 | if (useOriginalCommitMessage) { 143 | await forEach(item.files, async (file) => { 144 | useOriginalCommitMessage = useOriginalCommitMessage && arrayEquals(await git.getChangesFromLastCommit(file.source), await git.changes(file.dest)) 145 | }) 146 | } 147 | 148 | const commitMessage = useOriginalCommitMessage ? git.originalCommitMessage() : undefined 149 | await git.commit(commitMessage) 150 | modified.push({ 151 | dest: git.workingDir, 152 | useOriginalMessage: useOriginalCommitMessage, 153 | commitMessage: commitMessage 154 | }) 155 | } 156 | 157 | core.info(`Pushing changes to target repository`) 158 | await git.push() 159 | 160 | if (SKIP_PR === false) { 161 | // If each file was committed separately, list them in the PR description 162 | const changedFiles = dedent(` 163 |
164 | Changed files 165 |
    166 | ${ modified.map((file) => `
  • ${ file.message }
  • `).join('') } 167 |
168 |
169 | `) 170 | 171 | const useCommitAsPRTitle = COMMIT_AS_PR_TITLE && modified.length === 1 && modified[0].useOriginalMessage 172 | const pullRequest = await git.createOrUpdatePr(COMMIT_EACH_FILE ? changedFiles : '', useCommitAsPRTitle ? modified[0].commitMessage.split('\n', 1)[0].trim() : undefined) 173 | 174 | core.notice(`Pull Request #${ pullRequest.number } created/updated: ${ pullRequest.html_url }`) 175 | prUrls.push(pullRequest.html_url) 176 | 177 | if (PR_LABELS !== undefined && PR_LABELS.length > 0 && !FORK) { 178 | core.info(`Adding label(s) "${ PR_LABELS.join(', ') }" to PR`) 179 | await git.addPrLabels(PR_LABELS) 180 | } 181 | 182 | if (ASSIGNEES !== undefined && ASSIGNEES.length > 0 && !FORK) { 183 | core.info(`Adding assignee(s) "${ ASSIGNEES.join(', ') }" to PR`) 184 | await git.addPrAssignees(ASSIGNEES) 185 | } 186 | 187 | if (REVIEWERS !== undefined && REVIEWERS.length > 0 && !FORK) { 188 | core.info(`Adding reviewer(s) "${ REVIEWERS.join(', ') }" to PR`) 189 | await git.addPrReviewers(REVIEWERS) 190 | } 191 | 192 | if (TEAM_REVIEWERS !== undefined && TEAM_REVIEWERS.length > 0 && !FORK) { 193 | core.info(`Adding team reviewer(s) "${ TEAM_REVIEWERS.join(', ') }" to PR`) 194 | await git.addPrTeamReviewers(TEAM_REVIEWERS) 195 | } 196 | } 197 | 198 | core.info(' ') 199 | } catch (err) { 200 | core.setFailed(err.message) 201 | core.debug(err) 202 | } 203 | }) 204 | 205 | // If we created any PRs, set their URLs as the output 206 | if (prUrls) { 207 | core.setOutput('pull_request_urls', prUrls) 208 | } 209 | 210 | if (SKIP_CLEANUP === true) { 211 | core.info('Skipping cleanup') 212 | return 213 | } 214 | 215 | await remove(TMP_DIR) 216 | core.info('Cleanup complete') 217 | } 218 | 219 | run() 220 | .catch((err) => { 221 | core.setFailed(err.message) 222 | core.debug(err) 223 | }) --------------------------------------------------------------------------------