├── .github ├── CODEOWNERS ├── ISSUE_TEMPLATE │ ├── bug_report.md │ └── feature_request.md ├── pull_request_template.md └── workflows │ └── rust-ci.yml ├── .gitignore ├── .mergify.yml ├── CHANGELOG.md ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── Cargo.lock ├── Cargo.toml ├── LICENSE-APACHE ├── LICENSE-MIT ├── README.md └── src ├── config.rs ├── config ├── template.rs └── timeframe.rs ├── data.rs └── main.rs /.github/CODEOWNERS: -------------------------------------------------------------------------------- 1 | * @XAMPPRocky 2 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: '' 5 | labels: bug 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Describe the bug** 11 | A clear and concise description of what the bug is. 12 | 13 | **To Reproduce** 14 | Steps to reproduce the behavior: 15 | 1. Go to '...' 16 | 2. Click on '....' 17 | 3. Scroll down to '....' 18 | 4. See error 19 | 20 | **Expected behavior** 21 | A clear and concise description of what you expected to happen. 22 | 23 | **Screenshots** 24 | If applicable, add screenshots to help explain your problem. 25 | 26 | **Device:** 27 | - OS: [e.g. iOS] 28 | - Browser [e.g. chrome, safari] 29 | - Version [e.g. 22] 30 | 31 | **Additional context** 32 | Add any other context about the problem here. 33 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: enhancement 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | **Describe the solution you'd like** 14 | A clear and concise description of what you want to happen. 15 | 16 | **Describe alternatives you've considered** 17 | A clear and concise description of any alternative solutions or features you've considered. 18 | 19 | **Additional context** 20 | Add any other context or screenshots about the feature request here. 21 | -------------------------------------------------------------------------------- /.github/pull_request_template.md: -------------------------------------------------------------------------------- 1 | ### Checklist 2 | 3 | * [ ] I have read the [Contributor Guide](../../CONTRIBUTING.md) 4 | * [ ] I have read and agree to the [Code of Conduct](../../CODE_OF_CONDUCT.md) 5 | * [ ] I have added a description of my changes and why I'd like them included in the section below 6 | 7 | ### Description of Changes 8 | 9 | Describe your changes here 10 | 11 | ### Related Issues 12 | 13 | List related issues here 14 | -------------------------------------------------------------------------------- /.github/workflows/rust-ci.yml: -------------------------------------------------------------------------------- 1 | # Replace this line with the commented one to actually run the action in your repo(s) 2 | on: public 3 | #on: [push, pull_request] 4 | 5 | name: CI 6 | jobs: 7 | lint: 8 | name: Lint 9 | runs-on: ubuntu-latest 10 | steps: 11 | - uses: actions/checkout@v1 12 | - uses: actions-rs/toolchain@v1 13 | with: 14 | toolchain: stable 15 | override: true 16 | 17 | # make sure all code has been formatted with rustfmt 18 | - run: rustup component add rustfmt 19 | - name: check rustfmt 20 | uses: actions-rs/cargo@v1 21 | with: 22 | command: fmt 23 | args: -- --check --color always 24 | 25 | # run clippy to verify we have no warnings 26 | - run: rustup component add clippy 27 | - name: cargo fetch 28 | uses: actions-rs/cargo@v1 29 | with: 30 | command: fetch 31 | - name: cargo clippy 32 | uses: actions-rs/cargo@v1 33 | with: 34 | command: clippy 35 | args: --lib --tests -- -D warnings 36 | 37 | test: 38 | name: Test 39 | strategy: 40 | matrix: 41 | os: [ubuntu-latest, windows-latest, macOS-latest] 42 | runs-on: ${{ matrix.os }} 43 | steps: 44 | - uses: actions/checkout@v1 45 | - uses: actions-rs/toolchain@v1 46 | with: 47 | toolchain: stable 48 | override: true 49 | - name: cargo fetch 50 | uses: actions-rs/cargo@v1 51 | with: 52 | command: fetch 53 | - name: cargo test build 54 | uses: actions-rs/cargo@v1 55 | with: 56 | command: build 57 | args: --tests --release 58 | - name: cargo test 59 | uses: actions-rs/cargo@v1 60 | with: 61 | command: test 62 | args: --release 63 | 64 | # Remove this check if you don't use cargo-deny in the repo 65 | deny-check: 66 | name: cargo-deny 67 | runs-on: ubuntu-latest 68 | steps: 69 | - uses: actions/checkout@v1 70 | - uses: EmbarkStudios/cargo-deny-action@v0 71 | 72 | # Remove this check if you don't publish the crate(s) from this repo 73 | publish-check: 74 | name: Publish Check 75 | runs-on: ubuntu-latest 76 | steps: 77 | - uses: actions/checkout@v1 78 | - uses: actions-rs/toolchain@v1 79 | with: 80 | toolchain: stable 81 | override: true 82 | - name: cargo fetch 83 | uses: actions-rs/cargo@v1 84 | with: 85 | command: fetch 86 | - name: cargo publish check 87 | uses: actions-rs/cargo@v1 88 | with: 89 | command: publish 90 | args: --dry-run 91 | 92 | # Remove this job if you don't publish the crate(s) from this repo 93 | # You must add a crates.io API token to your GH secrets called CRATES_IO_TOKEN 94 | publish: 95 | name: Publish 96 | needs: [test, deny-check, publish-check] 97 | runs-on: ubuntu-latest 98 | if: startsWith(github.ref, 'refs/tags/') 99 | steps: 100 | - uses: actions/checkout@v1 101 | - uses: actions-rs/toolchain@v1 102 | with: 103 | toolchain: stable 104 | override: true 105 | - name: cargo fetch 106 | uses: actions-rs/cargo@v1 107 | with: 108 | command: fetch 109 | - name: cargo publish 110 | uses: actions-rs/cargo@v1 111 | env: 112 | CARGO_REGISTRY_TOKEN: ${{ secrets.CRATES_IO_TOKEN }} 113 | with: 114 | command: publish 115 | 116 | # Remove this job if you don't release binaries 117 | # Replace occurances of $BIN_NAME with the name of your binary 118 | release: 119 | name: Release 120 | needs: [test, deny-check] 121 | if: startsWith(github.ref, 'refs/tags/') 122 | strategy: 123 | matrix: 124 | os: [ubuntu-latest, macOS-latest, windows-latest] 125 | include: 126 | - os: ubuntu-latest 127 | rust: stable 128 | target: x86_64-unknown-linux-musl 129 | bin: $BIN_NAME 130 | # We don't enable the progress feature when targeting 131 | # musl since there are some dependencies on shared libs 132 | features: "" 133 | - os: windows-latest 134 | rust: stable 135 | target: x86_64-pc-windows-msvc 136 | bin: $BIN_NAME.exe 137 | features: --features=progress 138 | - os: macOS-latest 139 | rust: stable 140 | target: x86_64-apple-darwin 141 | bin: $BIN_NAME 142 | features: --features=progress 143 | runs-on: ${{ matrix.os }} 144 | steps: 145 | - name: Install stable toolchain 146 | uses: actions-rs/toolchain@v1 147 | with: 148 | toolchain: ${{ matrix.rust }} 149 | override: true 150 | target: ${{ matrix.target }} 151 | - name: Install musl tools 152 | if: matrix.os == 'ubuntu-latest' 153 | run: | 154 | sudo apt-get install -y musl-tools 155 | - name: Checkout 156 | uses: actions/checkout@v1 157 | - name: cargo fetch 158 | uses: actions-rs/cargo@v1 159 | with: 160 | command: fetch 161 | args: --target ${{ matrix.target }} 162 | - name: Release build 163 | uses: actions-rs/cargo@v1 164 | if: matrix.os != 'ubuntu-latest' 165 | with: 166 | command: build 167 | args: --release --target ${{ matrix.target }} ${{ matrix.features }} 168 | - name: Package 169 | shell: bash 170 | run: | 171 | name=$BIN_NAME 172 | tag=$(git describe --tags --abbrev=0) 173 | release_name="$name-$tag-${{ matrix.target }}" 174 | release_tar="${release_name}.tar.gz" 175 | mkdir "$release_name" 176 | 177 | if [ "${{ matrix.target }}" != "x86_64-pc-windows-msvc" ]; then 178 | strip "target/${{ matrix.target }}/release/${{ matrix.bin }}" 179 | fi 180 | 181 | cp "target/${{ matrix.target }}/release/${{ matrix.bin }}" "$release_name/" 182 | cp README.md LICENSE-APACHE LICENSE-MIT "$release_name/" 183 | tar czvf "$release_tar" "$release_name" 184 | 185 | rm -r "$release_name" 186 | 187 | # Windows environments in github actions don't have the gnu coreutils installed, 188 | # which includes the shasum exe, so we just use powershell instead 189 | if [ "${{ matrix.os }}" == "windows-latest" ]; then 190 | echo "(Get-FileHash \"${release_tar}\" -Algorithm SHA256).Hash | Out-File -Encoding ASCII -NoNewline \"${release_tar}.sha256\"" | pwsh -c - 191 | else 192 | echo -n "$(shasum -ba 256 "${release_tar}" | cut -d " " -f 1)" > "${release_tar}.sha256" 193 | fi 194 | - name: Publish 195 | uses: softprops/action-gh-release@v1 196 | with: 197 | draft: true 198 | files: '$BIN_NAME*' 199 | env: 200 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 201 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /target 2 | **/*.rs.bk 3 | Cargo.lock 4 | -------------------------------------------------------------------------------- /.mergify.yml: -------------------------------------------------------------------------------- 1 | pull_request_rules: 2 | - name: automatic merge when CI passes and 1 reviews 3 | conditions: 4 | - "#approved-reviews-by>=1" 5 | - "#review-requested=0" 6 | - "#changes-requested-reviews-by=0" 7 | - "#commented-reviews-by=0" 8 | - base=main 9 | - label!=work-in-progress 10 | actions: 11 | merge: 12 | method: squash 13 | - name: delete head branch after merge 14 | conditions: [] 15 | actions: 16 | delete_head_branch: {} 17 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | All notable changes to this project will be documented in this file. 3 | 4 | The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), 5 | and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). 6 | 7 | ## [Unreleased] 8 | 9 | ## [0.1.1] - 2019-09-03 10 | ### Added 11 | - New features go here in a bullet list 12 | 13 | ### Changed 14 | - Changes to existing functionality go here in a bullet list 15 | 16 | ### Deprecated 17 | - Mark features soon-to-be removed in a bullet list 18 | 19 | ### Removed 20 | - Features that have been removed in a bullet list 21 | 22 | ### Fixed 23 | - Bug fixes in a bullet list 24 | 25 | ### Security 26 | - Changes/fixes related to security vulnerabilities in a bullet list 27 | 28 | ## [0.1.0] - 2019-09-02 29 | ### Added 30 | - Initial add of the thing 31 | 32 | [Unreleased]: https://github.com/EmbarkStudios/$REPO_NAME/compare/0.1.1...HEAD 33 | [0.1.1]: https://github.com/EmbarkStudios/$REPO_NAME/compare/0.1.0...0.1.1 34 | [0.1.0]: https://github.com/EmbarkStudios/$REPO_NAME/releases/tag/0.1.0 35 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Contributor Covenant Code of Conduct 2 | 3 | ## Our Pledge 4 | 5 | In the interest of fostering an open and welcoming environment, we as 6 | contributors and maintainers pledge to making participation in our project and 7 | our community a harassment-free experience for everyone, regardless of age, body 8 | size, disability, ethnicity, sex characteristics, gender identity and expression, 9 | level of experience, education, socio-economic status, nationality, personal 10 | appearance, race, religion, or sexual identity and orientation. 11 | 12 | ## Our Standards 13 | 14 | Examples of behavior that contributes to creating a positive environment 15 | include: 16 | 17 | * Using welcoming and inclusive language 18 | * Being respectful of differing viewpoints and experiences 19 | * Gracefully accepting constructive criticism 20 | * Focusing on what is best for the community 21 | * Showing empathy towards other community members 22 | 23 | Examples of unacceptable behavior by participants include: 24 | 25 | * The use of sexualized language or imagery and unwelcome sexual attention or 26 | advances 27 | * Trolling, insulting/derogatory comments, and personal or political attacks 28 | * Public or private harassment 29 | * Publishing others' private information, such as a physical or electronic 30 | address, without explicit permission 31 | * Other conduct which could reasonably be considered inappropriate in a 32 | professional setting 33 | 34 | ## Our Responsibilities 35 | 36 | Project maintainers are responsible for clarifying the standards of acceptable 37 | behavior and are expected to take appropriate and fair corrective action in 38 | response to any instances of unacceptable behavior. 39 | 40 | Project maintainers have the right and responsibility to remove, edit, or 41 | reject comments, commits, code, wiki edits, issues, and other contributions 42 | that are not aligned to this Code of Conduct, or to ban temporarily or 43 | permanently any contributor for other behaviors that they deem inappropriate, 44 | threatening, offensive, or harmful. 45 | 46 | ## Scope 47 | 48 | This Code of Conduct applies both within project spaces and in public spaces 49 | when an individual is representing the project or its community. Examples of 50 | representing a project or community include using an official project e-mail 51 | address, posting via an official social media account, or acting as an appointed 52 | representative at an online or offline event. Representation of a project may be 53 | further defined and clarified by project maintainers. 54 | 55 | ## Enforcement 56 | 57 | Instances of abusive, harassing, or otherwise unacceptable behavior may be 58 | reported by contacting the project team at opensource@embark-studios.com. All 59 | complaints will be reviewed and investigated and will result in a response that 60 | is deemed necessary and appropriate to the circumstances. The project team is 61 | obligated to maintain confidentiality with regard to the reporter of an incident. 62 | Further details of specific enforcement policies may be posted separately. 63 | 64 | Project maintainers who do not follow or enforce the Code of Conduct in good 65 | faith may face temporary or permanent repercussions as determined by other 66 | members of the project's leadership. 67 | 68 | ## Attribution 69 | 70 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, 71 | available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html 72 | 73 | [homepage]: https://www.contributor-covenant.org 74 | 75 | For answers to common questions about this code of conduct, see 76 | https://www.contributor-covenant.org/faq 77 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Embark Contributor Guidelines 2 | 3 | Welcome! This project is created by the team at [Embark Studios](https://embark.games). We're glad you're interested in contributing! We welcome contributions from people of all backgrounds who are interested in making great software with us. 4 | 5 | At Embark, we aspire to empower everyone to create interactive experiences. To do this, we're exploring and pushing the boundaries of new technologies, and sharing our learnings with the open source community. 6 | 7 | If you have ideas for collaboration, email us at opensource@embark-studios.com. 8 | 9 | We're also hiring full-time engineers to work with us in Stockholm! Check out our current job postings [here](https://embark.games/careers). 10 | 11 | ## Issues 12 | 13 | ### Feature Requests 14 | 15 | If you have ideas or how to improve our projects, you can suggest features by opening a GitHub issue. Make sure to include details about the feature or change, and describe any uses cases it would enable. 16 | 17 | Feature requests will be tagged as `enhancement` and their status will be updated in the comments of the issue. 18 | 19 | ### Bugs 20 | 21 | When reporting a bug or unexpected behaviour in a project, make sure your issue describes steps to reproduce the behaviour, including the platform you were using, what steps you took, and any error messages. 22 | 23 | Reproducible bugs will be tagged as `bug` and their status will be updated in the comments of the issue. 24 | 25 | ### Wontfix 26 | 27 | Issues will be closed and tagged as `wontfix` if we decide that we do not wish to implement it, usually due to being misaligned with the project vision or out of scope. We will comment on the issue with more detailed reasoning. 28 | 29 | ## Contribution Workflow 30 | 31 | ### Open Issues 32 | 33 | If you're ready to contribute, start by looking at our open issues tagged as [`help wanted`](../../issues?q=is%3Aopen+is%3Aissue+label%3A"help+wanted") or [`good first issue`](../../issues?q=is%3Aopen+is%3Aissue+label%3A"good+first+issue"). 34 | 35 | You can comment on the issue to let others know you're interested in working on it or to ask questions. 36 | 37 | ### Making Changes 38 | 39 | 1. Fork the repository. 40 | 41 | 2. Create a new feature branch. 42 | 43 | 3. Make your changes. Ensure that there are no build errors by running the project with your changes locally. 44 | 45 | 4. Open a pull request with a name and description of what you did. You can read more about working with pull requests on GitHub [here](https://help.github.com/en/articles/creating-a-pull-request-from-a-fork). 46 | 47 | 5. A maintainer will review your pull request and may ask you to make changes. 48 | 49 | ## Code Guidelines 50 | 51 | ### Rust 52 | 53 | You can read about our standards and recommendations for working with Rust [here](https://github.com/EmbarkStudios/rust-ecosystem/blob/main/guidelines.md). 54 | 55 | ### Python 56 | 57 | We recommend following [PEP8 conventions](https://www.python.org/dev/peps/pep-0008/) when working with Python modules. 58 | 59 | ### JavaScript 60 | 61 | We follow the [AirBnB JavaScript style guide](https://github.com/airbnb/javascript). You can find the ESLint configuration in relevant repositories. 62 | 63 | ## Licensing 64 | 65 | Unless otherwise specified, all Embark open source projects are licensed under a dual MIT OR Apache-2.0 license, allowing licensees to chose either at their option. You can read more in each project's respective README. 66 | 67 | ## Code of Conduct 68 | 69 | Please note that our projects are released with a [Contributor Code of Conduct](CODE_OF_CONDUCT.md) to ensure that they are welcoming places for everyone to contribute. By participating in any Embark open source project, you agree to abide by these terms. 70 | -------------------------------------------------------------------------------- /Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | [[package]] 4 | name = "addr2line" 5 | version = "0.14.1" 6 | source = "registry+https://github.com/rust-lang/crates.io-index" 7 | checksum = "a55f82cfe485775d02112886f4169bde0c5894d75e79ead7eafe7e40a25e45f7" 8 | dependencies = [ 9 | "gimli", 10 | ] 11 | 12 | [[package]] 13 | name = "adler" 14 | version = "0.2.3" 15 | source = "registry+https://github.com/rust-lang/crates.io-index" 16 | checksum = "ee2a4ec343196209d6594e19543ae87a39f96d5534d7174822a3ad825dd6ed7e" 17 | 18 | [[package]] 19 | name = "aho-corasick" 20 | version = "0.7.15" 21 | source = "registry+https://github.com/rust-lang/crates.io-index" 22 | checksum = "7404febffaa47dac81aa44dba71523c9d069b1bdc50a77db41195149e17f68e5" 23 | dependencies = [ 24 | "memchr", 25 | ] 26 | 27 | [[package]] 28 | name = "ansi_term" 29 | version = "0.11.0" 30 | source = "registry+https://github.com/rust-lang/crates.io-index" 31 | checksum = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b" 32 | dependencies = [ 33 | "winapi", 34 | ] 35 | 36 | [[package]] 37 | name = "arc-swap" 38 | version = "1.2.0" 39 | source = "registry+https://github.com/rust-lang/crates.io-index" 40 | checksum = "d4d7d63395147b81a9e570bcc6243aaf71c017bd666d4909cfef0085bdda8d73" 41 | 42 | [[package]] 43 | name = "async-recursion" 44 | version = "0.3.2" 45 | source = "registry+https://github.com/rust-lang/crates.io-index" 46 | checksum = "d7d78656ba01f1b93024b7c3a0467f1608e4be67d725749fdcd7d2c7678fd7a2" 47 | dependencies = [ 48 | "proc-macro2", 49 | "quote", 50 | "syn", 51 | ] 52 | 53 | [[package]] 54 | name = "async-trait" 55 | version = "0.1.42" 56 | source = "registry+https://github.com/rust-lang/crates.io-index" 57 | checksum = "8d3a45e77e34375a7923b1e8febb049bb011f064714a8e17a1a616fef01da13d" 58 | dependencies = [ 59 | "proc-macro2", 60 | "quote", 61 | "syn", 62 | ] 63 | 64 | [[package]] 65 | name = "atty" 66 | version = "0.2.14" 67 | source = "registry+https://github.com/rust-lang/crates.io-index" 68 | checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" 69 | dependencies = [ 70 | "hermit-abi", 71 | "libc", 72 | "winapi", 73 | ] 74 | 75 | [[package]] 76 | name = "autocfg" 77 | version = "1.0.1" 78 | source = "registry+https://github.com/rust-lang/crates.io-index" 79 | checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" 80 | 81 | [[package]] 82 | name = "backtrace" 83 | version = "0.3.56" 84 | source = "registry+https://github.com/rust-lang/crates.io-index" 85 | checksum = "9d117600f438b1707d4e4ae15d3595657288f8235a0eb593e80ecc98ab34e1bc" 86 | dependencies = [ 87 | "addr2line", 88 | "cfg-if", 89 | "libc", 90 | "miniz_oxide", 91 | "object", 92 | "rustc-demangle", 93 | ] 94 | 95 | [[package]] 96 | name = "base64" 97 | version = "0.13.0" 98 | source = "registry+https://github.com/rust-lang/crates.io-index" 99 | checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd" 100 | 101 | [[package]] 102 | name = "bitflags" 103 | version = "1.2.1" 104 | source = "registry+https://github.com/rust-lang/crates.io-index" 105 | checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" 106 | 107 | [[package]] 108 | name = "block-buffer" 109 | version = "0.7.3" 110 | source = "registry+https://github.com/rust-lang/crates.io-index" 111 | checksum = "c0940dc441f31689269e10ac70eb1002a3a1d3ad1390e030043662eb7fe4688b" 112 | dependencies = [ 113 | "block-padding", 114 | "byte-tools", 115 | "byteorder", 116 | "generic-array", 117 | ] 118 | 119 | [[package]] 120 | name = "block-padding" 121 | version = "0.1.5" 122 | source = "registry+https://github.com/rust-lang/crates.io-index" 123 | checksum = "fa79dedbb091f449f1f39e53edf88d5dbe95f895dae6135a8d7b881fb5af73f5" 124 | dependencies = [ 125 | "byte-tools", 126 | ] 127 | 128 | [[package]] 129 | name = "bstr" 130 | version = "0.2.15" 131 | source = "registry+https://github.com/rust-lang/crates.io-index" 132 | checksum = "a40b47ad93e1a5404e6c18dec46b628214fee441c70f4ab5d6942142cc268a3d" 133 | dependencies = [ 134 | "memchr", 135 | ] 136 | 137 | [[package]] 138 | name = "bumpalo" 139 | version = "3.6.0" 140 | source = "registry+https://github.com/rust-lang/crates.io-index" 141 | checksum = "099e596ef14349721d9016f6b80dd3419ea1bf289ab9b44df8e4dfd3a005d5d9" 142 | 143 | [[package]] 144 | name = "byte-tools" 145 | version = "0.3.1" 146 | source = "registry+https://github.com/rust-lang/crates.io-index" 147 | checksum = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7" 148 | 149 | [[package]] 150 | name = "byteorder" 151 | version = "1.4.2" 152 | source = "registry+https://github.com/rust-lang/crates.io-index" 153 | checksum = "ae44d1a3d5a19df61dd0c8beb138458ac2a53a7ac09eba97d55592540004306b" 154 | 155 | [[package]] 156 | name = "bytes" 157 | version = "1.0.1" 158 | source = "registry+https://github.com/rust-lang/crates.io-index" 159 | checksum = "b700ce4376041dcd0a327fd0097c41095743c4c8af8887265942faf1100bd040" 160 | 161 | [[package]] 162 | name = "cc" 163 | version = "1.0.66" 164 | source = "registry+https://github.com/rust-lang/crates.io-index" 165 | checksum = "4c0496836a84f8d0495758516b8621a622beb77c0fed418570e50764093ced48" 166 | 167 | [[package]] 168 | name = "cfg-if" 169 | version = "1.0.0" 170 | source = "registry+https://github.com/rust-lang/crates.io-index" 171 | checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" 172 | 173 | [[package]] 174 | name = "chrono" 175 | version = "0.4.19" 176 | source = "registry+https://github.com/rust-lang/crates.io-index" 177 | checksum = "670ad68c9088c2a963aaa298cb369688cf3f9465ce5e2d4ca10e6e0098a1ce73" 178 | dependencies = [ 179 | "libc", 180 | "num-integer", 181 | "num-traits", 182 | "serde", 183 | "time", 184 | "winapi", 185 | ] 186 | 187 | [[package]] 188 | name = "chrono-tz" 189 | version = "0.5.3" 190 | source = "registry+https://github.com/rust-lang/crates.io-index" 191 | checksum = "2554a3155fec064362507487171dcc4edc3df60cb10f3a1fb10ed8094822b120" 192 | dependencies = [ 193 | "chrono", 194 | "parse-zoneinfo", 195 | ] 196 | 197 | [[package]] 198 | name = "clap" 199 | version = "2.33.3" 200 | source = "registry+https://github.com/rust-lang/crates.io-index" 201 | checksum = "37e58ac78573c40708d45522f0d80fa2f01cc4f9b4e2bf749807255454312002" 202 | dependencies = [ 203 | "ansi_term", 204 | "atty", 205 | "bitflags", 206 | "strsim", 207 | "textwrap", 208 | "unicode-width", 209 | "vec_map", 210 | ] 211 | 212 | [[package]] 213 | name = "core-foundation" 214 | version = "0.9.1" 215 | source = "registry+https://github.com/rust-lang/crates.io-index" 216 | checksum = "0a89e2ae426ea83155dccf10c0fa6b1463ef6d5fcb44cee0b224a408fa640a62" 217 | dependencies = [ 218 | "core-foundation-sys", 219 | "libc", 220 | ] 221 | 222 | [[package]] 223 | name = "core-foundation-sys" 224 | version = "0.8.2" 225 | source = "registry+https://github.com/rust-lang/crates.io-index" 226 | checksum = "ea221b5284a47e40033bf9b66f35f984ec0ea2931eb03505246cd27a963f981b" 227 | 228 | [[package]] 229 | name = "crossbeam-utils" 230 | version = "0.8.1" 231 | source = "registry+https://github.com/rust-lang/crates.io-index" 232 | checksum = "02d96d1e189ef58269ebe5b97953da3274d83a93af647c2ddd6f9dab28cedb8d" 233 | dependencies = [ 234 | "autocfg", 235 | "cfg-if", 236 | "lazy_static", 237 | ] 238 | 239 | [[package]] 240 | name = "deunicode" 241 | version = "0.4.3" 242 | source = "registry+https://github.com/rust-lang/crates.io-index" 243 | checksum = "850878694b7933ca4c9569d30a34b55031b9b139ee1fc7b94a527c4ef960d690" 244 | 245 | [[package]] 246 | name = "digest" 247 | version = "0.8.1" 248 | source = "registry+https://github.com/rust-lang/crates.io-index" 249 | checksum = "f3d0c8c8752312f9713efd397ff63acb9f85585afbf179282e720e7704954dd5" 250 | dependencies = [ 251 | "generic-array", 252 | ] 253 | 254 | [[package]] 255 | name = "doc-comment" 256 | version = "0.3.3" 257 | source = "registry+https://github.com/rust-lang/crates.io-index" 258 | checksum = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10" 259 | 260 | [[package]] 261 | name = "encoding_rs" 262 | version = "0.8.28" 263 | source = "registry+https://github.com/rust-lang/crates.io-index" 264 | checksum = "80df024fbc5ac80f87dfef0d9f5209a252f2a497f7f42944cff24d8253cac065" 265 | dependencies = [ 266 | "cfg-if", 267 | ] 268 | 269 | [[package]] 270 | name = "env_logger" 271 | version = "0.8.2" 272 | source = "registry+https://github.com/rust-lang/crates.io-index" 273 | checksum = "f26ecb66b4bdca6c1409b40fb255eefc2bd4f6d135dab3c3124f80ffa2a9661e" 274 | dependencies = [ 275 | "atty", 276 | "humantime", 277 | "log", 278 | "regex", 279 | "termcolor", 280 | ] 281 | 282 | [[package]] 283 | name = "eyre" 284 | version = "0.6.5" 285 | source = "registry+https://github.com/rust-lang/crates.io-index" 286 | checksum = "221239d1d5ea86bf5d6f91c9d6bc3646ffe471b08ff9b0f91c44f115ac969d2b" 287 | dependencies = [ 288 | "indenter", 289 | "once_cell", 290 | ] 291 | 292 | [[package]] 293 | name = "fake-simd" 294 | version = "0.1.2" 295 | source = "registry+https://github.com/rust-lang/crates.io-index" 296 | checksum = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed" 297 | 298 | [[package]] 299 | name = "fnv" 300 | version = "1.0.7" 301 | source = "registry+https://github.com/rust-lang/crates.io-index" 302 | checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" 303 | 304 | [[package]] 305 | name = "foreign-types" 306 | version = "0.3.2" 307 | source = "registry+https://github.com/rust-lang/crates.io-index" 308 | checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" 309 | dependencies = [ 310 | "foreign-types-shared", 311 | ] 312 | 313 | [[package]] 314 | name = "foreign-types-shared" 315 | version = "0.1.1" 316 | source = "registry+https://github.com/rust-lang/crates.io-index" 317 | checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" 318 | 319 | [[package]] 320 | name = "form_urlencoded" 321 | version = "1.0.0" 322 | source = "registry+https://github.com/rust-lang/crates.io-index" 323 | checksum = "ece68d15c92e84fa4f19d3780f1294e5ca82a78a6d515f1efaabcc144688be00" 324 | dependencies = [ 325 | "matches", 326 | "percent-encoding", 327 | ] 328 | 329 | [[package]] 330 | name = "futures-channel" 331 | version = "0.3.12" 332 | source = "registry+https://github.com/rust-lang/crates.io-index" 333 | checksum = "f2d31b7ec7efab6eefc7c57233bb10b847986139d88cc2f5a02a1ae6871a1846" 334 | dependencies = [ 335 | "futures-core", 336 | ] 337 | 338 | [[package]] 339 | name = "futures-core" 340 | version = "0.3.12" 341 | source = "registry+https://github.com/rust-lang/crates.io-index" 342 | checksum = "79e5145dde8da7d1b3892dad07a9c98fc04bc39892b1ecc9692cf53e2b780a65" 343 | 344 | [[package]] 345 | name = "futures-sink" 346 | version = "0.3.12" 347 | source = "registry+https://github.com/rust-lang/crates.io-index" 348 | checksum = "caf5c69029bda2e743fddd0582d1083951d65cc9539aebf8812f36c3491342d6" 349 | 350 | [[package]] 351 | name = "futures-task" 352 | version = "0.3.12" 353 | source = "registry+https://github.com/rust-lang/crates.io-index" 354 | checksum = "13de07eb8ea81ae445aca7b69f5f7bf15d7bf4912d8ca37d6645c77ae8a58d86" 355 | 356 | [[package]] 357 | name = "futures-util" 358 | version = "0.3.12" 359 | source = "registry+https://github.com/rust-lang/crates.io-index" 360 | checksum = "632a8cd0f2a4b3fdea1657f08bde063848c3bd00f9bbf6e256b8be78802e624b" 361 | dependencies = [ 362 | "futures-core", 363 | "futures-task", 364 | "pin-project-lite", 365 | "pin-utils", 366 | ] 367 | 368 | [[package]] 369 | name = "generic-array" 370 | version = "0.12.3" 371 | source = "registry+https://github.com/rust-lang/crates.io-index" 372 | checksum = "c68f0274ae0e023facc3c97b2e00f076be70e254bc851d972503b328db79b2ec" 373 | dependencies = [ 374 | "typenum", 375 | ] 376 | 377 | [[package]] 378 | name = "getrandom" 379 | version = "0.2.2" 380 | source = "registry+https://github.com/rust-lang/crates.io-index" 381 | checksum = "c9495705279e7140bf035dde1f6e750c162df8b625267cd52cc44e0b156732c8" 382 | dependencies = [ 383 | "cfg-if", 384 | "libc", 385 | "wasi", 386 | ] 387 | 388 | [[package]] 389 | name = "gimli" 390 | version = "0.23.0" 391 | source = "registry+https://github.com/rust-lang/crates.io-index" 392 | checksum = "f6503fe142514ca4799d4c26297c4248239fe8838d827db6bd6065c6ed29a6ce" 393 | 394 | [[package]] 395 | name = "globset" 396 | version = "0.4.6" 397 | source = "registry+https://github.com/rust-lang/crates.io-index" 398 | checksum = "c152169ef1e421390738366d2f796655fec62621dabbd0fd476f905934061e4a" 399 | dependencies = [ 400 | "aho-corasick", 401 | "bstr", 402 | "fnv", 403 | "log", 404 | "regex", 405 | ] 406 | 407 | [[package]] 408 | name = "globwalk" 409 | version = "0.8.1" 410 | source = "registry+https://github.com/rust-lang/crates.io-index" 411 | checksum = "93e3af942408868f6934a7b85134a3230832b9977cf66125df2f9edcfce4ddcc" 412 | dependencies = [ 413 | "bitflags", 414 | "ignore", 415 | "walkdir", 416 | ] 417 | 418 | [[package]] 419 | name = "h2" 420 | version = "0.3.0" 421 | source = "registry+https://github.com/rust-lang/crates.io-index" 422 | checksum = "6b67e66362108efccd8ac053abafc8b7a8d86a37e6e48fc4f6f7485eb5e9e6a5" 423 | dependencies = [ 424 | "bytes", 425 | "fnv", 426 | "futures-core", 427 | "futures-sink", 428 | "futures-util", 429 | "http", 430 | "indexmap", 431 | "slab", 432 | "tokio", 433 | "tokio-util", 434 | "tracing", 435 | "tracing-futures", 436 | ] 437 | 438 | [[package]] 439 | name = "hashbrown" 440 | version = "0.9.1" 441 | source = "registry+https://github.com/rust-lang/crates.io-index" 442 | checksum = "d7afe4a420e3fe79967a00898cc1f4db7c8a49a9333a29f8a4bd76a253d5cd04" 443 | 444 | [[package]] 445 | name = "heck" 446 | version = "0.3.2" 447 | source = "registry+https://github.com/rust-lang/crates.io-index" 448 | checksum = "87cbf45460356b7deeb5e3415b5563308c0a9b057c85e12b06ad551f98d0a6ac" 449 | dependencies = [ 450 | "unicode-segmentation", 451 | ] 452 | 453 | [[package]] 454 | name = "hermit-abi" 455 | version = "0.1.18" 456 | source = "registry+https://github.com/rust-lang/crates.io-index" 457 | checksum = "322f4de77956e22ed0e5032c359a0f1273f1f7f0d79bfa3b8ffbc730d7fbcc5c" 458 | dependencies = [ 459 | "libc", 460 | ] 461 | 462 | [[package]] 463 | name = "http" 464 | version = "0.2.3" 465 | source = "registry+https://github.com/rust-lang/crates.io-index" 466 | checksum = "7245cd7449cc792608c3c8a9eaf69bd4eabbabf802713748fd739c98b82f0747" 467 | dependencies = [ 468 | "bytes", 469 | "fnv", 470 | "itoa", 471 | ] 472 | 473 | [[package]] 474 | name = "http-body" 475 | version = "0.4.0" 476 | source = "registry+https://github.com/rust-lang/crates.io-index" 477 | checksum = "2861bd27ee074e5ee891e8b539837a9430012e249d7f0ca2d795650f579c1994" 478 | dependencies = [ 479 | "bytes", 480 | "http", 481 | ] 482 | 483 | [[package]] 484 | name = "httparse" 485 | version = "1.3.5" 486 | source = "registry+https://github.com/rust-lang/crates.io-index" 487 | checksum = "615caabe2c3160b313d52ccc905335f4ed5f10881dd63dc5699d47e90be85691" 488 | 489 | [[package]] 490 | name = "httpdate" 491 | version = "0.3.2" 492 | source = "registry+https://github.com/rust-lang/crates.io-index" 493 | checksum = "494b4d60369511e7dea41cf646832512a94e542f68bb9c49e54518e0f468eb47" 494 | 495 | [[package]] 496 | name = "humansize" 497 | version = "1.1.0" 498 | source = "registry+https://github.com/rust-lang/crates.io-index" 499 | checksum = "b6cab2627acfc432780848602f3f558f7e9dd427352224b0d9324025796d2a5e" 500 | 501 | [[package]] 502 | name = "humantime" 503 | version = "2.1.0" 504 | source = "registry+https://github.com/rust-lang/crates.io-index" 505 | checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" 506 | 507 | [[package]] 508 | name = "hyper" 509 | version = "0.14.4" 510 | source = "registry+https://github.com/rust-lang/crates.io-index" 511 | checksum = "e8e946c2b1349055e0b72ae281b238baf1a3ea7307c7e9f9d64673bdd9c26ac7" 512 | dependencies = [ 513 | "bytes", 514 | "futures-channel", 515 | "futures-core", 516 | "futures-util", 517 | "h2", 518 | "http", 519 | "http-body", 520 | "httparse", 521 | "httpdate", 522 | "itoa", 523 | "pin-project 1.0.5", 524 | "socket2", 525 | "tokio", 526 | "tower-service", 527 | "tracing", 528 | "want", 529 | ] 530 | 531 | [[package]] 532 | name = "hyper-tls" 533 | version = "0.5.0" 534 | source = "registry+https://github.com/rust-lang/crates.io-index" 535 | checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" 536 | dependencies = [ 537 | "bytes", 538 | "hyper", 539 | "native-tls", 540 | "tokio", 541 | "tokio-native-tls", 542 | ] 543 | 544 | [[package]] 545 | name = "hyperx" 546 | version = "1.3.0" 547 | source = "registry+https://github.com/rust-lang/crates.io-index" 548 | checksum = "82566a1ace7f56f604d83b7b2c259c78e243d99c565f23d7b4ae34466442c5a2" 549 | dependencies = [ 550 | "base64", 551 | "bytes", 552 | "http", 553 | "httparse", 554 | "httpdate", 555 | "language-tags", 556 | "mime", 557 | "percent-encoding", 558 | "unicase", 559 | ] 560 | 561 | [[package]] 562 | name = "idna" 563 | version = "0.2.1" 564 | source = "registry+https://github.com/rust-lang/crates.io-index" 565 | checksum = "de910d521f7cc3135c4de8db1cb910e0b5ed1dc6f57c381cd07e8e661ce10094" 566 | dependencies = [ 567 | "matches", 568 | "unicode-bidi", 569 | "unicode-normalization", 570 | ] 571 | 572 | [[package]] 573 | name = "ignore" 574 | version = "0.4.17" 575 | source = "registry+https://github.com/rust-lang/crates.io-index" 576 | checksum = "b287fb45c60bb826a0dc68ff08742b9d88a2fea13d6e0c286b3172065aaf878c" 577 | dependencies = [ 578 | "crossbeam-utils", 579 | "globset", 580 | "lazy_static", 581 | "log", 582 | "memchr", 583 | "regex", 584 | "same-file", 585 | "thread_local", 586 | "walkdir", 587 | "winapi-util", 588 | ] 589 | 590 | [[package]] 591 | name = "indenter" 592 | version = "0.3.2" 593 | source = "registry+https://github.com/rust-lang/crates.io-index" 594 | checksum = "f4d5eb2e114fec2b7fe0fadc22888ad2658789bb7acac4dbee9cf8389f971ec8" 595 | 596 | [[package]] 597 | name = "indexmap" 598 | version = "1.6.1" 599 | source = "registry+https://github.com/rust-lang/crates.io-index" 600 | checksum = "4fb1fa934250de4de8aef298d81c729a7d33d8c239daa3a7575e6b92bfc7313b" 601 | dependencies = [ 602 | "autocfg", 603 | "hashbrown", 604 | ] 605 | 606 | [[package]] 607 | name = "ipnet" 608 | version = "2.3.0" 609 | source = "registry+https://github.com/rust-lang/crates.io-index" 610 | checksum = "47be2f14c678be2fdcab04ab1171db51b2762ce6f0a8ee87c8dd4a04ed216135" 611 | 612 | [[package]] 613 | name = "itoa" 614 | version = "0.4.7" 615 | source = "registry+https://github.com/rust-lang/crates.io-index" 616 | checksum = "dd25036021b0de88a0aff6b850051563c6516d0bf53f8638938edbb9de732736" 617 | 618 | [[package]] 619 | name = "js-sys" 620 | version = "0.3.47" 621 | source = "registry+https://github.com/rust-lang/crates.io-index" 622 | checksum = "5cfb73131c35423a367daf8cbd24100af0d077668c8c2943f0e7dd775fef0f65" 623 | dependencies = [ 624 | "wasm-bindgen", 625 | ] 626 | 627 | [[package]] 628 | name = "language-tags" 629 | version = "0.2.2" 630 | source = "registry+https://github.com/rust-lang/crates.io-index" 631 | checksum = "a91d884b6667cd606bb5a69aa0c99ba811a115fc68915e7056ec08a46e93199a" 632 | 633 | [[package]] 634 | name = "lazy_static" 635 | version = "1.4.0" 636 | source = "registry+https://github.com/rust-lang/crates.io-index" 637 | checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" 638 | 639 | [[package]] 640 | name = "libc" 641 | version = "0.2.86" 642 | source = "registry+https://github.com/rust-lang/crates.io-index" 643 | checksum = "b7282d924be3275cec7f6756ff4121987bc6481325397dde6ba3e7802b1a8b1c" 644 | 645 | [[package]] 646 | name = "log" 647 | version = "0.4.14" 648 | source = "registry+https://github.com/rust-lang/crates.io-index" 649 | checksum = "51b9bbe6c47d51fc3e1a9b945965946b4c44142ab8792c50835a980d362c2710" 650 | dependencies = [ 651 | "cfg-if", 652 | ] 653 | 654 | [[package]] 655 | name = "maplit" 656 | version = "1.0.2" 657 | source = "registry+https://github.com/rust-lang/crates.io-index" 658 | checksum = "3e2e65a1a2e43cfcb47a895c4c8b10d1f4a61097f9f254f183aee60cad9c651d" 659 | 660 | [[package]] 661 | name = "matches" 662 | version = "0.1.8" 663 | source = "registry+https://github.com/rust-lang/crates.io-index" 664 | checksum = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08" 665 | 666 | [[package]] 667 | name = "memchr" 668 | version = "2.3.4" 669 | source = "registry+https://github.com/rust-lang/crates.io-index" 670 | checksum = "0ee1c47aaa256ecabcaea351eae4a9b01ef39ed810004e298d2511ed284b1525" 671 | 672 | [[package]] 673 | name = "mime" 674 | version = "0.3.16" 675 | source = "registry+https://github.com/rust-lang/crates.io-index" 676 | checksum = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d" 677 | 678 | [[package]] 679 | name = "miniz_oxide" 680 | version = "0.4.3" 681 | source = "registry+https://github.com/rust-lang/crates.io-index" 682 | checksum = "0f2d26ec3309788e423cfbf68ad1800f061638098d76a83681af979dc4eda19d" 683 | dependencies = [ 684 | "adler", 685 | "autocfg", 686 | ] 687 | 688 | [[package]] 689 | name = "mio" 690 | version = "0.7.7" 691 | source = "registry+https://github.com/rust-lang/crates.io-index" 692 | checksum = "e50ae3f04d169fcc9bde0b547d1c205219b7157e07ded9c5aff03e0637cb3ed7" 693 | dependencies = [ 694 | "libc", 695 | "log", 696 | "miow", 697 | "ntapi", 698 | "winapi", 699 | ] 700 | 701 | [[package]] 702 | name = "miow" 703 | version = "0.3.6" 704 | source = "registry+https://github.com/rust-lang/crates.io-index" 705 | checksum = "5a33c1b55807fbed163481b5ba66db4b2fa6cde694a5027be10fb724206c5897" 706 | dependencies = [ 707 | "socket2", 708 | "winapi", 709 | ] 710 | 711 | [[package]] 712 | name = "native-tls" 713 | version = "0.2.7" 714 | source = "registry+https://github.com/rust-lang/crates.io-index" 715 | checksum = "b8d96b2e1c8da3957d58100b09f102c6d9cfdfced01b7ec5a8974044bb09dbd4" 716 | dependencies = [ 717 | "lazy_static", 718 | "libc", 719 | "log", 720 | "openssl", 721 | "openssl-probe", 722 | "openssl-sys", 723 | "schannel", 724 | "security-framework", 725 | "security-framework-sys", 726 | "tempfile", 727 | ] 728 | 729 | [[package]] 730 | name = "ntapi" 731 | version = "0.3.6" 732 | source = "registry+https://github.com/rust-lang/crates.io-index" 733 | checksum = "3f6bb902e437b6d86e03cce10a7e2af662292c5dfef23b65899ea3ac9354ad44" 734 | dependencies = [ 735 | "winapi", 736 | ] 737 | 738 | [[package]] 739 | name = "num-integer" 740 | version = "0.1.44" 741 | source = "registry+https://github.com/rust-lang/crates.io-index" 742 | checksum = "d2cc698a63b549a70bc047073d2949cce27cd1c7b0a4a862d08a8031bc2801db" 743 | dependencies = [ 744 | "autocfg", 745 | "num-traits", 746 | ] 747 | 748 | [[package]] 749 | name = "num-traits" 750 | version = "0.2.14" 751 | source = "registry+https://github.com/rust-lang/crates.io-index" 752 | checksum = "9a64b1ec5cda2586e284722486d802acf1f7dbdc623e2bfc57e65ca1cd099290" 753 | dependencies = [ 754 | "autocfg", 755 | ] 756 | 757 | [[package]] 758 | name = "num_cpus" 759 | version = "1.13.0" 760 | source = "registry+https://github.com/rust-lang/crates.io-index" 761 | checksum = "05499f3756671c15885fee9034446956fff3f243d6077b91e5767df161f766b3" 762 | dependencies = [ 763 | "hermit-abi", 764 | "libc", 765 | ] 766 | 767 | [[package]] 768 | name = "object" 769 | version = "0.23.0" 770 | source = "registry+https://github.com/rust-lang/crates.io-index" 771 | checksum = "a9a7ab5d64814df0fe4a4b5ead45ed6c5f181ee3ff04ba344313a6c80446c5d4" 772 | 773 | [[package]] 774 | name = "octocrab" 775 | version = "0.8.11" 776 | source = "registry+https://github.com/rust-lang/crates.io-index" 777 | checksum = "5db67b7f05e70ffcc9158ab6aaef69eb9478304951863ac03c7f4e6e029db061" 778 | dependencies = [ 779 | "arc-swap", 780 | "async-trait", 781 | "base64", 782 | "bytes", 783 | "chrono", 784 | "hyperx", 785 | "once_cell", 786 | "reqwest", 787 | "serde", 788 | "serde_json", 789 | "serde_path_to_error", 790 | "snafu", 791 | "url", 792 | ] 793 | 794 | [[package]] 795 | name = "once_cell" 796 | version = "1.5.2" 797 | source = "registry+https://github.com/rust-lang/crates.io-index" 798 | checksum = "13bd41f508810a131401606d54ac32a467c97172d74ba7662562ebba5ad07fa0" 799 | 800 | [[package]] 801 | name = "opaque-debug" 802 | version = "0.2.3" 803 | source = "registry+https://github.com/rust-lang/crates.io-index" 804 | checksum = "2839e79665f131bdb5782e51f2c6c9599c133c6098982a54c794358bf432529c" 805 | 806 | [[package]] 807 | name = "openssl" 808 | version = "0.10.32" 809 | source = "registry+https://github.com/rust-lang/crates.io-index" 810 | checksum = "038d43985d1ddca7a9900630d8cd031b56e4794eecc2e9ea39dd17aa04399a70" 811 | dependencies = [ 812 | "bitflags", 813 | "cfg-if", 814 | "foreign-types", 815 | "lazy_static", 816 | "libc", 817 | "openssl-sys", 818 | ] 819 | 820 | [[package]] 821 | name = "openssl-probe" 822 | version = "0.1.2" 823 | source = "registry+https://github.com/rust-lang/crates.io-index" 824 | checksum = "77af24da69f9d9341038eba93a073b1fdaaa1b788221b00a69bce9e762cb32de" 825 | 826 | [[package]] 827 | name = "openssl-sys" 828 | version = "0.9.60" 829 | source = "registry+https://github.com/rust-lang/crates.io-index" 830 | checksum = "921fc71883267538946025deffb622905ecad223c28efbfdef9bb59a0175f3e6" 831 | dependencies = [ 832 | "autocfg", 833 | "cc", 834 | "libc", 835 | "pkg-config", 836 | "vcpkg", 837 | ] 838 | 839 | [[package]] 840 | name = "parse-zoneinfo" 841 | version = "0.3.0" 842 | source = "registry+https://github.com/rust-lang/crates.io-index" 843 | checksum = "c705f256449c60da65e11ff6626e0c16a0a0b96aaa348de61376b249bc340f41" 844 | dependencies = [ 845 | "regex", 846 | ] 847 | 848 | [[package]] 849 | name = "percent-encoding" 850 | version = "2.1.0" 851 | source = "registry+https://github.com/rust-lang/crates.io-index" 852 | checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" 853 | 854 | [[package]] 855 | name = "pest" 856 | version = "2.1.3" 857 | source = "registry+https://github.com/rust-lang/crates.io-index" 858 | checksum = "10f4872ae94d7b90ae48754df22fd42ad52ce740b8f370b03da4835417403e53" 859 | dependencies = [ 860 | "ucd-trie", 861 | ] 862 | 863 | [[package]] 864 | name = "pest_derive" 865 | version = "2.1.0" 866 | source = "registry+https://github.com/rust-lang/crates.io-index" 867 | checksum = "833d1ae558dc601e9a60366421196a8d94bc0ac980476d0b67e1d0988d72b2d0" 868 | dependencies = [ 869 | "pest", 870 | "pest_generator", 871 | ] 872 | 873 | [[package]] 874 | name = "pest_generator" 875 | version = "2.1.3" 876 | source = "registry+https://github.com/rust-lang/crates.io-index" 877 | checksum = "99b8db626e31e5b81787b9783425769681b347011cc59471e33ea46d2ea0cf55" 878 | dependencies = [ 879 | "pest", 880 | "pest_meta", 881 | "proc-macro2", 882 | "quote", 883 | "syn", 884 | ] 885 | 886 | [[package]] 887 | name = "pest_meta" 888 | version = "2.1.3" 889 | source = "registry+https://github.com/rust-lang/crates.io-index" 890 | checksum = "54be6e404f5317079812fc8f9f5279de376d8856929e21c184ecf6bbd692a11d" 891 | dependencies = [ 892 | "maplit", 893 | "pest", 894 | "sha-1", 895 | ] 896 | 897 | [[package]] 898 | name = "pin-project" 899 | version = "0.4.27" 900 | source = "registry+https://github.com/rust-lang/crates.io-index" 901 | checksum = "2ffbc8e94b38ea3d2d8ba92aea2983b503cd75d0888d75b86bb37970b5698e15" 902 | dependencies = [ 903 | "pin-project-internal 0.4.27", 904 | ] 905 | 906 | [[package]] 907 | name = "pin-project" 908 | version = "1.0.5" 909 | source = "registry+https://github.com/rust-lang/crates.io-index" 910 | checksum = "96fa8ebb90271c4477f144354485b8068bd8f6b78b428b01ba892ca26caf0b63" 911 | dependencies = [ 912 | "pin-project-internal 1.0.5", 913 | ] 914 | 915 | [[package]] 916 | name = "pin-project-internal" 917 | version = "0.4.27" 918 | source = "registry+https://github.com/rust-lang/crates.io-index" 919 | checksum = "65ad2ae56b6abe3a1ee25f15ee605bacadb9a764edaba9c2bf4103800d4a1895" 920 | dependencies = [ 921 | "proc-macro2", 922 | "quote", 923 | "syn", 924 | ] 925 | 926 | [[package]] 927 | name = "pin-project-internal" 928 | version = "1.0.5" 929 | source = "registry+https://github.com/rust-lang/crates.io-index" 930 | checksum = "758669ae3558c6f74bd2a18b41f7ac0b5a195aea6639d6a9b5e5d1ad5ba24c0b" 931 | dependencies = [ 932 | "proc-macro2", 933 | "quote", 934 | "syn", 935 | ] 936 | 937 | [[package]] 938 | name = "pin-project-lite" 939 | version = "0.2.4" 940 | source = "registry+https://github.com/rust-lang/crates.io-index" 941 | checksum = "439697af366c49a6d0a010c56a0d97685bc140ce0d377b13a2ea2aa42d64a827" 942 | 943 | [[package]] 944 | name = "pin-utils" 945 | version = "0.1.0" 946 | source = "registry+https://github.com/rust-lang/crates.io-index" 947 | checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" 948 | 949 | [[package]] 950 | name = "pkg-config" 951 | version = "0.3.19" 952 | source = "registry+https://github.com/rust-lang/crates.io-index" 953 | checksum = "3831453b3449ceb48b6d9c7ad7c96d5ea673e9b470a1dc578c2ce6521230884c" 954 | 955 | [[package]] 956 | name = "ppv-lite86" 957 | version = "0.2.10" 958 | source = "registry+https://github.com/rust-lang/crates.io-index" 959 | checksum = "ac74c624d6b2d21f425f752262f42188365d7b8ff1aff74c82e45136510a4857" 960 | 961 | [[package]] 962 | name = "proc-macro-error" 963 | version = "1.0.4" 964 | source = "registry+https://github.com/rust-lang/crates.io-index" 965 | checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" 966 | dependencies = [ 967 | "proc-macro-error-attr", 968 | "proc-macro2", 969 | "quote", 970 | "syn", 971 | "version_check", 972 | ] 973 | 974 | [[package]] 975 | name = "proc-macro-error-attr" 976 | version = "1.0.4" 977 | source = "registry+https://github.com/rust-lang/crates.io-index" 978 | checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" 979 | dependencies = [ 980 | "proc-macro2", 981 | "quote", 982 | "version_check", 983 | ] 984 | 985 | [[package]] 986 | name = "proc-macro2" 987 | version = "1.0.24" 988 | source = "registry+https://github.com/rust-lang/crates.io-index" 989 | checksum = "1e0704ee1a7e00d7bb417d0770ea303c1bccbabf0ef1667dae92b5967f5f8a71" 990 | dependencies = [ 991 | "unicode-xid", 992 | ] 993 | 994 | [[package]] 995 | name = "quote" 996 | version = "1.0.8" 997 | source = "registry+https://github.com/rust-lang/crates.io-index" 998 | checksum = "991431c3519a3f36861882da93630ce66b52918dcf1b8e2fd66b397fc96f28df" 999 | dependencies = [ 1000 | "proc-macro2", 1001 | ] 1002 | 1003 | [[package]] 1004 | name = "rand" 1005 | version = "0.8.3" 1006 | source = "registry+https://github.com/rust-lang/crates.io-index" 1007 | checksum = "0ef9e7e66b4468674bfcb0c81af8b7fa0bb154fa9f28eb840da5c447baeb8d7e" 1008 | dependencies = [ 1009 | "libc", 1010 | "rand_chacha", 1011 | "rand_core", 1012 | "rand_hc", 1013 | ] 1014 | 1015 | [[package]] 1016 | name = "rand_chacha" 1017 | version = "0.3.0" 1018 | source = "registry+https://github.com/rust-lang/crates.io-index" 1019 | checksum = "e12735cf05c9e10bf21534da50a147b924d555dc7a547c42e6bb2d5b6017ae0d" 1020 | dependencies = [ 1021 | "ppv-lite86", 1022 | "rand_core", 1023 | ] 1024 | 1025 | [[package]] 1026 | name = "rand_core" 1027 | version = "0.6.1" 1028 | source = "registry+https://github.com/rust-lang/crates.io-index" 1029 | checksum = "c026d7df8b298d90ccbbc5190bd04d85e159eaf5576caeacf8741da93ccbd2e5" 1030 | dependencies = [ 1031 | "getrandom", 1032 | ] 1033 | 1034 | [[package]] 1035 | name = "rand_hc" 1036 | version = "0.3.0" 1037 | source = "registry+https://github.com/rust-lang/crates.io-index" 1038 | checksum = "3190ef7066a446f2e7f42e239d161e905420ccab01eb967c9eb27d21b2322a73" 1039 | dependencies = [ 1040 | "rand_core", 1041 | ] 1042 | 1043 | [[package]] 1044 | name = "redox_syscall" 1045 | version = "0.2.4" 1046 | source = "registry+https://github.com/rust-lang/crates.io-index" 1047 | checksum = "05ec8ca9416c5ea37062b502703cd7fcb207736bc294f6e0cf367ac6fc234570" 1048 | dependencies = [ 1049 | "bitflags", 1050 | ] 1051 | 1052 | [[package]] 1053 | name = "regex" 1054 | version = "1.4.3" 1055 | source = "registry+https://github.com/rust-lang/crates.io-index" 1056 | checksum = "d9251239e129e16308e70d853559389de218ac275b515068abc96829d05b948a" 1057 | dependencies = [ 1058 | "aho-corasick", 1059 | "memchr", 1060 | "regex-syntax", 1061 | "thread_local", 1062 | ] 1063 | 1064 | [[package]] 1065 | name = "regex-syntax" 1066 | version = "0.6.22" 1067 | source = "registry+https://github.com/rust-lang/crates.io-index" 1068 | checksum = "b5eb417147ba9860a96cfe72a0b93bf88fee1744b5636ec99ab20c1aa9376581" 1069 | 1070 | [[package]] 1071 | name = "relnotes" 1072 | version = "0.1.2" 1073 | dependencies = [ 1074 | "async-recursion", 1075 | "chrono", 1076 | "env_logger", 1077 | "eyre", 1078 | "log", 1079 | "octocrab", 1080 | "once_cell", 1081 | "regex", 1082 | "serde", 1083 | "serde_json", 1084 | "structopt", 1085 | "tera", 1086 | "tokio", 1087 | "toml", 1088 | ] 1089 | 1090 | [[package]] 1091 | name = "remove_dir_all" 1092 | version = "0.5.3" 1093 | source = "registry+https://github.com/rust-lang/crates.io-index" 1094 | checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7" 1095 | dependencies = [ 1096 | "winapi", 1097 | ] 1098 | 1099 | [[package]] 1100 | name = "reqwest" 1101 | version = "0.11.0" 1102 | source = "registry+https://github.com/rust-lang/crates.io-index" 1103 | checksum = "fd281b1030aa675fb90aa994d07187645bb3c8fc756ca766e7c3070b439de9de" 1104 | dependencies = [ 1105 | "base64", 1106 | "bytes", 1107 | "encoding_rs", 1108 | "futures-core", 1109 | "futures-util", 1110 | "http", 1111 | "http-body", 1112 | "hyper", 1113 | "hyper-tls", 1114 | "ipnet", 1115 | "js-sys", 1116 | "lazy_static", 1117 | "log", 1118 | "mime", 1119 | "native-tls", 1120 | "percent-encoding", 1121 | "pin-project-lite", 1122 | "serde", 1123 | "serde_json", 1124 | "serde_urlencoded", 1125 | "tokio", 1126 | "tokio-native-tls", 1127 | "url", 1128 | "wasm-bindgen", 1129 | "wasm-bindgen-futures", 1130 | "web-sys", 1131 | "winreg", 1132 | ] 1133 | 1134 | [[package]] 1135 | name = "rustc-demangle" 1136 | version = "0.1.18" 1137 | source = "registry+https://github.com/rust-lang/crates.io-index" 1138 | checksum = "6e3bad0ee36814ca07d7968269dd4b7ec89ec2da10c4bb613928d3077083c232" 1139 | 1140 | [[package]] 1141 | name = "ryu" 1142 | version = "1.0.5" 1143 | source = "registry+https://github.com/rust-lang/crates.io-index" 1144 | checksum = "71d301d4193d031abdd79ff7e3dd721168a9572ef3fe51a1517aba235bd8f86e" 1145 | 1146 | [[package]] 1147 | name = "same-file" 1148 | version = "1.0.6" 1149 | source = "registry+https://github.com/rust-lang/crates.io-index" 1150 | checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" 1151 | dependencies = [ 1152 | "winapi-util", 1153 | ] 1154 | 1155 | [[package]] 1156 | name = "schannel" 1157 | version = "0.1.19" 1158 | source = "registry+https://github.com/rust-lang/crates.io-index" 1159 | checksum = "8f05ba609c234e60bee0d547fe94a4c7e9da733d1c962cf6e59efa4cd9c8bc75" 1160 | dependencies = [ 1161 | "lazy_static", 1162 | "winapi", 1163 | ] 1164 | 1165 | [[package]] 1166 | name = "security-framework" 1167 | version = "2.0.0" 1168 | source = "registry+https://github.com/rust-lang/crates.io-index" 1169 | checksum = "c1759c2e3c8580017a484a7ac56d3abc5a6c1feadf88db2f3633f12ae4268c69" 1170 | dependencies = [ 1171 | "bitflags", 1172 | "core-foundation", 1173 | "core-foundation-sys", 1174 | "libc", 1175 | "security-framework-sys", 1176 | ] 1177 | 1178 | [[package]] 1179 | name = "security-framework-sys" 1180 | version = "2.0.0" 1181 | source = "registry+https://github.com/rust-lang/crates.io-index" 1182 | checksum = "f99b9d5e26d2a71633cc4f2ebae7cc9f874044e0c351a27e17892d76dce5678b" 1183 | dependencies = [ 1184 | "core-foundation-sys", 1185 | "libc", 1186 | ] 1187 | 1188 | [[package]] 1189 | name = "serde" 1190 | version = "1.0.123" 1191 | source = "registry+https://github.com/rust-lang/crates.io-index" 1192 | checksum = "92d5161132722baa40d802cc70b15262b98258453e85e5d1d365c757c73869ae" 1193 | dependencies = [ 1194 | "serde_derive", 1195 | ] 1196 | 1197 | [[package]] 1198 | name = "serde_derive" 1199 | version = "1.0.123" 1200 | source = "registry+https://github.com/rust-lang/crates.io-index" 1201 | checksum = "9391c295d64fc0abb2c556bad848f33cb8296276b1ad2677d1ae1ace4f258f31" 1202 | dependencies = [ 1203 | "proc-macro2", 1204 | "quote", 1205 | "syn", 1206 | ] 1207 | 1208 | [[package]] 1209 | name = "serde_json" 1210 | version = "1.0.62" 1211 | source = "registry+https://github.com/rust-lang/crates.io-index" 1212 | checksum = "ea1c6153794552ea7cf7cf63b1231a25de00ec90db326ba6264440fa08e31486" 1213 | dependencies = [ 1214 | "itoa", 1215 | "ryu", 1216 | "serde", 1217 | ] 1218 | 1219 | [[package]] 1220 | name = "serde_path_to_error" 1221 | version = "0.1.4" 1222 | source = "registry+https://github.com/rust-lang/crates.io-index" 1223 | checksum = "42f6109f0506e20f7e0f910e51a0079acf41da8e0694e6442527c4ddf5a2b158" 1224 | dependencies = [ 1225 | "serde", 1226 | ] 1227 | 1228 | [[package]] 1229 | name = "serde_urlencoded" 1230 | version = "0.7.0" 1231 | source = "registry+https://github.com/rust-lang/crates.io-index" 1232 | checksum = "edfa57a7f8d9c1d260a549e7224100f6c43d43f9103e06dd8b4095a9b2b43ce9" 1233 | dependencies = [ 1234 | "form_urlencoded", 1235 | "itoa", 1236 | "ryu", 1237 | "serde", 1238 | ] 1239 | 1240 | [[package]] 1241 | name = "sha-1" 1242 | version = "0.8.2" 1243 | source = "registry+https://github.com/rust-lang/crates.io-index" 1244 | checksum = "f7d94d0bede923b3cea61f3f1ff57ff8cdfd77b400fb8f9998949e0cf04163df" 1245 | dependencies = [ 1246 | "block-buffer", 1247 | "digest", 1248 | "fake-simd", 1249 | "opaque-debug", 1250 | ] 1251 | 1252 | [[package]] 1253 | name = "slab" 1254 | version = "0.4.2" 1255 | source = "registry+https://github.com/rust-lang/crates.io-index" 1256 | checksum = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8" 1257 | 1258 | [[package]] 1259 | name = "slug" 1260 | version = "0.1.4" 1261 | source = "registry+https://github.com/rust-lang/crates.io-index" 1262 | checksum = "b3bc762e6a4b6c6fcaade73e77f9ebc6991b676f88bb2358bddb56560f073373" 1263 | dependencies = [ 1264 | "deunicode", 1265 | ] 1266 | 1267 | [[package]] 1268 | name = "snafu" 1269 | version = "0.6.10" 1270 | source = "registry+https://github.com/rust-lang/crates.io-index" 1271 | checksum = "eab12d3c261b2308b0d80c26fffb58d17eba81a4be97890101f416b478c79ca7" 1272 | dependencies = [ 1273 | "backtrace", 1274 | "doc-comment", 1275 | "snafu-derive", 1276 | ] 1277 | 1278 | [[package]] 1279 | name = "snafu-derive" 1280 | version = "0.6.10" 1281 | source = "registry+https://github.com/rust-lang/crates.io-index" 1282 | checksum = "1508efa03c362e23817f96cde18abed596a25219a8b2c66e8db33c03543d315b" 1283 | dependencies = [ 1284 | "proc-macro2", 1285 | "quote", 1286 | "syn", 1287 | ] 1288 | 1289 | [[package]] 1290 | name = "socket2" 1291 | version = "0.3.19" 1292 | source = "registry+https://github.com/rust-lang/crates.io-index" 1293 | checksum = "122e570113d28d773067fab24266b66753f6ea915758651696b6e35e49f88d6e" 1294 | dependencies = [ 1295 | "cfg-if", 1296 | "libc", 1297 | "winapi", 1298 | ] 1299 | 1300 | [[package]] 1301 | name = "strsim" 1302 | version = "0.8.0" 1303 | source = "registry+https://github.com/rust-lang/crates.io-index" 1304 | checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" 1305 | 1306 | [[package]] 1307 | name = "structopt" 1308 | version = "0.3.21" 1309 | source = "registry+https://github.com/rust-lang/crates.io-index" 1310 | checksum = "5277acd7ee46e63e5168a80734c9f6ee81b1367a7d8772a2d765df2a3705d28c" 1311 | dependencies = [ 1312 | "clap", 1313 | "lazy_static", 1314 | "structopt-derive", 1315 | ] 1316 | 1317 | [[package]] 1318 | name = "structopt-derive" 1319 | version = "0.4.14" 1320 | source = "registry+https://github.com/rust-lang/crates.io-index" 1321 | checksum = "5ba9cdfda491b814720b6b06e0cac513d922fc407582032e8706e9f137976f90" 1322 | dependencies = [ 1323 | "heck", 1324 | "proc-macro-error", 1325 | "proc-macro2", 1326 | "quote", 1327 | "syn", 1328 | ] 1329 | 1330 | [[package]] 1331 | name = "syn" 1332 | version = "1.0.60" 1333 | source = "registry+https://github.com/rust-lang/crates.io-index" 1334 | checksum = "c700597eca8a5a762beb35753ef6b94df201c81cca676604f547495a0d7f0081" 1335 | dependencies = [ 1336 | "proc-macro2", 1337 | "quote", 1338 | "unicode-xid", 1339 | ] 1340 | 1341 | [[package]] 1342 | name = "tempfile" 1343 | version = "3.2.0" 1344 | source = "registry+https://github.com/rust-lang/crates.io-index" 1345 | checksum = "dac1c663cfc93810f88aed9b8941d48cabf856a1b111c29a40439018d870eb22" 1346 | dependencies = [ 1347 | "cfg-if", 1348 | "libc", 1349 | "rand", 1350 | "redox_syscall", 1351 | "remove_dir_all", 1352 | "winapi", 1353 | ] 1354 | 1355 | [[package]] 1356 | name = "tera" 1357 | version = "1.6.1" 1358 | source = "registry+https://github.com/rust-lang/crates.io-index" 1359 | checksum = "eac6ab7eacf40937241959d540670f06209c38ceadb62116999db4a950fbf8dc" 1360 | dependencies = [ 1361 | "chrono", 1362 | "chrono-tz", 1363 | "globwalk", 1364 | "humansize", 1365 | "lazy_static", 1366 | "percent-encoding", 1367 | "pest", 1368 | "pest_derive", 1369 | "rand", 1370 | "regex", 1371 | "serde", 1372 | "serde_json", 1373 | "slug", 1374 | "unic-segment", 1375 | ] 1376 | 1377 | [[package]] 1378 | name = "termcolor" 1379 | version = "1.1.2" 1380 | source = "registry+https://github.com/rust-lang/crates.io-index" 1381 | checksum = "2dfed899f0eb03f32ee8c6a0aabdb8a7949659e3466561fc0adf54e26d88c5f4" 1382 | dependencies = [ 1383 | "winapi-util", 1384 | ] 1385 | 1386 | [[package]] 1387 | name = "textwrap" 1388 | version = "0.11.0" 1389 | source = "registry+https://github.com/rust-lang/crates.io-index" 1390 | checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" 1391 | dependencies = [ 1392 | "unicode-width", 1393 | ] 1394 | 1395 | [[package]] 1396 | name = "thread_local" 1397 | version = "1.1.3" 1398 | source = "registry+https://github.com/rust-lang/crates.io-index" 1399 | checksum = "8018d24e04c95ac8790716a5987d0fec4f8b27249ffa0f7d33f1369bdfb88cbd" 1400 | dependencies = [ 1401 | "once_cell", 1402 | ] 1403 | 1404 | [[package]] 1405 | name = "time" 1406 | version = "0.1.44" 1407 | source = "registry+https://github.com/rust-lang/crates.io-index" 1408 | checksum = "6db9e6914ab8b1ae1c260a4ae7a49b6c5611b40328a735b21862567685e73255" 1409 | dependencies = [ 1410 | "libc", 1411 | "wasi", 1412 | "winapi", 1413 | ] 1414 | 1415 | [[package]] 1416 | name = "tinyvec" 1417 | version = "1.1.1" 1418 | source = "registry+https://github.com/rust-lang/crates.io-index" 1419 | checksum = "317cca572a0e89c3ce0ca1f1bdc9369547fe318a683418e42ac8f59d14701023" 1420 | dependencies = [ 1421 | "tinyvec_macros", 1422 | ] 1423 | 1424 | [[package]] 1425 | name = "tinyvec_macros" 1426 | version = "0.1.0" 1427 | source = "registry+https://github.com/rust-lang/crates.io-index" 1428 | checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" 1429 | 1430 | [[package]] 1431 | name = "tokio" 1432 | version = "1.2.0" 1433 | source = "registry+https://github.com/rust-lang/crates.io-index" 1434 | checksum = "e8190d04c665ea9e6b6a0dc45523ade572c088d2e6566244c1122671dbf4ae3a" 1435 | dependencies = [ 1436 | "autocfg", 1437 | "bytes", 1438 | "libc", 1439 | "memchr", 1440 | "mio", 1441 | "num_cpus", 1442 | "pin-project-lite", 1443 | "tokio-macros", 1444 | ] 1445 | 1446 | [[package]] 1447 | name = "tokio-macros" 1448 | version = "1.1.0" 1449 | source = "registry+https://github.com/rust-lang/crates.io-index" 1450 | checksum = "caf7b11a536f46a809a8a9f0bb4237020f70ecbf115b842360afb127ea2fda57" 1451 | dependencies = [ 1452 | "proc-macro2", 1453 | "quote", 1454 | "syn", 1455 | ] 1456 | 1457 | [[package]] 1458 | name = "tokio-native-tls" 1459 | version = "0.3.0" 1460 | source = "registry+https://github.com/rust-lang/crates.io-index" 1461 | checksum = "f7d995660bd2b7f8c1568414c1126076c13fbb725c40112dc0120b78eb9b717b" 1462 | dependencies = [ 1463 | "native-tls", 1464 | "tokio", 1465 | ] 1466 | 1467 | [[package]] 1468 | name = "tokio-util" 1469 | version = "0.6.3" 1470 | source = "registry+https://github.com/rust-lang/crates.io-index" 1471 | checksum = "ebb7cb2f00c5ae8df755b252306272cd1790d39728363936e01827e11f0b017b" 1472 | dependencies = [ 1473 | "bytes", 1474 | "futures-core", 1475 | "futures-sink", 1476 | "log", 1477 | "pin-project-lite", 1478 | "tokio", 1479 | ] 1480 | 1481 | [[package]] 1482 | name = "toml" 1483 | version = "0.5.8" 1484 | source = "registry+https://github.com/rust-lang/crates.io-index" 1485 | checksum = "a31142970826733df8241ef35dc040ef98c679ab14d7c3e54d827099b3acecaa" 1486 | dependencies = [ 1487 | "serde", 1488 | ] 1489 | 1490 | [[package]] 1491 | name = "tower-service" 1492 | version = "0.3.1" 1493 | source = "registry+https://github.com/rust-lang/crates.io-index" 1494 | checksum = "360dfd1d6d30e05fda32ace2c8c70e9c0a9da713275777f5a4dbb8a1893930c6" 1495 | 1496 | [[package]] 1497 | name = "tracing" 1498 | version = "0.1.23" 1499 | source = "registry+https://github.com/rust-lang/crates.io-index" 1500 | checksum = "f7d40a22fd029e33300d8d89a5cc8ffce18bb7c587662f54629e94c9de5487f3" 1501 | dependencies = [ 1502 | "cfg-if", 1503 | "pin-project-lite", 1504 | "tracing-core", 1505 | ] 1506 | 1507 | [[package]] 1508 | name = "tracing-core" 1509 | version = "0.1.17" 1510 | source = "registry+https://github.com/rust-lang/crates.io-index" 1511 | checksum = "f50de3927f93d202783f4513cda820ab47ef17f624b03c096e86ef00c67e6b5f" 1512 | dependencies = [ 1513 | "lazy_static", 1514 | ] 1515 | 1516 | [[package]] 1517 | name = "tracing-futures" 1518 | version = "0.2.4" 1519 | source = "registry+https://github.com/rust-lang/crates.io-index" 1520 | checksum = "ab7bb6f14721aa00656086e9335d363c5c8747bae02ebe32ea2c7dece5689b4c" 1521 | dependencies = [ 1522 | "pin-project 0.4.27", 1523 | "tracing", 1524 | ] 1525 | 1526 | [[package]] 1527 | name = "try-lock" 1528 | version = "0.2.3" 1529 | source = "registry+https://github.com/rust-lang/crates.io-index" 1530 | checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" 1531 | 1532 | [[package]] 1533 | name = "typenum" 1534 | version = "1.12.0" 1535 | source = "registry+https://github.com/rust-lang/crates.io-index" 1536 | checksum = "373c8a200f9e67a0c95e62a4f52fbf80c23b4381c05a17845531982fa99e6b33" 1537 | 1538 | [[package]] 1539 | name = "ucd-trie" 1540 | version = "0.1.3" 1541 | source = "registry+https://github.com/rust-lang/crates.io-index" 1542 | checksum = "56dee185309b50d1f11bfedef0fe6d036842e3fb77413abef29f8f8d1c5d4c1c" 1543 | 1544 | [[package]] 1545 | name = "unic-char-property" 1546 | version = "0.9.0" 1547 | source = "registry+https://github.com/rust-lang/crates.io-index" 1548 | checksum = "a8c57a407d9b6fa02b4795eb81c5b6652060a15a7903ea981f3d723e6c0be221" 1549 | dependencies = [ 1550 | "unic-char-range", 1551 | ] 1552 | 1553 | [[package]] 1554 | name = "unic-char-range" 1555 | version = "0.9.0" 1556 | source = "registry+https://github.com/rust-lang/crates.io-index" 1557 | checksum = "0398022d5f700414f6b899e10b8348231abf9173fa93144cbc1a43b9793c1fbc" 1558 | 1559 | [[package]] 1560 | name = "unic-common" 1561 | version = "0.9.0" 1562 | source = "registry+https://github.com/rust-lang/crates.io-index" 1563 | checksum = "80d7ff825a6a654ee85a63e80f92f054f904f21e7d12da4e22f9834a4aaa35bc" 1564 | 1565 | [[package]] 1566 | name = "unic-segment" 1567 | version = "0.9.0" 1568 | source = "registry+https://github.com/rust-lang/crates.io-index" 1569 | checksum = "e4ed5d26be57f84f176157270c112ef57b86debac9cd21daaabbe56db0f88f23" 1570 | dependencies = [ 1571 | "unic-ucd-segment", 1572 | ] 1573 | 1574 | [[package]] 1575 | name = "unic-ucd-segment" 1576 | version = "0.9.0" 1577 | source = "registry+https://github.com/rust-lang/crates.io-index" 1578 | checksum = "2079c122a62205b421f499da10f3ee0f7697f012f55b675e002483c73ea34700" 1579 | dependencies = [ 1580 | "unic-char-property", 1581 | "unic-char-range", 1582 | "unic-ucd-version", 1583 | ] 1584 | 1585 | [[package]] 1586 | name = "unic-ucd-version" 1587 | version = "0.9.0" 1588 | source = "registry+https://github.com/rust-lang/crates.io-index" 1589 | checksum = "96bd2f2237fe450fcd0a1d2f5f4e91711124f7857ba2e964247776ebeeb7b0c4" 1590 | dependencies = [ 1591 | "unic-common", 1592 | ] 1593 | 1594 | [[package]] 1595 | name = "unicase" 1596 | version = "2.6.0" 1597 | source = "registry+https://github.com/rust-lang/crates.io-index" 1598 | checksum = "50f37be617794602aabbeee0be4f259dc1778fabe05e2d67ee8f79326d5cb4f6" 1599 | dependencies = [ 1600 | "version_check", 1601 | ] 1602 | 1603 | [[package]] 1604 | name = "unicode-bidi" 1605 | version = "0.3.4" 1606 | source = "registry+https://github.com/rust-lang/crates.io-index" 1607 | checksum = "49f2bd0c6468a8230e1db229cff8029217cf623c767ea5d60bfbd42729ea54d5" 1608 | dependencies = [ 1609 | "matches", 1610 | ] 1611 | 1612 | [[package]] 1613 | name = "unicode-normalization" 1614 | version = "0.1.17" 1615 | source = "registry+https://github.com/rust-lang/crates.io-index" 1616 | checksum = "07fbfce1c8a97d547e8b5334978438d9d6ec8c20e38f56d4a4374d181493eaef" 1617 | dependencies = [ 1618 | "tinyvec", 1619 | ] 1620 | 1621 | [[package]] 1622 | name = "unicode-segmentation" 1623 | version = "1.7.1" 1624 | source = "registry+https://github.com/rust-lang/crates.io-index" 1625 | checksum = "bb0d2e7be6ae3a5fa87eed5fb451aff96f2573d2694942e40543ae0bbe19c796" 1626 | 1627 | [[package]] 1628 | name = "unicode-width" 1629 | version = "0.1.8" 1630 | source = "registry+https://github.com/rust-lang/crates.io-index" 1631 | checksum = "9337591893a19b88d8d87f2cec1e73fad5cdfd10e5a6f349f498ad6ea2ffb1e3" 1632 | 1633 | [[package]] 1634 | name = "unicode-xid" 1635 | version = "0.2.1" 1636 | source = "registry+https://github.com/rust-lang/crates.io-index" 1637 | checksum = "f7fe0bb3479651439c9112f72b6c505038574c9fbb575ed1bf3b797fa39dd564" 1638 | 1639 | [[package]] 1640 | name = "url" 1641 | version = "2.2.0" 1642 | source = "registry+https://github.com/rust-lang/crates.io-index" 1643 | checksum = "5909f2b0817350449ed73e8bcd81c8c3c8d9a7a5d8acba4b27db277f1868976e" 1644 | dependencies = [ 1645 | "form_urlencoded", 1646 | "idna", 1647 | "matches", 1648 | "percent-encoding", 1649 | "serde", 1650 | ] 1651 | 1652 | [[package]] 1653 | name = "vcpkg" 1654 | version = "0.2.11" 1655 | source = "registry+https://github.com/rust-lang/crates.io-index" 1656 | checksum = "b00bca6106a5e23f3eee943593759b7fcddb00554332e856d990c893966879fb" 1657 | 1658 | [[package]] 1659 | name = "vec_map" 1660 | version = "0.8.2" 1661 | source = "registry+https://github.com/rust-lang/crates.io-index" 1662 | checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" 1663 | 1664 | [[package]] 1665 | name = "version_check" 1666 | version = "0.9.2" 1667 | source = "registry+https://github.com/rust-lang/crates.io-index" 1668 | checksum = "b5a972e5669d67ba988ce3dc826706fb0a8b01471c088cb0b6110b805cc36aed" 1669 | 1670 | [[package]] 1671 | name = "walkdir" 1672 | version = "2.3.1" 1673 | source = "registry+https://github.com/rust-lang/crates.io-index" 1674 | checksum = "777182bc735b6424e1a57516d35ed72cb8019d85c8c9bf536dccb3445c1a2f7d" 1675 | dependencies = [ 1676 | "same-file", 1677 | "winapi", 1678 | "winapi-util", 1679 | ] 1680 | 1681 | [[package]] 1682 | name = "want" 1683 | version = "0.3.0" 1684 | source = "registry+https://github.com/rust-lang/crates.io-index" 1685 | checksum = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0" 1686 | dependencies = [ 1687 | "log", 1688 | "try-lock", 1689 | ] 1690 | 1691 | [[package]] 1692 | name = "wasi" 1693 | version = "0.10.0+wasi-snapshot-preview1" 1694 | source = "registry+https://github.com/rust-lang/crates.io-index" 1695 | checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f" 1696 | 1697 | [[package]] 1698 | name = "wasm-bindgen" 1699 | version = "0.2.70" 1700 | source = "registry+https://github.com/rust-lang/crates.io-index" 1701 | checksum = "55c0f7123de74f0dab9b7d00fd614e7b19349cd1e2f5252bbe9b1754b59433be" 1702 | dependencies = [ 1703 | "cfg-if", 1704 | "serde", 1705 | "serde_json", 1706 | "wasm-bindgen-macro", 1707 | ] 1708 | 1709 | [[package]] 1710 | name = "wasm-bindgen-backend" 1711 | version = "0.2.70" 1712 | source = "registry+https://github.com/rust-lang/crates.io-index" 1713 | checksum = "7bc45447f0d4573f3d65720f636bbcc3dd6ce920ed704670118650bcd47764c7" 1714 | dependencies = [ 1715 | "bumpalo", 1716 | "lazy_static", 1717 | "log", 1718 | "proc-macro2", 1719 | "quote", 1720 | "syn", 1721 | "wasm-bindgen-shared", 1722 | ] 1723 | 1724 | [[package]] 1725 | name = "wasm-bindgen-futures" 1726 | version = "0.4.20" 1727 | source = "registry+https://github.com/rust-lang/crates.io-index" 1728 | checksum = "3de431a2910c86679c34283a33f66f4e4abd7e0aec27b6669060148872aadf94" 1729 | dependencies = [ 1730 | "cfg-if", 1731 | "js-sys", 1732 | "wasm-bindgen", 1733 | "web-sys", 1734 | ] 1735 | 1736 | [[package]] 1737 | name = "wasm-bindgen-macro" 1738 | version = "0.2.70" 1739 | source = "registry+https://github.com/rust-lang/crates.io-index" 1740 | checksum = "3b8853882eef39593ad4174dd26fc9865a64e84026d223f63bb2c42affcbba2c" 1741 | dependencies = [ 1742 | "quote", 1743 | "wasm-bindgen-macro-support", 1744 | ] 1745 | 1746 | [[package]] 1747 | name = "wasm-bindgen-macro-support" 1748 | version = "0.2.70" 1749 | source = "registry+https://github.com/rust-lang/crates.io-index" 1750 | checksum = "4133b5e7f2a531fa413b3a1695e925038a05a71cf67e87dafa295cb645a01385" 1751 | dependencies = [ 1752 | "proc-macro2", 1753 | "quote", 1754 | "syn", 1755 | "wasm-bindgen-backend", 1756 | "wasm-bindgen-shared", 1757 | ] 1758 | 1759 | [[package]] 1760 | name = "wasm-bindgen-shared" 1761 | version = "0.2.70" 1762 | source = "registry+https://github.com/rust-lang/crates.io-index" 1763 | checksum = "dd4945e4943ae02d15c13962b38a5b1e81eadd4b71214eee75af64a4d6a4fd64" 1764 | 1765 | [[package]] 1766 | name = "web-sys" 1767 | version = "0.3.47" 1768 | source = "registry+https://github.com/rust-lang/crates.io-index" 1769 | checksum = "c40dc691fc48003eba817c38da7113c15698142da971298003cac3ef175680b3" 1770 | dependencies = [ 1771 | "js-sys", 1772 | "wasm-bindgen", 1773 | ] 1774 | 1775 | [[package]] 1776 | name = "winapi" 1777 | version = "0.3.9" 1778 | source = "registry+https://github.com/rust-lang/crates.io-index" 1779 | checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" 1780 | dependencies = [ 1781 | "winapi-i686-pc-windows-gnu", 1782 | "winapi-x86_64-pc-windows-gnu", 1783 | ] 1784 | 1785 | [[package]] 1786 | name = "winapi-i686-pc-windows-gnu" 1787 | version = "0.4.0" 1788 | source = "registry+https://github.com/rust-lang/crates.io-index" 1789 | checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" 1790 | 1791 | [[package]] 1792 | name = "winapi-util" 1793 | version = "0.1.5" 1794 | source = "registry+https://github.com/rust-lang/crates.io-index" 1795 | checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" 1796 | dependencies = [ 1797 | "winapi", 1798 | ] 1799 | 1800 | [[package]] 1801 | name = "winapi-x86_64-pc-windows-gnu" 1802 | version = "0.4.0" 1803 | source = "registry+https://github.com/rust-lang/crates.io-index" 1804 | checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" 1805 | 1806 | [[package]] 1807 | name = "winreg" 1808 | version = "0.7.0" 1809 | source = "registry+https://github.com/rust-lang/crates.io-index" 1810 | checksum = "0120db82e8a1e0b9fb3345a539c478767c0048d842860994d96113d5b667bd69" 1811 | dependencies = [ 1812 | "winapi", 1813 | ] 1814 | -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "relnotes" 3 | version = "0.1.2" 4 | authors = ["Erin Power "] 5 | description = "A tool to automatically generate release notes for your project." 6 | license = "MIT OR Apache-2.0" 7 | edition = "2018" 8 | 9 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 10 | 11 | [dependencies] 12 | async-recursion = "0.3.1" 13 | chrono = "0.4.19" 14 | octocrab = "0.8" 15 | env_logger = "0.8.1" 16 | log = "0.4.11" 17 | once_cell = "1.4.1" 18 | regex = "1.4.1" 19 | serde = { version = "1.0.116", features = ["derive"] } 20 | serde_json = "1.0.59" 21 | structopt = "0.3.20" 22 | tera = "1.5.0" 23 | tokio = { version = "1", features = ["macros", "fs", "rt-multi-thread"] } 24 | toml = "0.5.7" 25 | eyre = "0.6" 26 | -------------------------------------------------------------------------------- /LICENSE-APACHE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright [yyyy] [name of copyright owner] 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /LICENSE-MIT: -------------------------------------------------------------------------------- 1 | Copyright (c) 2019 Embark Studios 2 | 3 | Permission is hereby granted, free of charge, to any 4 | person obtaining a copy of this software and associated 5 | documentation files (the "Software"), to deal in the 6 | Software without restriction, including without 7 | limitation the rights to use, copy, modify, merge, 8 | publish, distribute, sublicense, and/or sell copies of 9 | the Software, and to permit persons to whom the Software 10 | is furnished to do so, subject to the following 11 | conditions: 12 | 13 | The above copyright notice and this permission notice 14 | shall be included in all copies or substantial portions 15 | of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF 18 | ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED 19 | TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 20 | PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT 21 | SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 22 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 23 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR 24 | IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 25 | DEALINGS IN THE SOFTWARE. 26 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # 📓 Relnotes: Automatic GitHub Release Notes 2 | 3 | [![Build Status](https://github.com/EmbarkStudios/relnotes/workflows/CI/badge.svg)](https://github.com/EmbarkStudios/relnotes/actions?workflow=CI) 7 | [![Contributor Covenant](https://img.shields.io/badge/contributor%20covenant-v1.4%20adopted-ff69b4.svg)](CODE_OF_CONDUCT.md) 8 | [![Embark](https://img.shields.io/badge/embark-open%20source-blueviolet.svg)](https://embark.dev) 9 | 10 | Relnotes is a tool to automatically generate a file containing every merged pull request for a GitHub repository. It comes with a simple configuration file and powerful templating allowing you to easily create release notes in your preferred format and organisation. 11 | 12 | ## How it works 13 | ## Features 14 | 15 | - Automatically gets all merged PRs since the last release, and can be configured for different release schedules. 16 | - Automatic list of contributors for the release. 17 | - Label filtering and categorisation using regular expressions. 18 | - Powerful configuration file for advanced layouts. 19 | - Supports collecting changes from multiple repositories. 20 | - Uses [Tera] templates for release notes format. 21 | 22 | [tera]: https://tera.netlify.app 23 | 24 | ## How It Works 25 | The basic usage of `relnotes` works by providing the repository and version of new the release. For example if you wanted the release notes of a potential new `0.3.0` release of [rust-gpu], you would run the following. 26 | 27 | ``` 28 | relnotes EmbarkStudios/rust-gpu@0.3.0 29 | ``` 30 | 31 | This will generate the following markdown: 32 | 33 | ```markdown 34 | # rust-gpu 0.3.0 (2020-12-29) 35 | 36 | - [Update .cargo/config Shader Compilation Setup](https://github.com/EmbarkStudios/rust-gpu/pull/356) 37 | - [Upgrade winit v0.23 -> v0.24](https://github.com/EmbarkStudios/rust-gpu/pull/353) 38 | - [Update spirv-tools](https://github.com/EmbarkStudios/rust-gpu/pull/351) 39 | - [Renamed spirv-attrib to spirv-std-macros](https://github.com/EmbarkStudios/rust-gpu/pull/347) 40 | 41 | 42 | ## Contributors 43 | 44 | - [DGriffin91](https://github.com/DGriffin91) 45 | - [Hentropy](https://github.com/Hentropy) 46 | - [Jake-Shadle](https://github.com/Jake-Shadle) 47 | - [VZout](https://github.com/VZout) 48 | 49 | ``` 50 | 51 | 52 | ## Configuration File 53 | ```toml 54 | # GitHub repository owner 55 | owner = "EmbarkStudios" 56 | # GitHub Repository 57 | repo = "relnotes" 58 | # Both `from` and `to` accept either any fixed timestamp, `today`, or 59 | # `release:` followed by either a tag to use that tag's release date 60 | # or `latest` to always select the latest release. 61 | # Syntax: ))> 62 | # 63 | # The start of the new release timeframe. Default: `release:latest`. 64 | from = "release:latest" 65 | # The end of the timeframe. Default: `today`. 66 | to = "today" 67 | # Format string for the `date` variable in `[template]`. Default: `%Y-%m-%d` 68 | date-format = "%Y-%m-%d" 69 | # Set of regular expressions that if any of the PR's labels match will 70 | # be skipped and not included in the release notes. Default: `[]` 71 | skip-labels = [] 72 | 73 | # A set of categories to populate the `categories` variable and to help 74 | # organise the release notes, if any of the issues labels match the set 75 | # of regexes in `labels` it will be placed in this category. (Priority matches 76 | # order in toml file). Default: empty 77 | [[categories]] 78 | # The title of the category 79 | title = "Updated Dependencies" 80 | # Set of regexes to match against the labels. 81 | labels = ["dependencies"] 82 | 83 | # Additional repositories to include in the release notes. It has all 84 | # of the same properties as root (except `includes`), and inherits root's 85 | # configuration if omitted. 86 | [[includes]] 87 | owner = "owner" 88 | repo = "repo" 89 | # Gets the timeframe from the root repository rather than the `includes` 90 | # repository. 91 | uses-parent-for-timeframe = false 92 | # from = "release:latest" 93 | # to = "today" 94 | # date-format = "%Y-%m-%d" 95 | # skip-labels = [] 96 | # [[includes.categories]] 97 | 98 | # The template to generate the release notes. The `[template]` map accepts 99 | # either a `string` literal or a `path` to the tera template to use. (Does 100 | # not accept both.) 101 | # Variables available 102 | # - `version`: The version passed to `relnotes` 103 | # - `date`: The `to` date formatted by `date_format`. 104 | # - `categories`: A map of prs categorised by their `title`. `title -> prs` 105 | # - `prs`: Any PRs that weren't filtered or categorised. 106 | [template] 107 | # path = "template.md" 108 | string = """ 109 | Version {{version}} ({{date}}) 110 | ============================ 111 | 112 | {% for title, prs in categories %} 113 | ## {{ title }} 114 | {%- for pr in prs %} 115 | - [{{pr.title}}]({{pr.html_url}}) 116 | {%- endfor %} 117 | {% endfor %} 118 | 119 | ## Uncategorised PRs 120 | {% for pr in prs -%} 121 | - [{{pr.title}}]({{pr.html_url}}) 122 | {% endfor %} 123 | """ 124 | ``` 125 | 126 | ## Contributing 127 | 128 | We welcome community contributions to this project. 129 | 130 | Please read our [Contributor Guide](CONTRIBUTING.md) for more information on how to get started. 131 | 132 | ## License 133 | 134 | Licensed under either of 135 | 136 | * Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0) 137 | * MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT) 138 | 139 | at your option. 140 | 141 | ### Contribution 142 | 143 | Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions. 144 | -------------------------------------------------------------------------------- /src/config.rs: -------------------------------------------------------------------------------- 1 | pub mod template; 2 | pub mod timeframe; 3 | 4 | use regex::RegexSet; 5 | use serde::Deserialize; 6 | 7 | pub use template::*; 8 | pub use timeframe::*; 9 | 10 | fn default_from() -> Timeframe { 11 | Timeframe::Release(ReleaseKind::Latest) 12 | } 13 | 14 | fn default_to() -> Timeframe { 15 | Timeframe::Date(DateKind::Today) 16 | } 17 | 18 | pub const DATE_FORMAT: &str = "%Y-%m-%d"; 19 | 20 | fn default_date_format() -> String { 21 | String::from(DATE_FORMAT) 22 | } 23 | 24 | #[derive(Clone, Debug, Deserialize)] 25 | pub struct Category { 26 | pub title: String, 27 | #[serde(deserialize_with = "from_regex_set")] 28 | #[serde(default = "default_regex_set")] 29 | pub labels: RegexSet, 30 | } 31 | 32 | fn default_regex_set() -> RegexSet { 33 | // const to get around type inference issues. 34 | const EMPTY: &[&str] = &[]; 35 | RegexSet::new(EMPTY).unwrap() 36 | } 37 | 38 | fn from_optional_regex_set<'de, D>(de: D) -> Result, D::Error> 39 | where 40 | D: serde::Deserializer<'de>, 41 | { 42 | let list: Option> = <_>::deserialize(de)?; 43 | 44 | if list.is_none() { 45 | return Ok(None); 46 | } 47 | #[allow(clippy::map_err_ignore)] 48 | // ignore because we cannot implement a foreign trait on a foreign struct 49 | regex::RegexSet::new(list.unwrap()) 50 | .map(Some) 51 | .map_err(|_| serde::de::Error::custom("Category labels were not valid regular expressions")) 52 | } 53 | 54 | fn from_regex_set<'de, D>(de: D) -> Result 55 | where 56 | D: serde::Deserializer<'de>, 57 | { 58 | let regex_set = from_optional_regex_set(de)?; 59 | 60 | if let Some(regex_set) = regex_set { 61 | Ok(regex_set) 62 | } else { 63 | Err(serde::de::Error::custom("Label RegexSet not found.")) 64 | } 65 | } 66 | 67 | #[derive(Debug, Deserialize)] 68 | #[serde(rename_all = "kebab-case")] 69 | pub struct Config { 70 | #[serde(default = "default_from")] 71 | pub from: Timeframe, 72 | #[serde(default = "default_to")] 73 | pub to: Timeframe, 74 | pub owner: String, 75 | pub repo: String, 76 | pub title: Option, 77 | #[serde(default = "default_date_format")] 78 | pub date_format: String, 79 | #[serde(deserialize_with = "from_regex_set")] 80 | #[serde(default = "default_regex_set")] 81 | pub skip_labels: RegexSet, 82 | #[serde(default)] 83 | pub categories: Vec, 84 | pub template: Template, 85 | #[serde(default)] 86 | includes: Vec, 87 | #[serde(default)] 88 | parent: Option<(String, String)>, 89 | } 90 | 91 | impl Config { 92 | pub fn new(owner: String, repo: String) -> Self { 93 | Self { 94 | categories: Vec::new(), 95 | date_format: default_date_format(), 96 | from: default_from(), 97 | includes: Vec::new(), 98 | owner, 99 | parent: None, 100 | repo, 101 | skip_labels: default_regex_set(), 102 | template: Template::default(), 103 | title: None, 104 | to: default_to(), 105 | } 106 | } 107 | } 108 | 109 | #[derive(Clone, Debug, Deserialize)] 110 | #[serde(rename_all = "kebab-case")] 111 | pub struct IncludeConfig { 112 | pub owner: String, 113 | pub repo: String, 114 | pub title: Option, 115 | pub from: Option, 116 | pub to: Option, 117 | pub date_format: Option, 118 | #[serde(deserialize_with = "from_optional_regex_set")] 119 | #[serde(default)] 120 | pub skip_labels: Option, 121 | pub categories: Option>, 122 | #[serde(default)] 123 | pub uses_root_timeframe: bool, 124 | } 125 | 126 | impl Config { 127 | pub fn includes(&self) -> Vec { 128 | self.includes 129 | .iter() 130 | .cloned() 131 | .map(|ic| { 132 | let parent = if ic.uses_root_timeframe { 133 | Some((self.owner.clone(), self.repo.clone())) 134 | } else { 135 | None 136 | }; 137 | 138 | Self { 139 | owner: ic.owner, 140 | repo: ic.repo, 141 | title: ic.title, 142 | from: ic.from.unwrap_or_else(|| self.from.clone()), 143 | to: ic.to.unwrap_or_else(|| self.to.clone()), 144 | date_format: ic.date_format.unwrap_or_else(|| self.date_format.clone()), 145 | skip_labels: ic.skip_labels.unwrap_or_else(|| self.skip_labels.clone()), 146 | categories: ic.categories.unwrap_or_else(|| self.categories.clone()), 147 | template: self.template.clone(), 148 | includes: Vec::new(), 149 | parent, 150 | } 151 | }) 152 | .collect() 153 | } 154 | } 155 | -------------------------------------------------------------------------------- /src/config/template.rs: -------------------------------------------------------------------------------- 1 | use std::path::PathBuf; 2 | 3 | use serde::Deserialize; 4 | 5 | const DEFAULT_TEMPLATE: &str = "\ 6 | # {{ title }} {{ version }} ({{ date }}) 7 | 8 | {% for pr in prs -%} 9 | - [{{ pr.title }}]({{ pr.html_url }}) 10 | {% endfor %} 11 | 12 | {%- for title, prs in categories %} 13 | ## {{ title }} 14 | 15 | {% for pr in prs %} 16 | - [{{ pr.title }}]({{ pr.html_url }}) 17 | {%- endfor %} 18 | {% endfor %} 19 | 20 | {%- for include in includes %} 21 | ## {{ include.title }} 22 | 23 | {% for title, prs in include.categories %} 24 | ### {{ title }} 25 | 26 | {%- for pr in prs %} 27 | - [{{ pr.title }}]({{ pr.html_url }}) 28 | {%- endfor %} 29 | 30 | {%- endfor -%} 31 | 32 | {%- for pr in include.prs %} 33 | - [{{ pr.title }}]({{ pr.html_url }}) 34 | {%- endfor %} 35 | 36 | {%- endfor %} 37 | 38 | ## Contributors 39 | 40 | {% for contributor in contributors | sort(attribute=\"login\", case_sensitive=\"false\") %} 41 | - [{{ contributor.login }}]({{ contributor.html_url }}) 42 | {%- endfor %} 43 | 44 | "; 45 | 46 | #[derive(Clone, Debug)] 47 | pub struct Template(String); 48 | 49 | impl Default for Template { 50 | fn default() -> Self { 51 | Self(String::from(DEFAULT_TEMPLATE)) 52 | } 53 | } 54 | 55 | impl std::ops::Deref for Template { 56 | type Target = str; 57 | fn deref(&self) -> &Self::Target { 58 | &self.0 59 | } 60 | } 61 | 62 | impl<'de> Deserialize<'de> for Template { 63 | fn deserialize(deserializer: D) -> Result 64 | where 65 | D: serde::Deserializer<'de>, 66 | { 67 | #[derive(Deserialize)] 68 | #[serde(field_identifier, rename_all = "lowercase")] 69 | enum Field { 70 | Path, 71 | String, 72 | } 73 | struct TemplateVisitor; 74 | 75 | impl<'de> serde::de::Visitor<'de> for TemplateVisitor { 76 | type Value = Template; 77 | 78 | fn expecting(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { 79 | formatter 80 | .write_str("a map with either `path` pointing to a template file, or `string`") 81 | } 82 | 83 | fn visit_map(self, mut map: V) -> Result 84 | where 85 | V: serde::de::MapAccess<'de>, 86 | { 87 | use serde::de; 88 | 89 | let mut path: Option = None; 90 | let mut string = None; 91 | while let Some(key) = map.next_key()? { 92 | match key { 93 | Field::Path => { 94 | if path.is_some() { 95 | return Err(de::Error::duplicate_field("path")); 96 | } 97 | path = Some(map.next_value()?); 98 | } 99 | Field::String => { 100 | if string.is_some() { 101 | return Err(de::Error::duplicate_field("string")); 102 | } 103 | string = Some(map.next_value()?); 104 | } 105 | } 106 | } 107 | 108 | let string = if let Some(path) = path { 109 | std::fs::read_to_string(path).map_err(de::Error::custom)? 110 | } else if let Some(s) = string { 111 | s 112 | } else { 113 | DEFAULT_TEMPLATE.into() 114 | }; 115 | 116 | Ok(Template(string)) 117 | } 118 | } 119 | 120 | const FIELDS: [&str; 2] = ["path", "string"]; 121 | deserializer.deserialize_struct("Duration", &FIELDS, TemplateVisitor) 122 | } 123 | } 124 | -------------------------------------------------------------------------------- /src/config/timeframe.rs: -------------------------------------------------------------------------------- 1 | use chrono::{Date, DateTime, NaiveDate, Utc}; 2 | 3 | use super::Config; 4 | 5 | #[derive(Clone, Debug, serde::Deserialize)] 6 | pub enum DateKind { 7 | Absolute(DateTime), 8 | Today, 9 | } 10 | 11 | #[derive(Clone, Debug, serde::Deserialize)] 12 | pub enum ReleaseKind { 13 | Latest, 14 | Absolute(String), 15 | RelativeFromLast(u8), 16 | } 17 | 18 | #[derive(Clone, Debug)] 19 | pub enum Timeframe { 20 | Release(ReleaseKind), 21 | Date(DateKind), 22 | } 23 | 24 | impl Timeframe { 25 | pub async fn date_from_timeframe( 26 | &self, 27 | octocrab: &octocrab::Octocrab, 28 | config: &Config, 29 | ) -> eyre::Result> { 30 | let (owner, repo) = config 31 | .parent 32 | .clone() 33 | .unwrap_or_else(|| (config.owner.clone(), config.repo.clone())); 34 | Ok(match self { 35 | Timeframe::Release(ReleaseKind::Latest) => { 36 | octocrab 37 | .repos(&owner, &repo) 38 | .releases() 39 | .get_latest() 40 | .await? 41 | .published_at 42 | } 43 | Timeframe::Release(ReleaseKind::RelativeFromLast(number)) => { 44 | let page = octocrab 45 | .repos(&owner, &repo) 46 | .releases() 47 | .list() 48 | .per_page(100) 49 | .send() 50 | .await?; 51 | 52 | let mut next = page.next; 53 | let mut releases = page.items; 54 | while let Some(mut page) = octocrab.get_page(&next).await? { 55 | releases.append(&mut page.items); 56 | next = page.next; 57 | } 58 | 59 | releases.sort_by(|a, b| b.created_at.cmp(&a.created_at)); 60 | 61 | releases 62 | .get(*number as usize) 63 | .unwrap_or_else(|| { 64 | panic!( 65 | "Expected at least {} releases, but only {} found.", 66 | number, 67 | releases.len() 68 | ) 69 | }) 70 | .created_at 71 | } 72 | Timeframe::Release(ReleaseKind::Absolute(tag)) => { 73 | octocrab 74 | .repos(&owner, &repo) 75 | .releases() 76 | .get_by_tag(tag) 77 | .await? 78 | .published_at 79 | } 80 | Timeframe::Date(DateKind::Today) => Utc::now(), 81 | Timeframe::Date(DateKind::Absolute(time)) => *time, 82 | }) 83 | } 84 | } 85 | 86 | impl std::str::FromStr for Timeframe { 87 | type Err = eyre::Report; 88 | 89 | fn from_str(s: &str) -> Result { 90 | static REGEX: once_cell::sync::Lazy = once_cell::sync::Lazy::new(|| { 91 | regex::Regex::new(r"release:(?:(?:latest(-\d+)?)|(\S+))").unwrap() 92 | }); 93 | 94 | if let Ok(datetime) = s.parse() { 95 | Ok(Timeframe::Date(DateKind::Absolute(datetime))) 96 | } else if let Ok(date) = s.parse::() { 97 | Ok(Timeframe::Date(DateKind::Absolute( 98 | Date::from_utc(date, Utc).and_hms(0, 0, 0), 99 | ))) 100 | } else if let Some(c) = REGEX.captures(s) { 101 | Ok(if s.starts_with("release:latest") { 102 | if let Some(number) = c 103 | .get(1) 104 | .and_then(|c| c.as_str().parse::().ok()) 105 | .map(|n| n.abs() as u8) 106 | { 107 | Timeframe::Release(ReleaseKind::RelativeFromLast(number)) 108 | } else { 109 | Timeframe::Release(ReleaseKind::Latest) 110 | } 111 | } else if let Some(tag) = c.get(1).map(|c| c.as_str().to_owned()) { 112 | Timeframe::Release(ReleaseKind::Absolute(tag)) 113 | } else { 114 | unreachable!() 115 | }) 116 | } else if s == "today" { 117 | Ok(Timeframe::Date(DateKind::Today)) 118 | } else { 119 | Err(eyre::eyre!( 120 | "Timeframe must be a date or relative to the last release.", 121 | )) 122 | } 123 | } 124 | } 125 | 126 | impl<'de> serde::Deserialize<'de> for Timeframe { 127 | fn deserialize(de: D) -> Result 128 | where 129 | D: serde::Deserializer<'de>, 130 | { 131 | if let Ok(s) = String::deserialize(de) { 132 | s.parse().map_err(serde::de::Error::custom) 133 | } else { 134 | Err(serde::de::Error::custom("Timeframe must be a string type.")) 135 | } 136 | } 137 | } 138 | -------------------------------------------------------------------------------- /src/data.rs: -------------------------------------------------------------------------------- 1 | use std::collections::{HashMap, HashSet}; 2 | 3 | use octocrab::{ 4 | models::{pulls::PullRequest, User}, 5 | Octocrab, 6 | }; 7 | 8 | use crate::config::DATE_FORMAT; 9 | 10 | #[derive(Debug, serde::Serialize)] 11 | pub struct Data { 12 | categories: HashMap>, 13 | contributors: HashSet, 14 | date: String, 15 | includes: Vec, 16 | owner: String, 17 | prs: Vec, 18 | repo: String, 19 | title: String, 20 | version: String, 21 | } 22 | 23 | impl Data { 24 | #[async_recursion::async_recursion] 25 | pub async fn from_config( 26 | octocrab: &Octocrab, 27 | version: String, 28 | config: &crate::config::Config, 29 | ) -> eyre::Result { 30 | log::debug!("Config: {:#?}", &config); 31 | 32 | let from_date = config.from.date_from_timeframe(octocrab, config).await?; 33 | let to_date = config.to.date_from_timeframe(octocrab, config).await?; 34 | 35 | if from_date > to_date { 36 | panic!( 37 | "`to` ({}) date is earlier than `from` ({}) date.", 38 | from_date, to_date 39 | ); 40 | } 41 | 42 | log::info!( 43 | "Getting PRs from `{owner}/{repo}` {from} to {to}...", 44 | owner = config.owner, 45 | repo = config.repo, 46 | from = from_date.format(DATE_FORMAT), 47 | to = to_date.format(DATE_FORMAT), 48 | ); 49 | 50 | let repo = format!("{}/{}", config.owner, config.repo); 51 | let date_range = format!( 52 | "{}..{}", 53 | from_date.format(DATE_FORMAT), 54 | to_date.format(DATE_FORMAT) 55 | ); 56 | let query_string = format!("repo:{} is:pr is:merged merged:{}", repo, date_range); 57 | let page = octocrab 58 | .search() 59 | .issues_and_pull_requests(&query_string) 60 | .per_page(100u8) 61 | .send() 62 | .await?; 63 | 64 | let mut issues = page.items; 65 | let mut next = page.next; 66 | while let Ok(Some(mut page)) = octocrab.get_page(&next).await { 67 | issues.append(&mut page.items); 68 | next = page.next; 69 | } 70 | 71 | let mut pulls = Vec::new(); 72 | let mut categories: HashMap<_, Vec<_>> = HashMap::new(); 73 | let mut contributors = HashSet::new(); 74 | 75 | 'issues: for issue in issues { 76 | if issue 77 | .labels 78 | .iter() 79 | .any(|l| config.skip_labels.is_match(&l.name)) 80 | { 81 | continue; 82 | } 83 | 84 | for category in &config.categories { 85 | if issue 86 | .labels 87 | .iter() 88 | .any(|l| category.labels.is_match(&l.name)) 89 | { 90 | let body = octocrab 91 | ._get(issue.pull_request.unwrap().url.clone(), None::<&()>) 92 | .await? 93 | .text() 94 | .await?; 95 | categories 96 | .entry(category.title.clone()) 97 | .or_default() 98 | .push(serde_json::from_str(&body)?); 99 | continue 'issues; 100 | } 101 | } 102 | 103 | contributors.insert(issue.user.clone()); 104 | 105 | let body = octocrab 106 | ._get(issue.pull_request.unwrap().url.clone(), None::<&()>) 107 | .await? 108 | .text() 109 | .await?; 110 | pulls.push(serde_json::from_str(&body)?); 111 | } 112 | 113 | let mut includes = Vec::new(); 114 | for include in config.includes() { 115 | let config = Self::from_config(octocrab, version.clone(), &include).await?; 116 | contributors.extend(config.contributors.clone().into_iter()); 117 | includes.push(config); 118 | } 119 | 120 | Ok(Self { 121 | version, 122 | owner: config.owner.clone(), 123 | repo: config.repo.clone(), 124 | title: config.title.clone().unwrap_or_else(|| config.repo.clone()), 125 | date: to_date.format(&config.date_format).to_string(), 126 | categories, 127 | includes, 128 | prs: pulls, 129 | contributors, 130 | }) 131 | } 132 | } 133 | -------------------------------------------------------------------------------- /src/main.rs: -------------------------------------------------------------------------------- 1 | // BEGIN - Embark standard lints v0.3 2 | // do not change or add/remove here, but one can add exceptions after this section 3 | // for more info see: 4 | #![deny(unsafe_code)] 5 | #![warn( 6 | clippy::all, 7 | clippy::await_holding_lock, 8 | clippy::dbg_macro, 9 | clippy::debug_assert_with_mut_call, 10 | clippy::doc_markdown, 11 | clippy::empty_enum, 12 | clippy::enum_glob_use, 13 | clippy::exit, 14 | clippy::explicit_into_iter_loop, 15 | clippy::filter_map_next, 16 | clippy::fn_params_excessive_bools, 17 | clippy::if_let_mutex, 18 | clippy::imprecise_flops, 19 | clippy::inefficient_to_string, 20 | clippy::large_types_passed_by_value, 21 | clippy::let_unit_value, 22 | clippy::linkedlist, 23 | clippy::lossy_float_literal, 24 | clippy::macro_use_imports, 25 | clippy::map_err_ignore, 26 | clippy::map_flatten, 27 | clippy::map_unwrap_or, 28 | clippy::match_on_vec_items, 29 | clippy::match_same_arms, 30 | clippy::match_wildcard_for_single_variants, 31 | clippy::mem_forget, 32 | clippy::mismatched_target_os, 33 | clippy::needless_borrow, 34 | clippy::needless_continue, 35 | clippy::option_option, 36 | clippy::pub_enum_variant_names, 37 | clippy::ref_option_ref, 38 | clippy::rest_pat_in_fully_bound_structs, 39 | clippy::string_add_assign, 40 | clippy::string_add, 41 | clippy::string_to_string, 42 | clippy::suboptimal_flops, 43 | clippy::todo, 44 | clippy::unimplemented, 45 | clippy::unnested_or_patterns, 46 | clippy::unused_self, 47 | clippy::verbose_file_reads, 48 | future_incompatible, 49 | nonstandard_style, 50 | rust_2018_idioms 51 | )] 52 | // END - Embark standard lints v0.3 53 | 54 | mod config; 55 | mod data; 56 | 57 | use std::path::PathBuf; 58 | 59 | use octocrab::Octocrab; 60 | use structopt::StructOpt; 61 | 62 | use config::timeframe::Timeframe; 63 | 64 | #[derive(StructOpt)] 65 | /// Generate release notes for your project. 66 | struct Cli { 67 | /// Path to the configuration file. (Default: `None`) 68 | #[structopt(short, long, parse(from_os_str))] 69 | config: Option, 70 | /// The GitHub authenication token. (Default: `None`) 71 | #[structopt(short, long)] 72 | token: Option, 73 | /// The start of the new release timeframe. Default: `release:latest`. 74 | #[structopt(long)] 75 | from: Option, 76 | /// The end of the new release timeframe. Default: `today`. 77 | #[structopt(long)] 78 | to: Option, 79 | /// Skip PRs if their labels match the regular expressions. 80 | #[structopt(long)] 81 | skip_labels: Option>, 82 | /// The repository and new version to generate release notes in the 83 | /// form `owner/repo@version`. `owner/repo@` is optional if provided 84 | /// a configuration file. 85 | repo_and_version: String, 86 | } 87 | 88 | fn initialise_github(token: Option) -> eyre::Result { 89 | let mut builder = octocrab::Octocrab::builder(); 90 | let token = token.or_else(|| std::env::var("GITHUB_TOKEN").ok()); 91 | if let Some(token) = token { 92 | builder = builder.personal_token(token); 93 | } 94 | Ok(builder.build()?) 95 | } 96 | 97 | #[tokio::main] 98 | async fn main() -> eyre::Result<()> { 99 | env_logger::init_from_env( 100 | env_logger::Env::default().filter_or(env_logger::DEFAULT_FILTER_ENV, "info"), 101 | ); 102 | 103 | let cli = Cli::from_args(); 104 | let path = cli.config.map(|path| path.canonicalize()).transpose()?; 105 | 106 | let (mut config, version) = if let Some(path) = path { 107 | log::info!("Using configuration file found at `{}`.", path.display()); 108 | let string = tokio::fs::read_to_string(path).await?; 109 | ( 110 | toml::from_str::(&string)?, 111 | cli.repo_and_version, 112 | ) 113 | } else { 114 | let regex = regex::Regex::new(r"(?P\S+)/(?P\S+)@(?P\S+)").unwrap(); 115 | let cap = regex.captures(&cli.repo_and_version).ok_or_else(|| { 116 | eyre::eyre!(" must be in `owner/repo@version` format.") 117 | })?; 118 | let owner = cap.name("owner").unwrap().as_str().to_owned(); 119 | let repo = cap.name("repo").unwrap().as_str().to_owned(); 120 | let version = cap.name("version").unwrap().as_str().to_owned(); 121 | 122 | (config::Config::new(owner, repo), version) 123 | }; 124 | 125 | config.from = cli.from.unwrap_or(config.from); 126 | config.to = cli.to.unwrap_or(config.to); 127 | config.skip_labels = cli 128 | .skip_labels 129 | .map(regex::RegexSet::new) 130 | .transpose()? 131 | .unwrap_or(config.skip_labels); 132 | 133 | log::info!("Using `{}` as version number.", version); 134 | let octocrab = initialise_github(cli.token)?; 135 | let data = data::Data::from_config(&octocrab, version, &config).await?; 136 | println!( 137 | "{}", 138 | tera::Tera::one_off( 139 | &config.template, 140 | &tera::Context::from_serialize(data)?, 141 | false 142 | )? 143 | ); 144 | 145 | Ok(()) 146 | } 147 | --------------------------------------------------------------------------------