├── .github └── workflows │ ├── publish.yml │ └── update.yml ├── .gitignore ├── LICENSE ├── README.md ├── action.yml ├── package-lock.json ├── package.json ├── src └── index.ts └── tsconfig.json /.github/workflows/publish.yml: -------------------------------------------------------------------------------- 1 | name: Publish 2 | 3 | on: 4 | release: 5 | types: [published, edited] 6 | 7 | jobs: 8 | build: 9 | runs-on: ubuntu-latest 10 | steps: 11 | - name: Checkout 12 | uses: actions/checkout@v2 13 | with: 14 | ref: ${{ github.event.release.tag_name }} 15 | - run: npm ci 16 | - run: npm run build 17 | - uses: JasonEtco/build-and-tag-action@v2 18 | env: 19 | GITHUB_TOKEN: ${{ github.token }} -------------------------------------------------------------------------------- /.github/workflows/update.yml: -------------------------------------------------------------------------------- 1 | name: Update this repo's README 2 | 3 | on: 4 | schedule: 5 | # Once a day at 8 AM 6 | - cron: 0 8 * * * 7 | push: 8 | branches: 9 | - main 10 | 11 | jobs: 12 | update: 13 | runs-on: ubuntu-latest 14 | steps: 15 | - uses: JasonEtco/rss-to-readme@v1 16 | with: 17 | feed-url: https://jasonet.co/rss.xml 18 | readme-section: example 19 | branch: main 20 | 21 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | lerna-debug.log* 8 | 9 | # Diagnostic reports (https://nodejs.org/api/report.html) 10 | report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json 11 | 12 | # Runtime data 13 | pids 14 | *.pid 15 | *.seed 16 | *.pid.lock 17 | 18 | # Directory for instrumented libs generated by jscoverage/JSCover 19 | lib-cov 20 | 21 | # Coverage directory used by tools like istanbul 22 | coverage 23 | *.lcov 24 | 25 | # nyc test coverage 26 | .nyc_output 27 | 28 | # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) 29 | .grunt 30 | 31 | # Bower dependency directory (https://bower.io/) 32 | bower_components 33 | 34 | # node-waf configuration 35 | .lock-wscript 36 | 37 | # Compiled binary addons (https://nodejs.org/api/addons.html) 38 | build/Release 39 | 40 | # Dependency directories 41 | node_modules/ 42 | jspm_packages/ 43 | 44 | # Snowpack dependency directory (https://snowpack.dev/) 45 | web_modules/ 46 | 47 | # TypeScript cache 48 | *.tsbuildinfo 49 | 50 | # Optional npm cache directory 51 | .npm 52 | 53 | # Optional eslint cache 54 | .eslintcache 55 | 56 | # Microbundle cache 57 | .rpt2_cache/ 58 | .rts2_cache_cjs/ 59 | .rts2_cache_es/ 60 | .rts2_cache_umd/ 61 | 62 | # Optional REPL history 63 | .node_repl_history 64 | 65 | # Output of 'npm pack' 66 | *.tgz 67 | 68 | # Yarn Integrity file 69 | .yarn-integrity 70 | 71 | # dotenv environment variables file 72 | .env 73 | .env.test 74 | 75 | # parcel-bundler cache (https://parceljs.org/) 76 | .cache 77 | .parcel-cache 78 | 79 | # Next.js build output 80 | .next 81 | out 82 | 83 | # Nuxt.js build / generate output 84 | .nuxt 85 | dist 86 | 87 | # Gatsby files 88 | .cache/ 89 | # Comment in the public line in if your project uses Gatsby and not Next.js 90 | # https://nextjs.org/blog/next-9-1#public-directory-support 91 | # public 92 | 93 | # vuepress build output 94 | .vuepress/dist 95 | 96 | # Serverless directories 97 | .serverless/ 98 | 99 | # FuseBox cache 100 | .fusebox/ 101 | 102 | # DynamoDB Local files 103 | .dynamodb/ 104 | 105 | # TernJS port file 106 | .tern-port 107 | 108 | # Stores VSCode versions used for testing VSCode extensions 109 | .vscode-test 110 | 111 | # yarn v2 112 | .yarn/cache 113 | .yarn/unplugged 114 | .yarn/build-state.yml 115 | .yarn/install-state.gz 116 | .pnp.* 117 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License Copyright (c) 2020 Jason Etcovitch 2 | 3 | Permission is hereby granted, 4 | free of charge, to any person obtaining a copy of this software and associated 5 | documentation files (the "Software"), to deal in the Software without 6 | restriction, including without limitation the rights to use, copy, modify, merge, 7 | publish, distribute, sublicense, and/or sell copies of the Software, and to 8 | permit persons to whom the Software is furnished to do so, subject to the 9 | following conditions: 10 | 11 | The above copyright notice and this permission notice 12 | (including the next paragraph) shall be included in all copies or substantial 13 | portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF 16 | ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 17 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO 18 | EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR 19 | OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 20 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |
A GitHub Action that updates a section of a README from an RSS feed.
4 | 5 | --- 6 | 7 | ## Usage 8 | 9 | You can use this action in a workflow file like any other: 10 | 11 | ```yml 12 | name: Update this repo's README 13 | 14 | on: 15 | schedule: 16 | # Once a day at 8 AM 17 | - cron: 0 8 * * * 18 | 19 | jobs: 20 | update: 21 | runs-on: ubuntu-latest 22 | steps: 23 | - uses: JasonEtco/rss-to-readme@v1 24 | with: 25 | feed-url: https://jasonet.co/rss.xml 26 | readme-section: feed 27 | ``` 28 | 29 | ### Options 30 | 31 | #### `feed-url`: 32 | 33 | The URL to an RSS feed. It's assumed that the RSS feed follow the standard format! 34 | 35 | #### `readme-section`: 36 | 37 | The name of the section of your README to update. This uses [`JasonEtco/readme-box`](https://github.com/JasonEtco/readme-box) to replace a section of the README and update the file. Your README should contain HTML comments like this, where `feed` is the the value of `readme-section`: 38 | 39 | ```html 40 | ### Example RSS feed: 41 | 42 | 43 | ... 44 | 45 | ``` 46 | 47 | You can inspect this repo's README to see it in use! 48 | 49 | #### `empty-commits`: (default: true) 50 | 51 | Set this to `false` to not commit anything when this action run but the section didn't change. 52 | 53 | #### `max` (default: 5) 54 | 55 | The maximum number of items to show from the RSS feed. Defaults to `5`! 56 | 57 | #### `template` (default: `"* [{{ title }}]({{ link }}))"`) 58 | 59 | You can provide a [Mustache](https://github.com/janl/mustache.js) template to use when rendering each item in the feed. These will be joined by a newline (`\n`). For example: 60 | 61 | ```yaml 62 | - uses: JasonEtco/rss-to-readme@v1 63 | with: 64 | feed-url: https://jasonet.co/rss.xml 65 | template: "> {{ excerpt }}\n\n[Read more!]({{ url }})" 66 | ``` 67 | 68 | #### `branch` (default: github.repository.default_branch) 69 | 70 | You can provide the target branch to update instead of the default. 71 | 72 | #### `path` (default: 'README.md') 73 | 74 | Path to the README file to update. 75 | 76 | ### Example RSS feed: 77 | 78 | 79 | * [CODEOWNERS-driven file organization](https://jasonet.co/posts/codeowners-driven-organization/) 80 | * [Remix first impressions](https://jasonet.co/posts/remix-first-impressions/) 81 | * [On "Spike work"](https://jasonet.co/posts/on-spike-work/) 82 | * [Assorted thoughts on documentation](https://jasonet.co/posts/thoughts-on-docs/) 83 | * [On "lurking"](https://jasonet.co/posts/on-lurking/) 84 | 85 | 86 | > This started as a little proof-of-concept for @brianlovin! 87 | -------------------------------------------------------------------------------- /action.yml: -------------------------------------------------------------------------------- 1 | name: RSS to README 2 | description: Replaces a section of the repo's README with the contents of an RSS feed 3 | inputs: 4 | feed-url: 5 | required: true 6 | description: A URL to an RSS feed. 7 | readme-section: 8 | required: true 9 | description: The name of the section of the README to update. 10 | max: 11 | default: 5 12 | description: The maximum number of RSS feed items to show. 13 | template: 14 | default: '* [{{ title }}]({{ link }})' 15 | description: The template to use for each item in the RSS feed. These are joined by a new line. 16 | path: 17 | default: 'README.md' 18 | description: The path to the README file 19 | github_token: 20 | default: ${{ github.token }} 21 | branch: 22 | default: ${{ github.event.repository.default_branch }} 23 | description: The target branch to update. 24 | empty-commits: 25 | default: 'true' 26 | description: set to `false` to disallow empty commits when there are no changes 27 | required: false 28 | runs: 29 | using: node12 30 | main: dist/index.js 31 | branding: 32 | icon: activity 33 | color: red 34 | -------------------------------------------------------------------------------- /package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "rss-to-readme-action", 3 | "requires": true, 4 | "lockfileVersion": 1, 5 | "dependencies": { 6 | "@actions/core": { 7 | "version": "1.2.6", 8 | "resolved": "https://registry.npmjs.org/@actions/core/-/core-1.2.6.tgz", 9 | "integrity": "sha512-ZQYitnqiyBc3D+k7LsgSBmMDVkOVidaagDG7j3fOym77jNunWRuYx7VSHa9GNfFZh+zh61xsCjRj4JxMZlDqTA==" 10 | }, 11 | "@actions/exec": { 12 | "version": "1.0.4", 13 | "resolved": "https://registry.npmjs.org/@actions/exec/-/exec-1.0.4.tgz", 14 | "integrity": "sha512-4DPChWow9yc9W3WqEbUj8Nr86xkpyE29ZzWjXucHItclLbEW6jr80Zx4nqv18QL6KK65+cifiQZXvnqgTV6oHw==", 15 | "requires": { 16 | "@actions/io": "^1.0.1" 17 | } 18 | }, 19 | "@actions/io": { 20 | "version": "1.0.2", 21 | "resolved": "https://registry.npmjs.org/@actions/io/-/io-1.0.2.tgz", 22 | "integrity": "sha512-J8KuFqVPr3p6U8W93DOXlXW6zFvrQAJANdS+vw0YhusLIq+bszW8zmK2Fh1C2kDPX8FMvwIl1OUcFgvJoXLbAg==" 23 | }, 24 | "@octokit/auth-token": { 25 | "version": "2.4.1", 26 | "resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-2.4.1.tgz", 27 | "integrity": "sha512-NB81O5h39KfHYGtgfWr2booRxp2bWOJoqbWwbyUg2hw6h35ArWYlAST5B3XwAkbdcx13yt84hFXyFP5X0QToWA==", 28 | "requires": { 29 | "@octokit/types": "^4.0.1" 30 | } 31 | }, 32 | "@octokit/core": { 33 | "version": "2.5.3", 34 | "resolved": "https://registry.npmjs.org/@octokit/core/-/core-2.5.3.tgz", 35 | "integrity": "sha512-23AHK9xBW0v79Ck8h5U+5iA4MW7aosqv+Yr6uZXolVGNzzHwryNH5wM386/6+etiKUTwLFZTqyMU9oQpIBZcFA==", 36 | "requires": { 37 | "@octokit/auth-token": "^2.4.0", 38 | "@octokit/graphql": "^4.3.1", 39 | "@octokit/request": "^5.4.0", 40 | "@octokit/types": "^4.0.1", 41 | "before-after-hook": "^2.1.0", 42 | "universal-user-agent": "^5.0.0" 43 | } 44 | }, 45 | "@octokit/endpoint": { 46 | "version": "6.0.2", 47 | "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-6.0.2.tgz", 48 | "integrity": "sha512-xs1mmCEZ2y4shXCpFjNq3UbmNR+bLzxtZim2L0zfEtj9R6O6kc4qLDvYw66hvO6lUsYzPTM5hMkltbuNAbRAcQ==", 49 | "requires": { 50 | "@octokit/types": "^4.0.1", 51 | "is-plain-object": "^3.0.0", 52 | "universal-user-agent": "^5.0.0" 53 | } 54 | }, 55 | "@octokit/graphql": { 56 | "version": "4.5.0", 57 | "resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-4.5.0.tgz", 58 | "integrity": "sha512-StJWfn0M1QfhL3NKBz31e1TdDNZrHLLS57J2hin92SIfzlOVBuUaRkp31AGkGOAFOAVtyEX6ZiZcsjcJDjeb5g==", 59 | "requires": { 60 | "@octokit/request": "^5.3.0", 61 | "@octokit/types": "^4.0.1", 62 | "universal-user-agent": "^5.0.0" 63 | } 64 | }, 65 | "@octokit/openapi-types": { 66 | "version": "9.6.0", 67 | "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-9.6.0.tgz", 68 | "integrity": "sha512-L+8x7DpcNtHkMbTxxCxg3cozvHUNP46rOIzFwoMs0piWwQzAGNXqlIQO2GLvnKTWLUh99DkY+UyHVrP4jXlowg==" 69 | }, 70 | "@octokit/plugin-paginate-rest": { 71 | "version": "2.2.1", 72 | "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-2.2.1.tgz", 73 | "integrity": "sha512-/tHpIF2XpN40AyhIq295YRjb4g7Q5eKob0qM3thYJ0Z+CgmNsWKM/fWse/SUR8+LdprP1O4ZzSKQE+71TCwK+w==", 74 | "requires": { 75 | "@octokit/types": "^4.0.1" 76 | } 77 | }, 78 | "@octokit/plugin-request-log": { 79 | "version": "1.0.0", 80 | "resolved": "https://registry.npmjs.org/@octokit/plugin-request-log/-/plugin-request-log-1.0.0.tgz", 81 | "integrity": "sha512-ywoxP68aOT3zHCLgWZgwUJatiENeHE7xJzYjfz8WI0goynp96wETBF+d95b8g/uL4QmS6owPVlaxiz3wyMAzcw==" 82 | }, 83 | "@octokit/plugin-rest-endpoint-methods": { 84 | "version": "3.17.0", 85 | "resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-3.17.0.tgz", 86 | "integrity": "sha512-NFV3vq7GgoO2TrkyBRUOwflkfTYkFKS0tLAPym7RNpkwLCttqShaEGjthOsPEEL+7LFcYv3mU24+F2yVd3npmg==", 87 | "requires": { 88 | "@octokit/types": "^4.1.6", 89 | "deprecation": "^2.3.1" 90 | }, 91 | "dependencies": { 92 | "@octokit/types": { 93 | "version": "4.1.9", 94 | "resolved": "https://registry.npmjs.org/@octokit/types/-/types-4.1.9.tgz", 95 | "integrity": "sha512-hinM/BA2c1vebN2HSR3JtVdYtrSbmvn/doUBZXXuQuh/9o60hYwitQQAGTpJu+k6pjtjURskDHQxUFvqLvYCeA==", 96 | "requires": { 97 | "@types/node": ">= 8" 98 | } 99 | } 100 | } 101 | }, 102 | "@octokit/request": { 103 | "version": "5.6.0", 104 | "resolved": "https://registry.npmjs.org/@octokit/request/-/request-5.6.0.tgz", 105 | "integrity": "sha512-4cPp/N+NqmaGQwbh3vUsYqokQIzt7VjsgTYVXiwpUP2pxd5YiZB2XuTedbb0SPtv9XS7nzAKjAuQxmY8/aZkiA==", 106 | "requires": { 107 | "@octokit/endpoint": "^6.0.1", 108 | "@octokit/request-error": "^2.1.0", 109 | "@octokit/types": "^6.16.1", 110 | "is-plain-object": "^5.0.0", 111 | "node-fetch": "^2.6.1", 112 | "universal-user-agent": "^6.0.0" 113 | }, 114 | "dependencies": { 115 | "@octokit/types": { 116 | "version": "6.25.0", 117 | "resolved": "https://registry.npmjs.org/@octokit/types/-/types-6.25.0.tgz", 118 | "integrity": "sha512-bNvyQKfngvAd/08COlYIN54nRgxskmejgywodizQNyiKoXmWRAjKup2/LYwm+T9V0gsKH6tuld1gM0PzmOiB4Q==", 119 | "requires": { 120 | "@octokit/openapi-types": "^9.5.0" 121 | } 122 | }, 123 | "is-plain-object": { 124 | "version": "5.0.0", 125 | "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.0.0.tgz", 126 | "integrity": "sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==" 127 | }, 128 | "universal-user-agent": { 129 | "version": "6.0.0", 130 | "resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-6.0.0.tgz", 131 | "integrity": "sha512-isyNax3wXoKaulPDZWHQqbmIx1k2tb9fb3GGDBRxCscfYV2Ch7WxPArBsFEG8s/safwXTT7H4QGhaIkTp9447w==" 132 | } 133 | } 134 | }, 135 | "@octokit/request-error": { 136 | "version": "2.1.0", 137 | "resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-2.1.0.tgz", 138 | "integrity": "sha512-1VIvgXxs9WHSjicsRwq8PlR2LR2x6DwsJAaFgzdi0JfJoGSO8mYI/cHJQ+9FbN21aa+DrgNLnwObmyeSC8Rmpg==", 139 | "requires": { 140 | "@octokit/types": "^6.0.3", 141 | "deprecation": "^2.0.0", 142 | "once": "^1.4.0" 143 | }, 144 | "dependencies": { 145 | "@octokit/types": { 146 | "version": "6.25.0", 147 | "resolved": "https://registry.npmjs.org/@octokit/types/-/types-6.25.0.tgz", 148 | "integrity": "sha512-bNvyQKfngvAd/08COlYIN54nRgxskmejgywodizQNyiKoXmWRAjKup2/LYwm+T9V0gsKH6tuld1gM0PzmOiB4Q==", 149 | "requires": { 150 | "@octokit/openapi-types": "^9.5.0" 151 | } 152 | } 153 | } 154 | }, 155 | "@octokit/rest": { 156 | "version": "17.11.0", 157 | "resolved": "https://registry.npmjs.org/@octokit/rest/-/rest-17.11.0.tgz", 158 | "integrity": "sha512-WqXmm37uCGP1NxYxSc27hd5pYNLdksuUsjR8vaNS8fCy6kyxZFy+Dbh/AzqKGj2mOdbnt7dILoGHfzsA4IIm4A==", 159 | "requires": { 160 | "@octokit/core": "^2.4.3", 161 | "@octokit/plugin-paginate-rest": "^2.2.0", 162 | "@octokit/plugin-request-log": "^1.0.0", 163 | "@octokit/plugin-rest-endpoint-methods": "3.17.0" 164 | } 165 | }, 166 | "@octokit/types": { 167 | "version": "4.0.2", 168 | "resolved": "https://registry.npmjs.org/@octokit/types/-/types-4.0.2.tgz", 169 | "integrity": "sha512-+4X6qfhT/fk/5FD66395NrFLxCzD6FsGlpPwfwvnukdyfYbhiZB/FJltiT1XM5Q63rGGBSf9FPaNV3WpNHm54A==", 170 | "requires": { 171 | "@types/node": ">= 8" 172 | } 173 | }, 174 | "@types/flat-cache": { 175 | "version": "2.0.0", 176 | "resolved": "https://registry.npmjs.org/@types/flat-cache/-/flat-cache-2.0.0.tgz", 177 | "integrity": "sha512-fHeEsm9hvmZ+QHpw6Fkvf19KIhuqnYLU6vtWLjd5BsMd/qVi7iTkMioDZl0mQmfNRA1A6NwvhrSRNr9hGYZGww==" 178 | }, 179 | "@types/minimist": { 180 | "version": "1.2.0", 181 | "resolved": "https://registry.npmjs.org/@types/minimist/-/minimist-1.2.0.tgz", 182 | "integrity": "sha1-aaI6OtKcrwCX8G7aWbNh7i8GOfY=" 183 | }, 184 | "@types/node": { 185 | "version": "14.0.5", 186 | "resolved": "https://registry.npmjs.org/@types/node/-/node-14.0.5.tgz", 187 | "integrity": "sha512-90hiq6/VqtQgX8Sp0EzeIsv3r+ellbGj4URKj5j30tLlZvRUpnAe9YbYnjl3pJM93GyXU0tghHhvXHq+5rnCKA==" 188 | }, 189 | "@types/nunjucks": { 190 | "version": "3.1.5", 191 | "resolved": "https://registry.npmjs.org/@types/nunjucks/-/nunjucks-3.1.5.tgz", 192 | "integrity": "sha512-0zEdmQNNvQ+xyV9kqQvAV93UVroTwhE78toVUDT0GBnGcW2jQBZnB4al9qq2LqI5qHOqROy/DvvAY/UwrbvV1A==", 193 | "dev": true 194 | }, 195 | "@types/signale": { 196 | "version": "1.4.1", 197 | "resolved": "https://registry.npmjs.org/@types/signale/-/signale-1.4.1.tgz", 198 | "integrity": "sha512-05d9fUDqRnt36rizLgo38SbPTrkMzdhXpvSHSAhxzokgIUPGNUoXHV0zYjPpTd4IryDADJ0mGHpfJ/Yhjyh9JQ==", 199 | "requires": { 200 | "@types/node": "*" 201 | } 202 | }, 203 | "@vercel/ncc": { 204 | "version": "0.30.0", 205 | "resolved": "https://registry.npmjs.org/@vercel/ncc/-/ncc-0.30.0.tgz", 206 | "integrity": "sha512-16ePj2GkwjomvE0HLL5ny+d+sudOwvZNYW8vjpMh3cyWdFxoMI8KSQiolVxeHBULbU1C5mVxLK5nL9NtnnpIew==", 207 | "dev": true 208 | }, 209 | "a-sync-waterfall": { 210 | "version": "1.0.1", 211 | "resolved": "https://registry.npmjs.org/a-sync-waterfall/-/a-sync-waterfall-1.0.1.tgz", 212 | "integrity": "sha512-RYTOHHdWipFUliRFMCS4X2Yn2X8M87V/OpSqWzKKOGhzqyUxzyVmhHDH9sAvG+ZuQf/TAOFsLCpMw09I1ufUnA==" 213 | }, 214 | "actions-toolkit": { 215 | "version": "6.0.1", 216 | "resolved": "https://registry.npmjs.org/actions-toolkit/-/actions-toolkit-6.0.1.tgz", 217 | "integrity": "sha512-a/ZA0+qY8YSUrzm0yLspLGFwmDG5uRJ8YaESD3Nlxi7u+pCWasxpChLYa/hlGkLt69I58VcdJKx7d9A+7kqoew==", 218 | "requires": { 219 | "@actions/core": "^1.2.4", 220 | "@actions/exec": "^1.0.4", 221 | "@octokit/rest": "^17.9.0", 222 | "@types/flat-cache": "^2.0.0", 223 | "@types/minimist": "^1.2.0", 224 | "@types/signale": "^1.4.1", 225 | "enquirer": "^2.3.5", 226 | "minimist": "^1.2.5", 227 | "signale": "^1.4.0" 228 | } 229 | }, 230 | "ansi-colors": { 231 | "version": "3.2.4", 232 | "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.4.tgz", 233 | "integrity": "sha512-hHUXGagefjN2iRrID63xckIvotOXOojhQKWIPUZ4mNUZ9nLZW+7FMNoE1lOkEhNWYsx/7ysGIuJYCiMAA9FnrA==" 234 | }, 235 | "ansi-styles": { 236 | "version": "3.2.1", 237 | "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", 238 | "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", 239 | "requires": { 240 | "color-convert": "^1.9.0" 241 | } 242 | }, 243 | "asap": { 244 | "version": "2.0.6", 245 | "resolved": "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz", 246 | "integrity": "sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY=" 247 | }, 248 | "before-after-hook": { 249 | "version": "2.1.0", 250 | "resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.1.0.tgz", 251 | "integrity": "sha512-IWIbu7pMqyw3EAJHzzHbWa85b6oud/yfKYg5rqB5hNE8CeMi3nX+2C2sj0HswfblST86hpVEOAb9x34NZd6P7A==" 252 | }, 253 | "chalk": { 254 | "version": "2.4.2", 255 | "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", 256 | "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", 257 | "requires": { 258 | "ansi-styles": "^3.2.1", 259 | "escape-string-regexp": "^1.0.5", 260 | "supports-color": "^5.3.0" 261 | } 262 | }, 263 | "color-convert": { 264 | "version": "1.9.3", 265 | "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", 266 | "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", 267 | "requires": { 268 | "color-name": "1.1.3" 269 | } 270 | }, 271 | "color-name": { 272 | "version": "1.1.3", 273 | "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", 274 | "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" 275 | }, 276 | "commander": { 277 | "version": "5.1.0", 278 | "resolved": "https://registry.npmjs.org/commander/-/commander-5.1.0.tgz", 279 | "integrity": "sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg==" 280 | }, 281 | "cross-spawn": { 282 | "version": "6.0.5", 283 | "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", 284 | "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", 285 | "requires": { 286 | "nice-try": "^1.0.4", 287 | "path-key": "^2.0.1", 288 | "semver": "^5.5.0", 289 | "shebang-command": "^1.2.0", 290 | "which": "^1.2.9" 291 | } 292 | }, 293 | "deprecation": { 294 | "version": "2.3.1", 295 | "resolved": "https://registry.npmjs.org/deprecation/-/deprecation-2.3.1.tgz", 296 | "integrity": "sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ==" 297 | }, 298 | "end-of-stream": { 299 | "version": "1.4.4", 300 | "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", 301 | "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", 302 | "requires": { 303 | "once": "^1.4.0" 304 | } 305 | }, 306 | "enquirer": { 307 | "version": "2.3.5", 308 | "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.5.tgz", 309 | "integrity": "sha512-BNT1C08P9XD0vNg3J475yIUG+mVdp9T6towYFHUv897X0KoHBjB1shyrNmhmtHWKP17iSWgo7Gqh7BBuzLZMSA==", 310 | "requires": { 311 | "ansi-colors": "^3.2.1" 312 | } 313 | }, 314 | "entities": { 315 | "version": "2.2.0", 316 | "resolved": "https://registry.npmjs.org/entities/-/entities-2.2.0.tgz", 317 | "integrity": "sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A==" 318 | }, 319 | "error-ex": { 320 | "version": "1.3.2", 321 | "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", 322 | "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", 323 | "requires": { 324 | "is-arrayish": "^0.2.1" 325 | } 326 | }, 327 | "escape-string-regexp": { 328 | "version": "1.0.5", 329 | "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", 330 | "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" 331 | }, 332 | "figures": { 333 | "version": "2.0.0", 334 | "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz", 335 | "integrity": "sha1-OrGi0qYsi/tDGgyUy3l6L84nyWI=", 336 | "requires": { 337 | "escape-string-regexp": "^1.0.5" 338 | } 339 | }, 340 | "find-up": { 341 | "version": "2.1.0", 342 | "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", 343 | "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", 344 | "requires": { 345 | "locate-path": "^2.0.0" 346 | } 347 | }, 348 | "get-stream": { 349 | "version": "4.1.0", 350 | "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", 351 | "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", 352 | "requires": { 353 | "pump": "^3.0.0" 354 | } 355 | }, 356 | "graceful-fs": { 357 | "version": "4.2.4", 358 | "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.4.tgz", 359 | "integrity": "sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw==" 360 | }, 361 | "has-flag": { 362 | "version": "3.0.0", 363 | "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", 364 | "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=" 365 | }, 366 | "is-arrayish": { 367 | "version": "0.2.1", 368 | "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", 369 | "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=" 370 | }, 371 | "is-plain-object": { 372 | "version": "3.0.0", 373 | "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-3.0.0.tgz", 374 | "integrity": "sha512-tZIpofR+P05k8Aocp7UI/2UTa9lTJSebCXpFFoR9aibpokDj/uXBsJ8luUu0tTVYKkMU6URDUuOfJZ7koewXvg==", 375 | "requires": { 376 | "isobject": "^4.0.0" 377 | } 378 | }, 379 | "is-stream": { 380 | "version": "1.1.0", 381 | "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", 382 | "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=" 383 | }, 384 | "isexe": { 385 | "version": "2.0.0", 386 | "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", 387 | "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=" 388 | }, 389 | "isobject": { 390 | "version": "4.0.0", 391 | "resolved": "https://registry.npmjs.org/isobject/-/isobject-4.0.0.tgz", 392 | "integrity": "sha512-S/2fF5wH8SJA/kmwr6HYhK/RI/OkhD84k8ntalo0iJjZikgq1XFvR5M8NPT1x5F7fBwCG3qHfnzeP/Vh/ZxCUA==" 393 | }, 394 | "json-parse-better-errors": { 395 | "version": "1.0.2", 396 | "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", 397 | "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==" 398 | }, 399 | "load-json-file": { 400 | "version": "4.0.0", 401 | "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", 402 | "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=", 403 | "requires": { 404 | "graceful-fs": "^4.1.2", 405 | "parse-json": "^4.0.0", 406 | "pify": "^3.0.0", 407 | "strip-bom": "^3.0.0" 408 | } 409 | }, 410 | "locate-path": { 411 | "version": "2.0.0", 412 | "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", 413 | "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", 414 | "requires": { 415 | "p-locate": "^2.0.0", 416 | "path-exists": "^3.0.0" 417 | } 418 | }, 419 | "macos-release": { 420 | "version": "2.3.0", 421 | "resolved": "https://registry.npmjs.org/macos-release/-/macos-release-2.3.0.tgz", 422 | "integrity": "sha512-OHhSbtcviqMPt7yfw5ef5aghS2jzFVKEFyCJndQt2YpSQ9qRVSEv2axSJI1paVThEu+FFGs584h/1YhxjVqajA==" 423 | }, 424 | "minimist": { 425 | "version": "1.2.5", 426 | "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", 427 | "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==" 428 | }, 429 | "moment": { 430 | "version": "2.29.1", 431 | "resolved": "https://registry.npmjs.org/moment/-/moment-2.29.1.tgz", 432 | "integrity": "sha512-kHmoybcPV8Sqy59DwNDY3Jefr64lK/by/da0ViFcuA4DH0vQg5Q6Ze5VimxkfQNSC+Mls/Kx53s7TjP1RhFEDQ==" 433 | }, 434 | "nice-try": { 435 | "version": "1.0.5", 436 | "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", 437 | "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==" 438 | }, 439 | "node-fetch": { 440 | "version": "2.6.1", 441 | "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.1.tgz", 442 | "integrity": "sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw==" 443 | }, 444 | "npm-run-path": { 445 | "version": "2.0.2", 446 | "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", 447 | "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", 448 | "requires": { 449 | "path-key": "^2.0.0" 450 | } 451 | }, 452 | "nunjucks": { 453 | "version": "3.2.3", 454 | "resolved": "https://registry.npmjs.org/nunjucks/-/nunjucks-3.2.3.tgz", 455 | "integrity": "sha512-psb6xjLj47+fE76JdZwskvwG4MYsQKXUtMsPh6U0YMvmyjRtKRFcxnlXGWglNybtNTNVmGdp94K62/+NjF5FDQ==", 456 | "requires": { 457 | "a-sync-waterfall": "^1.0.0", 458 | "asap": "^2.0.3", 459 | "commander": "^5.1.0" 460 | } 461 | }, 462 | "nunjucks-date-filter": { 463 | "version": "0.1.1", 464 | "resolved": "https://registry.npmjs.org/nunjucks-date-filter/-/nunjucks-date-filter-0.1.1.tgz", 465 | "integrity": "sha1-qTbUTSzJiY2Vxqt7KrpwhPpgq6Y=", 466 | "requires": { 467 | "moment": "^2.9.0" 468 | } 469 | }, 470 | "once": { 471 | "version": "1.4.0", 472 | "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", 473 | "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", 474 | "requires": { 475 | "wrappy": "1" 476 | } 477 | }, 478 | "os-name": { 479 | "version": "3.1.0", 480 | "resolved": "https://registry.npmjs.org/os-name/-/os-name-3.1.0.tgz", 481 | "integrity": "sha512-h8L+8aNjNcMpo/mAIBPn5PXCM16iyPGjHNWo6U1YO8sJTMHtEtyczI6QJnLoplswm6goopQkqc7OAnjhWcugVg==", 482 | "requires": { 483 | "macos-release": "^2.2.0", 484 | "windows-release": "^3.1.0" 485 | } 486 | }, 487 | "p-finally": { 488 | "version": "1.0.0", 489 | "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", 490 | "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=" 491 | }, 492 | "p-limit": { 493 | "version": "1.3.0", 494 | "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", 495 | "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", 496 | "requires": { 497 | "p-try": "^1.0.0" 498 | } 499 | }, 500 | "p-locate": { 501 | "version": "2.0.0", 502 | "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", 503 | "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", 504 | "requires": { 505 | "p-limit": "^1.1.0" 506 | } 507 | }, 508 | "p-try": { 509 | "version": "1.0.0", 510 | "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", 511 | "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=" 512 | }, 513 | "parse-json": { 514 | "version": "4.0.0", 515 | "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", 516 | "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", 517 | "requires": { 518 | "error-ex": "^1.3.1", 519 | "json-parse-better-errors": "^1.0.1" 520 | } 521 | }, 522 | "path-exists": { 523 | "version": "3.0.0", 524 | "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", 525 | "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=" 526 | }, 527 | "path-key": { 528 | "version": "2.0.1", 529 | "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", 530 | "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=" 531 | }, 532 | "pify": { 533 | "version": "3.0.0", 534 | "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", 535 | "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=" 536 | }, 537 | "pkg-conf": { 538 | "version": "2.1.0", 539 | "resolved": "https://registry.npmjs.org/pkg-conf/-/pkg-conf-2.1.0.tgz", 540 | "integrity": "sha1-ISZRTKbyq/69FoWW3xi6V4Z/AFg=", 541 | "requires": { 542 | "find-up": "^2.0.0", 543 | "load-json-file": "^4.0.0" 544 | } 545 | }, 546 | "pump": { 547 | "version": "3.0.0", 548 | "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", 549 | "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", 550 | "requires": { 551 | "end-of-stream": "^1.1.0", 552 | "once": "^1.3.1" 553 | } 554 | }, 555 | "readme-box": { 556 | "version": "1.0.0", 557 | "resolved": "https://registry.npmjs.org/readme-box/-/readme-box-1.0.0.tgz", 558 | "integrity": "sha512-K21EJmOeXf112jmIFI95b8m4swqqOWY62wBJ/h8QexWKhDBXoWlQ6REAYiQCO9vjPOJLxNBbXe44IGIrRPkRpw==", 559 | "requires": { 560 | "@octokit/request": "^5.6.0" 561 | } 562 | }, 563 | "rss-parser": { 564 | "version": "3.12.0", 565 | "resolved": "https://registry.npmjs.org/rss-parser/-/rss-parser-3.12.0.tgz", 566 | "integrity": "sha512-aqD3E8iavcCdkhVxNDIdg1nkBI17jgqF+9OqPS1orwNaOgySdpvq6B+DoONLhzjzwV8mWg37sb60e4bmLK117A==", 567 | "requires": { 568 | "entities": "^2.0.3", 569 | "xml2js": "^0.4.19" 570 | } 571 | }, 572 | "sax": { 573 | "version": "1.2.4", 574 | "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", 575 | "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==" 576 | }, 577 | "semver": { 578 | "version": "5.7.1", 579 | "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", 580 | "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" 581 | }, 582 | "shebang-command": { 583 | "version": "1.2.0", 584 | "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", 585 | "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", 586 | "requires": { 587 | "shebang-regex": "^1.0.0" 588 | } 589 | }, 590 | "shebang-regex": { 591 | "version": "1.0.0", 592 | "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", 593 | "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=" 594 | }, 595 | "signal-exit": { 596 | "version": "3.0.3", 597 | "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz", 598 | "integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==" 599 | }, 600 | "signale": { 601 | "version": "1.4.0", 602 | "resolved": "https://registry.npmjs.org/signale/-/signale-1.4.0.tgz", 603 | "integrity": "sha512-iuh+gPf28RkltuJC7W5MRi6XAjTDCAPC/prJUpQoG4vIP3MJZ+GTydVnodXA7pwvTKb2cA0m9OFZW/cdWy/I/w==", 604 | "requires": { 605 | "chalk": "^2.3.2", 606 | "figures": "^2.0.0", 607 | "pkg-conf": "^2.1.0" 608 | } 609 | }, 610 | "strip-bom": { 611 | "version": "3.0.0", 612 | "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", 613 | "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=" 614 | }, 615 | "strip-eof": { 616 | "version": "1.0.0", 617 | "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", 618 | "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=" 619 | }, 620 | "supports-color": { 621 | "version": "5.5.0", 622 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", 623 | "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", 624 | "requires": { 625 | "has-flag": "^3.0.0" 626 | } 627 | }, 628 | "typescript": { 629 | "version": "4.2.2", 630 | "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.2.2.tgz", 631 | "integrity": "sha512-tbb+NVrLfnsJy3M59lsDgrzWIflR4d4TIUjz+heUnHZwdF7YsrMTKoRERiIvI2lvBG95dfpLxB21WZhys1bgaQ==", 632 | "dev": true 633 | }, 634 | "universal-user-agent": { 635 | "version": "5.0.0", 636 | "resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-5.0.0.tgz", 637 | "integrity": "sha512-B5TPtzZleXyPrUMKCpEHFmVhMN6EhmJYjG5PQna9s7mXeSqGTLap4OpqLl5FCEFUI3UBmllkETwKf/db66Y54Q==", 638 | "requires": { 639 | "os-name": "^3.1.0" 640 | } 641 | }, 642 | "which": { 643 | "version": "1.3.1", 644 | "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", 645 | "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", 646 | "requires": { 647 | "isexe": "^2.0.0" 648 | } 649 | }, 650 | "windows-release": { 651 | "version": "3.3.0", 652 | "resolved": "https://registry.npmjs.org/windows-release/-/windows-release-3.3.0.tgz", 653 | "integrity": "sha512-2HetyTg1Y+R+rUgrKeUEhAG/ZuOmTrI1NBb3ZyAGQMYmOJjBBPe4MTodghRkmLJZHwkuPi02anbeGP+Zf401LQ==", 654 | "requires": { 655 | "execa": "^1.0.0" 656 | }, 657 | "dependencies": { 658 | "execa": { 659 | "version": "1.0.0", 660 | "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz", 661 | "integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==", 662 | "requires": { 663 | "cross-spawn": "^6.0.0", 664 | "get-stream": "^4.0.0", 665 | "is-stream": "^1.1.0", 666 | "npm-run-path": "^2.0.0", 667 | "p-finally": "^1.0.0", 668 | "signal-exit": "^3.0.0", 669 | "strip-eof": "^1.0.0" 670 | } 671 | } 672 | } 673 | }, 674 | "wrappy": { 675 | "version": "1.0.2", 676 | "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", 677 | "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" 678 | }, 679 | "xml2js": { 680 | "version": "0.4.23", 681 | "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.23.tgz", 682 | "integrity": "sha512-ySPiMjM0+pLDftHgXY4By0uswI3SPKLDw/i3UXbnO8M/p28zqexCUoPmQFrYD+/1BzhGJSs2i1ERWKJAtiLrug==", 683 | "requires": { 684 | "sax": ">=0.6.0", 685 | "xmlbuilder": "~11.0.0" 686 | } 687 | }, 688 | "xmlbuilder": { 689 | "version": "11.0.1", 690 | "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-11.0.1.tgz", 691 | "integrity": "sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA==" 692 | } 693 | } 694 | } 695 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "rss-to-readme-action", 3 | "private": true, 4 | "main": "dist/index.js", 5 | "scripts": { 6 | "test": "echo \"Error: no test specified\" && exit 1", 7 | "build": "npx ncc build ./src/index.ts" 8 | }, 9 | "license": "MIT", 10 | "dependencies": { 11 | "actions-toolkit": "^6.0.1", 12 | "nunjucks": "^3.2.3", 13 | "nunjucks-date-filter": "^0.1.1", 14 | "readme-box": "^1.0.0", 15 | "rss-parser": "^3.12.0" 16 | }, 17 | "devDependencies": { 18 | "@types/nunjucks": "^3.1.5", 19 | "@vercel/ncc": "^0.30.0", 20 | "typescript": "^4.2.2" 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/index.ts: -------------------------------------------------------------------------------- 1 | import { Toolkit } from 'actions-toolkit' 2 | import { ReadmeBox } from 'readme-box' 3 | import Parser from 'rss-parser' 4 | import nunjucks from 'nunjucks' 5 | // @ts-ignore 6 | import dateFilter from 'nunjucks-date-filter' 7 | 8 | const parser = new Parser() 9 | const env = nunjucks.configure({ autoescape: false }) 10 | env.addFilter('date', dateFilter) 11 | 12 | interface Inputs { 13 | 'feed-url': string 14 | 'readme-section': string 15 | 'empty-commits': string 16 | max: string 17 | template: string 18 | branch: string 19 | [key: string]: string 20 | } 21 | 22 | async function getReadme(tools: Toolkit, branch: string, path: string) { 23 | const { data } = await tools.github.request('GET /repos/:owner/:repo/contents/:path', { 24 | ...tools.context.repo, 25 | ref: branch, 26 | path 27 | }) 28 | 29 | // The API returns the blob as base64 encoded, we need to decode it 30 | const encoded = data.content 31 | const decoded = Buffer.from(encoded, 'base64').toString('utf8') 32 | 33 | return { 34 | content: decoded, 35 | sha: data.sha 36 | } 37 | } 38 | 39 | Toolkit.run