Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 25 additions & 19 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ jobs:
outputs:
appname: gixor
tag: ${{ steps.vars.outputs.tag }}
upload_url: ${{ steps.create_release.outputs.upload_url }}
steps:
- name: Git Tag name
id: vars
Expand All @@ -24,12 +23,14 @@ jobs:

- name: Create release
id: create_release
uses: softprops/action-gh-release@v2
with:
tag_name: v${{ steps.vars.outputs.tag }}
name: Release v${{ steps.vars.outputs.tag }}
draft: true
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release create v${{ steps.vars.outputs.tag }} \
--draft \
--repo $GITHUB_REPOSITORY \
--title "Release v${{ steps.vars.outputs.tag }}" \
--generate-notes
Comment on lines +28 to +33

Copilot AI Nov 5, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The gh release create command requires authentication but no env section with GH_TOKEN or GITHUB_TOKEN is defined. Add an env section with GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} to ensure the command can authenticate properly, similar to the finalize_release job at line 205.

Copilot uses AI. Check for mistakes.

publish:
runs-on: ${{ matrix.os }}
Comment on lines 35 to 36

Copilot AI Nov 5, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The publish job uses gh release upload command at line 138 which requires write permissions, but no permissions block is defined. Add a permissions block with contents: write to ensure the job can upload release assets.

Copilot uses AI. Check for mistakes.
Expand Down Expand Up @@ -128,6 +129,8 @@ jobs:
# publish release
- name: Create release file
shell: bash
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
DIR=${{ steps.vars.outputs.dir }}
DIST=${{ matrix.target }}
Expand All @@ -136,17 +139,18 @@ jobs:
cp -r README.md LICENSE assets dist/$DIST/$DIR
cp target/${{ matrix.target }}/release/${{ matrix.artifact_name }}-cli dist/$DIST/$DIR/${{ matrix.artifact_name }}
tar cvfz dist/${{ matrix.asset_name }}.tar.gz -C dist/$DIST $DIR
gh release upload v${{ needs.setup.outputs.tag }} dist/${{ matrix.asset_name }}.tar.gz --repo $GITHUB_REPOSITORY

Copilot AI Nov 5, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The gh release upload command requires authentication but no environment variable is set in this step. Add env with GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} to the step or to the job level to ensure proper authentication.

Copilot uses AI. Check for mistakes.

- name: Upload release assets
id: upload-release-assets
uses: actions/upload-release-asset@v1.0.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
asset_path: dist/${{ matrix.asset_name }}.tar.gz
asset_name: ${{ matrix.asset_name }}.tar.gz
asset_content_type: application/x-gzip
upload_url: ${{ needs.setup.outputs.upload_url }}
# - name: Upload release assets
# id: upload-release-assets
# uses: actions/upload-release-asset@v1.0.1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# asset_path: dist/${{ matrix.asset_name }}.tar.gz
# asset_name: ${{ matrix.asset_name }}.tar.gz
# asset_content_type: application/x-gzip
# upload_url: ${{ needs.setup.outputs.upload_url }}

docker:
needs: publish
Expand Down Expand Up @@ -194,13 +198,15 @@ jobs:
cache-from: type=registry,ref=ghcr.io/${{ github.repository}}:buildcache
cache-to: type=registry,ref=ghcr.io/${{ github.repository }}:buildcache,mode=max

release:
finalize_release:
needs: publish
runs-on: ubuntu-latest

Copilot AI Nov 5, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The finalize_release job uses gh release edit command at line 204 which requires write permissions, but no permissions block is defined. Add a permissions block with contents: write to ensure the job can modify releases.

Suggested change
runs-on: ubuntu-latest
runs-on: ubuntu-latest
permissions:
contents: write

