From cf0c9c002e3c5eabb40016a14d49e40da9e3edc4 Mon Sep 17 00:00:00 2001 From: Ajeet D'Souza <98ajeet@gmail.com> Date: Sat, 7 Jan 2023 01:31:49 +0530 Subject: [PATCH] Add no response workflow --- .github/workflows/ci.yml | 7 +------ .github/workflows/no-response.yml | 22 ++++++++++++++++++++++ .github/workflows/release.yml | 6 +----- shell.nix | 4 ++-- src/db/mod.rs | 2 +- 5 files changed, 27 insertions(+), 14 deletions(-) create mode 100644 .github/workflows/no-response.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9c0972b..cb15ac9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,24 +1,19 @@ name: ci on: push: - branches: - - main - - next + branches: [main] pull_request: workflow_dispatch: - env: CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }} CARGO_INCREMENTAL: 0 CARGO_TERM_COLOR: always - jobs: ci: name: ${{ matrix.os }} runs-on: ${{ matrix.os }} strategy: matrix: - # FIXME: Enable macos-latest when this is merged: https://nixpk.gs/pr-tracker.html?pr=163924 os: [ubuntu-latest, windows-latest] steps: - uses: actions/checkout@v2 diff --git a/.github/workflows/no-response.yml b/.github/workflows/no-response.yml new file mode 100644 index 0000000..b73a46c --- /dev/null +++ b/.github/workflows/no-response.yml @@ -0,0 +1,22 @@ +name: no-response +on: + issue_comment: + types: [created] + schedule: + - cron: "0 0 * * *" # daily at 00:00 +permissions: + issues: write +jobs: + no-response: + if: github.repository == 'ajeetdsouza/zoxide' + runs-on: ubuntu-latest + steps: + - uses: lee-dohm/no-response@v0.5.0 + with: + token: ${{ github.token }} + daysUntilClose: 30 + responseRequiredLabel: waiting-for-response + closeComment: > + This issue has been automatically closed due to inactivity. If you + feel this is still relevant, please comment here or create a fresh + issue. diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7a1e63a..4ca6aae 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,15 +1,11 @@ name: release on: push: - branches: - - main - - next + branches: [main] pull_request: workflow_dispatch: - env: CARGO_INCREMENTAL: 0 - jobs: release: name: ${{ matrix.target }} diff --git a/shell.nix b/shell.nix index e22aef8..689a4b1 100644 --- a/shell.nix +++ b/shell.nix @@ -1,8 +1,8 @@ let rust = import (builtins.fetchTarball - "https://github.com/oxalica/rust-overlay/archive/2342f70f7257046effc031333c4cfdea66c91d82.tar.gz"); + "https://github.com/oxalica/rust-overlay/archive/9096306d4a1c3adcc8d20f2c9dcaee3dee30d1ad.tar.gz"); pkgs = import (builtins.fetchTarball - "https://github.com/NixOS/nixpkgs/archive/0323e1f8bac882f19905174639a89397db1930f1.tar.gz") { + "https://github.com/NixOS/nixpkgs/archive/5f902ae769594aaeaf326e8623a48482eeacfe89.tar.gz") { overlays = [ rust ]; }; in pkgs.mkShell { diff --git a/src/db/mod.rs b/src/db/mod.rs index 41db369..12f6475 100644 --- a/src/db/mod.rs +++ b/src/db/mod.rs @@ -25,7 +25,7 @@ impl<'file> Database<'file> { let buffer = self.dirs.to_bytes()?; let path = db_path(self.data_dir); - util::write(&path, &buffer).context("could not write to database")?; + util::write(path, buffer).context("could not write to database")?; self.modified = false; Ok(()) }