diff --git a/.github/ISSUE_TEMPLATE/bug.md b/.forgejo/ISSUE_TEMPLATE/bug.md
similarity index 60%
rename from .github/ISSUE_TEMPLATE/bug.md
rename to .forgejo/ISSUE_TEMPLATE/bug.md
index 791263b..0ad2942 100644
--- a/.github/ISSUE_TEMPLATE/bug.md
+++ b/.forgejo/ISSUE_TEMPLATE/bug.md
@@ -2,32 +2,28 @@
name: Bug
about: Create a bug report to help us improve Lprs
title: '[Bug]: ...'
-labels: ["🐞 Bug"]
+labels: ["Kind/Bug"]
assignees: ''
---
## Checks
* [ ] I added a descriptive title to this issue
-* [ ] I have searched (Google, and GitHub) for similar issues and couldn't find anything
-* [ ] I have read [the README](https://github.com/TheAwiteb/lprs/blob/master/README.md) and still think this is a bug
+* [ ] I have searched Google for similar issues and couldn't find anything
+* [ ] I have read [the README](https://git.4rs.nl/awiteb/lprs/src/branch/master/README.md) and still think this is a bug
## Version
-> Then, run `rustc --version` to get the version of Rust.
-
-Rust version: `...`
+
+Rustc version: `...`
+
+Lprs version: `...`
## Description
-## The command
-```bash
-$ lprs ...
-```
-
## Expected behavior
diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.forgejo/ISSUE_TEMPLATE/feature_request.md
similarity index 93%
rename from .github/ISSUE_TEMPLATE/feature_request.md
rename to .forgejo/ISSUE_TEMPLATE/feature_request.md
index 574a412..6ae7d95 100644
--- a/.github/ISSUE_TEMPLATE/feature_request.md
+++ b/.forgejo/ISSUE_TEMPLATE/feature_request.md
@@ -2,7 +2,7 @@
name: Feature request
about: Suggest an idea for Lprs
title: '[Feature request]: ...'
-labels: ["🔥 Feature"]
+labels: ["Kind/Feature"]
assignees: ''
---
diff --git a/.github/ISSUE_TEMPLATE/question.md b/.forgejo/ISSUE_TEMPLATE/question.md
similarity index 93%
rename from .github/ISSUE_TEMPLATE/question.md
rename to .forgejo/ISSUE_TEMPLATE/question.md
index 82775c7..1b7551e 100644
--- a/.github/ISSUE_TEMPLATE/question.md
+++ b/.forgejo/ISSUE_TEMPLATE/question.md
@@ -2,7 +2,7 @@
name: Question
about: Ask a question about Lprs
title: '[Question]: ...'
-labels: ["💬 Question"]
+labels: ["Kind/Question"]
assignees: ''
---
diff --git a/.github/ISSUE_TEMPLATE/typo.md b/.forgejo/ISSUE_TEMPLATE/typo.md
similarity index 81%
rename from .github/ISSUE_TEMPLATE/typo.md
rename to .forgejo/ISSUE_TEMPLATE/typo.md
index a256e66..c2cc1d3 100644
--- a/.github/ISSUE_TEMPLATE/typo.md
+++ b/.forgejo/ISSUE_TEMPLATE/typo.md
@@ -2,7 +2,7 @@
name: Typo report
about: Report a typo in the documentation or the code
title: '[Typo]: ...'
-labels: ["📝 Typo"]
+labels: ["Kind/Documentation"]
assignees: ''
---
@@ -12,5 +12,5 @@ For the location, please provide a link to the code or the documentation.
| Location | Suggestion |
|----------|------------|
-| GitHub-link| Suggestion |
+| Code-link| Suggestion |
diff --git a/.github/pull_request_template.md b/.forgejo/pull_request_template.md
similarity index 82%
rename from .github/pull_request_template.md
rename to .forgejo/pull_request_template.md
index 5aebacd..a71a680 100644
--- a/.github/pull_request_template.md
+++ b/.forgejo/pull_request_template.md
@@ -5,8 +5,8 @@ Make sure to replace `{issue title}` with the title of the issue you are fixing.
-->
## Issue
-
-This will fix {issue GitHub link}
+
+This will fix {issue Forgejo link}
## How I am fixing it
\ No newline at end of file
diff --git a/.forgejo/workflows/cd.yml b/.forgejo/workflows/cd.yml
new file mode 100644
index 0000000..69f9824
--- /dev/null
+++ b/.forgejo/workflows/cd.yml
@@ -0,0 +1,48 @@
+name: CD
+
+on:
+ push:
+ tags:
+ - v[0-9]+.[0-9]+.[0-9]+
+ - v[0-9]+.[0-9]+.[0-9]+-rc.[0-9]+
+
+jobs:
+ release:
+ runs-on: debian
+ steps:
+ - uses: actions/checkout@v4
+ with:
+ ref: master
+ fetch-depth: 0
+ fetch-tags: true
+ - name: Install git-cliff
+ run: |
+ version="2.1.2"
+ wget "https://github.com/orhun/git-cliff/releases/download/v$version/git-cliff-$version-x86_64-unknown-linux-gnu.tar.gz"
+ tar -xvzf git-cliff-*.tar.gz
+ mv "git-cliff-$version/git-cliff" /usr/local/bin
+ rm -fr git-cliff-*
+ - name: Write changelog
+ run: |
+ git config user.name forgejo-actions
+ git config user.email forgejo-actions@noreply.localhost
+ echo 'TAG_CHANGELOG=$(if [[ $(git tag --sort=committerdate | tail -n 1) == *"-rc"* ]]; then git-cliff --strip all $(git tag --sort=committerdate | tail -n 2 | sed ":a; N; $!ba; s/\n/../g") | sed "s/## unreleased.*$//g"; else git-cliff -l --strip all | sed "s/^## \[.*$//g";fi)' | sed "s/\"/'/g" >> $GITHUB_ENV
+ if [[ $(git tag --sort=committerdate | tail -n 1) != *'-rc'* ]]; then
+ echo "The latest tag is not a release candidate, updating changelog for $GITHUB_REF_NAME"
+ git-cliff > CHANGELOG.md
+ git add CHANGELOG.md
+ git commit -m "Update changelog for $GITHUB_REF_NAME"
+ git push
+ echo "Changelog updated"
+ else
+ echo "The latest tag is a release candidate, not updating changelog"
+ fi
+ - name: Create Release
+ uses: actions/forgejo-release@v1
+ with:
+ direction: upload
+ url: https://git.4rs.nl
+ token: ${{ env.GITHUB_TOKEN }}
+ release-dir: release-dir
+ release-notes: ${{ env.TAG_CHANGELOG }}
+ prerelease: ${{ contains(env.GITHUB_REF_NAME, '-rc') }}
diff --git a/.forgejo/workflows/changelog.yml b/.forgejo/workflows/changelog.yml
new file mode 100644
index 0000000..95787e8
--- /dev/null
+++ b/.forgejo/workflows/changelog.yml
@@ -0,0 +1,36 @@
+name: Write changelog
+
+on:
+ push:
+ branches:
+ - 'master'
+
+jobs:
+ write-changelog:
+ runs-on: debian
+ steps:
+ - uses: actions/checkout@v4
+ with:
+ ref: master
+ fetch-depth: 0
+ fetch-tags: true
+ - name: Install git-cliff
+ run: |
+ version="2.1.2"
+ wget "https://github.com/orhun/git-cliff/releases/download/v$version/git-cliff-$version-x86_64-unknown-linux-gnu.tar.gz"
+ tar -xvzf git-cliff-*.tar.gz
+ mv "git-cliff-$version/git-cliff" /usr/local/bin
+ rm -fr git-cliff-*
+ - name: Write changelog
+ run: |
+ git config user.name forgejo-actions
+ git config user.email forgejo-actions@noreply.localhost
+ git-cliff > CHANGELOG.md
+ if [[ $(git status | grep --extended-regexp '^\s+modified:\s+CHANGELOG.md$') ]]; then
+ git add CHANGELOG.md
+ git commit -m "chore(changelog): Update changelog"
+ git push
+ echo "Changelog updated"
+ else
+ echo "No changes to changelog"
+ fi
diff --git a/.forgejo/workflows/ci.yml b/.forgejo/workflows/ci.yml
new file mode 100644
index 0000000..75fec83
--- /dev/null
+++ b/.forgejo/workflows/ci.yml
@@ -0,0 +1,38 @@
+name: CI
+
+on:
+ push:
+ branches: [master]
+ pull_request:
+ branches: [master]
+
+jobs:
+ build:
+ name: Rust build
+ runs-on: debian
+ steps:
+ - uses: actions/checkout@v4
+ - uses: https://codeberg.org/TheAwiteb/rust-action@v1.70
+ - run: cargo build
+ rustfmt:
+ name: Rust format
+ runs-on: debian
+ steps:
+ - uses: actions/checkout@v4
+ - uses: https://codeberg.org/TheAwiteb/rust-action@v1.70
+ - run: cargo fmt -- --check
+ check:
+ name: Rust check
+ runs-on: debian
+ steps:
+ - uses: actions/checkout@v4
+ - uses: https://codeberg.org/TheAwiteb/rust-action@v1.70
+ - run: cargo check
+ clippy:
+ name: Rust clippy
+ runs-on: debian
+ steps:
+ - uses: actions/checkout@v4
+ - uses: https://codeberg.org/TheAwiteb/rust-action@v1.70
+ - run: cargo clippy -- -D warnings
+
diff --git a/.forgejo/workflows/git-sumi.yml b/.forgejo/workflows/git-sumi.yml
new file mode 100644
index 0000000..c16221a
--- /dev/null
+++ b/.forgejo/workflows/git-sumi.yml
@@ -0,0 +1,18 @@
+on:
+ pull_request:
+ types:
+ - opened
+ - edited
+ - reopened
+
+jobs:
+ main:
+ runs-on: debian
+ steps:
+ - uses: https://code.forgejo.org/actions/checkout@v4
+ - run: |
+ curl -L "https://github.com/welpo/git-sumi/releases/download/v0.0.6/git-sumi-x86_64-unknown-linux-gnu.tar.xz" -o git-sumi.tar.xz
+ tar -xf git-sumi.tar.xz
+ mv git-sumi-x86_64-unknown-linux-gnu/git-sumi git-sumi
+ chmod +x git-sumi
+ ./git-sumi "${{ github.event.pull_request.title }}"
diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml
deleted file mode 100644
index 07292fe..0000000
--- a/.github/FUNDING.yml
+++ /dev/null
@@ -1 +0,0 @@
-github: "TheAwiteb"
\ No newline at end of file
diff --git a/.github/workflows/auto_close_pr.yml b/.github/workflows/auto_close_pr.yml
new file mode 100644
index 0000000..8dd358d
--- /dev/null
+++ b/.github/workflows/auto_close_pr.yml
@@ -0,0 +1,34 @@
+name: Auto close PR
+
+on:
+ pull_request:
+ types: [opened, reopened]
+
+jobs:
+ close_pr:
+ name: Auto close PR
+ runs-on: ubuntu-latest
+ steps:
+ - name: Send close comment
+ run: |
+ curl -L \
+ -X POST \
+ -H "Accept: application/vnd.github+json" \
+ -H "Authorization: Bearer $PAT" \
+ -H "X-GitHub-Api-Version: 2022-11-28" \
+ https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.number }}/comments \
+ -d '{"body":"${{ env.BODY }}"}'
+ env:
+ PAT: ${{ secrets.PAT }}
+ BODY: This repository is mirror only and you cannot create a pull request for it. Please open your PR at https://git.4rs.nl/awiteb/lprs
+ - name: Close the PR
+ run: |
+ curl -L \
+ -X PATCH \
+ -H "Accept: application/vnd.github+json" \
+ -H "Authorization: Bearer $PAT" \
+ -H "X-GitHub-Api-Version: 2022-11-28" \
+ https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.number }} \
+ -d '{"state":"closed"}'
+ env:
+ PAT: ${{ secrets.PAT }}
diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml
deleted file mode 100644
index a86aefa..0000000
--- a/.github/workflows/cd.yml
+++ /dev/null
@@ -1,26 +0,0 @@
-name: CD
-
-on:
- push:
- tags:
- - v[0-9]+.[0-9]+.[0-9]+
-
-jobs:
- release:
- if: startsWith(github.ref, 'refs/tags/')
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v2
- - uses: dtolnay/rust-toolchain@stable
- - name: Create Release 🖋
- uses: softprops/action-gh-release@v1
- with:
- prerelease: ${{ contains(github.ref, 'rc') || contains(github.ref, 'pre') }}
- env:
- GITHUB_TOKEN: ${{ secrets.PAT }}
-
- - name: Publish to crates.io 🚀
- uses: katyo/publish-crates@v2
- with:
- token: ${{ secrets.PAT }}
- registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }}
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
deleted file mode 100644
index 0625e11..0000000
--- a/.github/workflows/ci.yml
+++ /dev/null
@@ -1,50 +0,0 @@
-name: CI
-
-on:
- push:
- branches: [master]
- pull_request:
- branches: [master]
-
-jobs:
- build:
- name: Rust build
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v3
- - uses: dtolnay/rust-toolchain@stable
- - run: cargo build --workspace --all-features
- rustfmt:
- name: Rust format
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v3
- - uses: dtolnay/rust-toolchain@stable
- - run: cargo fmt -- --check
- check:
- name: Rust check
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v3
- - uses: dtolnay/rust-toolchain@stable
- - run: cargo check --workspace --all-features
- clippy:
- name: Rust clippy
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v3
- - uses: dtolnay/rust-toolchain@stable
- - run: cargo clippy --workspace --all-features -- -D warnings
- verify_msrv:
- name: Verify Minimum Supported Rust Version in Cargo.toml
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v3
-
- - name: Install or use cached `cargo-msrv`
- uses: baptiste0928/cargo-install@v2
- with:
- crate: cargo-msrv
-
- - name: Verify Minimum Rust Version
- run: cargo-msrv verify
diff --git a/Cargo.toml b/Cargo.toml
index d5676e1..9dd24c7 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -6,7 +6,7 @@ license = "GPL-3.0-only"
authors = ["Awiteb "]
readme = "README.md"
description = "A local CLI password manager"
-repository = "https://github.com/TheAwiteb/lprs"
+repository = "https://git.4rs.nl/awiteb/lprs"
rust-version = "1.70.0"
keywords = ["password", "manager", "CLI"]
categories = ["command-line-utilities"]
diff --git a/src/cli/add_command.rs b/src/cli/add_command.rs
index 91e5125..cdc2557 100644
--- a/src/cli/add_command.rs
+++ b/src/cli/add_command.rs
@@ -1,5 +1,5 @@
// Lprs - A local CLI password manager
-// Copyright (C) 2024 Awiteb
+// Copyright (C) 2024 Awiteb
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
diff --git a/src/cli/clean_command.rs b/src/cli/clean_command.rs
index 9c6defd..8c91892 100644
--- a/src/cli/clean_command.rs
+++ b/src/cli/clean_command.rs
@@ -1,5 +1,5 @@
// Lprs - A local CLI password manager
-// Copyright (C) 2024 Awiteb
+// Copyright (C) 2024 Awiteb
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
diff --git a/src/cli/edit_command.rs b/src/cli/edit_command.rs
index 3143f92..6b2885e 100644
--- a/src/cli/edit_command.rs
+++ b/src/cli/edit_command.rs
@@ -1,5 +1,5 @@
// Lprs - A local CLI password manager
-// Copyright (C) 2024 Awiteb
+// Copyright (C) 2024 Awiteb
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
diff --git a/src/cli/export_command.rs b/src/cli/export_command.rs
index 5c0a682..475b8b5 100644
--- a/src/cli/export_command.rs
+++ b/src/cli/export_command.rs
@@ -1,5 +1,5 @@
// Lprs - A local CLI password manager
-// Copyright (C) 2024 Awiteb
+// Copyright (C) 2024 Awiteb
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
diff --git a/src/cli/gen_command.rs b/src/cli/gen_command.rs
index 579f6fa..afb31d5 100644
--- a/src/cli/gen_command.rs
+++ b/src/cli/gen_command.rs
@@ -1,5 +1,5 @@
// Lprs - A local CLI password manager
-// Copyright (C) 2024 Awiteb
+// Copyright (C) 2024 Awiteb
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
diff --git a/src/cli/import_command.rs b/src/cli/import_command.rs
index 1315945..aa02bc3 100644
--- a/src/cli/import_command.rs
+++ b/src/cli/import_command.rs
@@ -1,5 +1,5 @@
// Lprs - A local CLI password manager
-// Copyright (C) 2024 Awiteb
+// Copyright (C) 2024 Awiteb
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
diff --git a/src/cli/list_command.rs b/src/cli/list_command.rs
index 235d0dc..32b47e9 100644
--- a/src/cli/list_command.rs
+++ b/src/cli/list_command.rs
@@ -1,5 +1,5 @@
// Lprs - A local CLI password manager
-// Copyright (C) 2024 Awiteb
+// Copyright (C) 2024 Awiteb
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
diff --git a/src/cli/mod.rs b/src/cli/mod.rs
index 8036cf6..f4459e0 100644
--- a/src/cli/mod.rs
+++ b/src/cli/mod.rs
@@ -1,5 +1,5 @@
// Lprs - A local CLI password manager
-// Copyright (C) 2024 Awiteb
+// Copyright (C) 2024 Awiteb
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
diff --git a/src/cli/remove_command.rs b/src/cli/remove_command.rs
index a7c3ab0..ac12597 100644
--- a/src/cli/remove_command.rs
+++ b/src/cli/remove_command.rs
@@ -1,5 +1,5 @@
// Lprs - A local CLI password manager
-// Copyright (C) 2024 Awiteb
+// Copyright (C) 2024 Awiteb
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
diff --git a/src/errors.rs b/src/errors.rs
index 4ed1966..6be1c8f 100644
--- a/src/errors.rs
+++ b/src/errors.rs
@@ -1,5 +1,5 @@
// Lprs - A local CLI password manager
-// Copyright (C) 2024 Awiteb
+// Copyright (C) 2024 Awiteb
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
diff --git a/src/macros.rs b/src/macros.rs
index aa4f23f..80ba849 100644
--- a/src/macros.rs
+++ b/src/macros.rs
@@ -1,5 +1,5 @@
// Lprs - A local CLI password manager
-// Copyright (C) 2024 Awiteb
+// Copyright (C) 2024 Awiteb
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
diff --git a/src/main.rs b/src/main.rs
index 31913ee..04ba220 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -1,5 +1,5 @@
// Lprs - A local CLI password manager
-// Copyright (C) 2024 Awiteb
+// Copyright (C) 2024 Awiteb
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -51,7 +51,7 @@ fn main() -> ExitCode {
println!(
"Warning: The version you are using of lprs is outdated. There is a newer version, which is `{new_version}`, and your version is `{VERSION}`
\rYou can update via: `cargo install lprs --locked`
- \rOr via git repo: `cargo install --locked --git https://github.com/TheAwiteb/lprs.git`
+ \rOr via git repo: `cargo install --locked --git https://git.4rs.nl/awiteb/lprs.git`
\rTo disable update notification: `cargo install lprs --locked --no-default-features`\n\n"
)
}
diff --git a/src/password/cipher.rs b/src/password/cipher.rs
index 68572af..0b34b0b 100644
--- a/src/password/cipher.rs
+++ b/src/password/cipher.rs
@@ -1,5 +1,5 @@
// Lprs - A local CLI password manager
-// Copyright (C) 2024 Awiteb
+// Copyright (C) 2024 Awiteb
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
diff --git a/src/password/mod.rs b/src/password/mod.rs
index 32bbe67..a13fbe7 100644
--- a/src/password/mod.rs
+++ b/src/password/mod.rs
@@ -1,5 +1,5 @@
// Lprs - A local CLI password manager
-// Copyright (C) 2024 Awiteb
+// Copyright (C) 2024 Awiteb
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
diff --git a/src/password/validator.rs b/src/password/validator.rs
index e39b34e..fb9bbf6 100644
--- a/src/password/validator.rs
+++ b/src/password/validator.rs
@@ -1,5 +1,5 @@
// Lprs - A local CLI password manager
-// Copyright (C) 2024 Awiteb
+// Copyright (C) 2024 Awiteb
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
diff --git a/src/traits.rs b/src/traits.rs
index 55a67be..05da877 100644
--- a/src/traits.rs
+++ b/src/traits.rs
@@ -1,5 +1,5 @@
// Lprs - A local CLI password manager
-// Copyright (C) 2024 Awiteb
+// Copyright (C) 2024 Awiteb
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
diff --git a/src/utils.rs b/src/utils.rs
index d053f34..37adda3 100644
--- a/src/utils.rs
+++ b/src/utils.rs
@@ -1,5 +1,5 @@
// Lprs - A local CLI password manager
-// Copyright (C) 2024 Awiteb
+// Copyright (C) 2024 Awiteb
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
@@ -67,7 +67,7 @@ pub fn lprs_version() -> LprsResult