Copilot uses AI. Check for mistakes.
permissions:
contents: write
steps:
- name: Publish the release
id: publish_release
run: |
run:
gh release edit --draft=false --repo $GITHUB_REPOSITORY v${{ needs.publish.outputs.tag }}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
81 changes: 8 additions & 73 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ members = [
resolver = "3"

[workspace.package]
version = "0.4.0"
version = "0.4.1"
edition = "2021"
authors = [ "Haruaki Tamada" ]
license-file = "LICENSE"
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ RUN cargo build --release \

FROM debian:bullseye-slim

ARG VERSION=0.4.0
ARG VERSION=0.4.1

LABEL org.opencontainers.image.source=https://github.com/tamada/gixor \
org.opencontainers.image.version=${VERSION} \
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
[![Coverage Status](https://coveralls.io/repos/github/tamada/gixor/badge.svg?branch=main)](https://coveralls.io/github/tamada/gixor?branch=main)
[![Rust Report Card](https://rust-reportcard.xuri.me/badge/github.com/tamada/gixor)](https://rust-reportcard.xuri.me/report/github.com/tamada/gixor)

[![Version](https://img.shields.io/badge/Version-v0.4.0-green)](https://github.com/tamada/gixor/releases/tag/v0.4.0)
[![Version](https://img.shields.io/badge/Version-v0.4.1-green)](https://github.com/tamada/gixor/releases/tag/v0.4.1)
[![License](https://img.shields.io/badge/License-MIT-green)](https://github.com/tamada/gixor/blob/main/LICENSE)

[![Docker](https://img.shields.io/badge/Docker-ghcr.io/tamada/gixor:0.4.0-blue?logo=docker)](https://github.com/tamada/gixor/pkgs/container/gixor/)
[![Docker](https://img.shields.io/badge/Docker-ghcr.io/tamada/gixor:0.4.1-blue?logo=docker)](https://github.com/tamada/gixor/pkgs/container/gixor/)
[![Homebrew](https://img.shields.io/badge/Homebrew-tamada/tap/gixor-blue?logo=homebrew)](https://github.com/tamada/homebrew-tap)

Git Ignore Management System for Multiple Repositories.
Expand Down
5 changes: 2 additions & 3 deletions cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,12 @@ keywords.workspace = true

[dependencies]
gixor = { path = "../lib" }
atty = "0.2.14"
clap = { version = "4.5.28", features = ["derive"] }
clap_complete = "4.5.44"
env_logger = "0.11.6"
log = "0.4.25"
opener = "0.7.2"
terminal_size = "0.4.1"
opener = "0.8.3"
terminal_size = "0.4.3"

[dev-dependencies]
tokio = { version = "1.16.1", features = ["full"] }
Expand Down
2 changes: 1 addition & 1 deletion cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ fn list_boilerplates(gixor: &Gixor, opts: cli::ListOpts) -> Result<Option<&Gixor
}

pub(crate) fn print_in_columns_if_needed(items: Vec<String>, header: Option<String>) {
if atty::is(atty::Stream::Stdout) {
if std::io::IsTerminal::is_terminal(&std::io::stdout()) {
let term = terminal::Terminal::default();
if let Some(header) = header {
println!("{}", term.format_header(header));
Expand Down
4 changes: 2 additions & 2 deletions docs/content/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ date: 2025-02-25
[![Coverage Status](https://coveralls.io/repos/github/tamada/gixor/badge.svg?branch=main)](https://coveralls.io/github/tamada/gixor?branch=main)
[![Rust Report Card](https://rust-reportcard.xuri.me/badge/github.com/tamada/gixor)](https://rust-reportcard.xuri.me/report/github.com/tamada/gixor)

[![Version](https://img.shields.io/badge/Version-v0.4.0-green)](https://github.com/tamada/gixor/releases/tag/v0.4.0)
[![Version](https://img.shields.io/badge/Version-v0.4.1-green)](https://github.com/tamada/gixor/releases/tag/v0.4.1)
[![License](https://img.shields.io/badge/License-MIT-green)](https://github.com/tamada/gixor/blob/main/LICENSE)

[![Docker](https://img.shields.io/badge/Docker-ghcr.io/tamada/gixor:0.4.0-blue?logo=docker)](https://github.com/tamada/gixor/pkgs/container/gixor/)
[![Docker](https://img.shields.io/badge/Docker-ghcr.io/tamada/gixor:0.4.1-blue?logo=docker)](https://github.com/tamada/gixor/pkgs/container/gixor/)
[![Homebrew](https://img.shields.io/badge/Homebrew-tamada/tap/gixor-blue?logo=homebrew)](https://github.com/tamada/homebrew-tap)

Gixor is Git Ignore Managenemnt System for Multiple Repositories.

Copilot AI Nov 5, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Corrected spelling of 'Managenemnt' to 'Management'.

Suggested change
Gixor is Git Ignore Managenemnt System for Multiple Repositories.
Gixor is Git Ignore Management System for Multiple Repositories.

Copilot uses AI. Check for mistakes.
Expand Down
Loading