Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix go-gitlint installation in commit-msg hook #173

Closed
wants to merge 1 commit into from

Conversation

sweep-ai[bot]
Copy link
Contributor

@sweep-ai sweep-ai bot commented Jan 2, 2024

PR Feedback (click)

  • 👍 Sweep Did Well
  • 👎 Sweep Needs Improvement
    I created this PR to fix the failing GitHub Actions.## Description
    This PR addresses the issue where the GitHub Actions run was failing due to the go-gitlint tool not being found. The commit-msg hook script was supposed to install the tool if it was not found, but the installation commands were missing. This PR adds the necessary commands to download and install the go-gitlint tool.

Summary of Changes

  • Modified the scripts/githooks/commit-msg script to include the commands to download and install the go-gitlint tool using go get.
  • Added a check after the installation commands to verify if the tool was successfully installed. If the installation fails, an error message is printed and the script exits with a non-zero status to indicate failure.

Please review and let me know if there are any issues or improvements needed.

@sweep-ai sweep-ai bot requested review from cubxxw and kubbot as code owners January 2, 2024 07:12
@sweep-ai sweep-ai bot assigned cubxxw Jan 2, 2024
Copy link
Contributor Author

sweep-ai bot commented Jan 2, 2024

Rollback Files For Sweep

  • Rollback changes to scripts/githooks/commit-msg
  • Rollback changes to scripts/githooks/commit-msg

@sweep-ai sweep-ai bot added the sweep label Jan 2, 2024
Copy link
Contributor Author

sweep-ai bot commented Jan 2, 2024

Sandbox Executions

  • Running GitHub Actions for scripts/githooks/commit-msg
Check scripts/githooks/commit-msg with contents:

Ran GitHub Actions for 301c006155a946cc950d2184b30d245cd6c70e71:

@pull-request-size pull-request-size bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Jan 2, 2024
Copy link
Contributor Author

sweep-ai bot commented Jan 2, 2024

Sweeping

Fixing PR: track the progress here.

I'm currently fixing this PR to address the following:

[Sweep GHA Fix] The GitHub Actions run failed with the following error logs:

The command:
Run ./tools/typos ./CONTRIBUTING.md ./README.md
yielded the following error:
##[error]Process completed with exit code 127.

Here are the logs:
/home/runner/work/_temp/3c8ce849-46e5-45b4-aa47-d0b04f8f1bf1.sh: line 1: ./tools/typos: No such file or directory

Copy link
Contributor Author

sweep-ai bot commented Jan 2, 2024

Sweeping

Fixing PR: track the progress here.

I'm currently fixing this PR to address the following:

[Sweep GHA Fix] The GitHub Actions run failed with the following error logs:

The command:
Run go install github.com/llorllale/go-gitlint/cmd/go-gitlint@latest
yielded the following error:
##[error]Process completed with exit code 1.

Here are the logs:
go: downloading github.com/llorllale/go-gitlint v0.0.0-20230218145529-5dd6bc6b0830
go: github.com/llorllale/go-gitlint/cmd/go-gitlint@latest: module github.com/llorllale/go-gitlint@latest found (v0.0.0-20230218145529-5dd6bc6b0830), but does not contain package github.com/llorllale/go-gitlint/cmd/go-gitlint

Copy link
Contributor Author

sweep-ai bot commented Jan 2, 2024

Sweeping

Fixing PR: track the progress here.

I'm currently fixing this PR to address the following:

[Sweep GHA Fix] The GitHub Actions run failed with the following error logs:

The command:
Run go install github.com/llorllale/go-gitlint/cmd/go-gitlint@latest
yielded the following error:
##[error]Process completed with exit code 1.

Here are the logs:
go: downloading github.com/llorllale/go-gitlint v0.0.0-20230218145529-5dd6bc6b0830
go: github.com/llorllale/go-gitlint/cmd/go-gitlint@latest: module github.com/llorllale/go-gitlint@latest found (v0.0.0-20230218145529-5dd6bc6b0830), but does not contain package github.com/llorllale/go-gitlint/cmd/go-gitlint

Copy link
Contributor Author

sweep-ai bot commented Jan 2, 2024

Sweeping

Fixing PR: track the progress here.

I'm currently fixing this PR to address the following:

[Sweep GHA Fix] The GitHub Actions run failed with the following error logs:

The command:
Run crate-ci/typos@master
yielded the following error:
##[error]Process completed with exit code 64.

Here are the logs:
##[group]Run $GITHUB_ACTION_PATH/action/entrypoint.sh
�[36;1m$GITHUB_ACTION_PATH/action/entrypoint.sh�[0m
shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
env:
INSTALL_DIR: .
INPUT_FILES: ./CONTIRIBUTING.md ./README.md
INPUT_EXTEND_IDENTIFIERS:
INPUT_EXTEND_WORDS:
INPUT_ISOLATED: false
INPUT_WRITE_CHANGES: false
INPUT_CONFIG:
##[endgroup]
--2024-01-02 07:12:40--  https://github.com/crate-ci/typos/releases/download/v1.16.26/typos-v1.16.26-x86_64-unknown-linux-musl.tar.gz
Resolving github.com (github.com)... 140.82.114.3
Connecting to github.com (github.com)|140.82.114.3|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://objects.githubusercontent.com/github-production-release-asset-2e65be/181782286/a483f245-d4c3-4214-b98c-2b33e8793015?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAVCODYLSA53PQK4ZA%2F20240102%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20240102T071240Z&X-Amz-Expires=300&X-Amz-Signature=0270b16119f5525d3bdfd028e1d193b414fa75a57bc4d62bd1bb968d443c7e58&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=181782286&response-content-disposition=attachment%3B%20filename%3Dtypos-v1.16.26-x86_64-unknown-linux-musl.tar.gz&response-content-type=application%2Foctet-stream [following]
--2024-01-02 07:12:40--  https://objects.githubusercontent.com/github-production-release-asset-2e65be/181782286/a483f245-d4c3-4214-b98c-2b33e8793015?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAVCODYLSA53PQK4ZA%2F20240102%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20240102T071240Z&X-Amz-Expires=300&X-Amz-Signature=0270b16119f5525d3bdfd028e1d193b414fa75a57bc4d62bd1bb968d443c7e58&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=181782286&response-content-disposition=attachment%3B%20filename%3Dtypos-v1.16.26-x86_64-unknown-linux-musl.tar.gz&response-content-type=application%2Foctet-stream
Resolving objects.githubusercontent.com (objects.githubusercontent.com)... 185.199.109.133, 185.199.110.133, 185.199.111.133, ...
Connecting to objects.githubusercontent.com (objects.githubusercontent.com)|185.199.109.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 6542857 (6.2M) [application/octet-stream]
Saving to: ‘typos-v1.16.26-x86_64-unknown-linux-musl.tar.gz’

0K ........ ........ ........ ........ ........ ........ 48%  181M 0s
3072K ........ ........ ........ ........ ........ ........ 96%  355M 0s
6144K ...                                                  100%  371M=0.03s

2024-01-02 07:12:40 (244 MB/s) - ‘typos-v1.16.26-x86_64-unknown-linux-musl.tar.gz’ saved [6542857/6542857]

./typos
jq: jq-1.6
$ ./typos ./CONTIRIBUTING.md ./README.md
argument `./CONTIRIBUTING.md` is not found
argument `./CONTIRIBUTING.md` is not found

Copy link
Contributor Author

sweep-ai bot commented Jan 2, 2024

Sweeping

Fixing PR: track the progress here.

I'm currently fixing this PR to address the following:

[Sweep GHA Fix] The GitHub Actions run failed with the following error logs:

The command:
Run ./tools/typos ./CONTRIBUTING.md ./README.md
yielded the following error:
##[error]Process completed with exit code 127.

Here are the logs:
/home/runner/work/_temp/3b5db7f9-b635-4c75-ae09-6fb57b14d934.sh: line 1: ./tools/typos: No such file or directory

Copy link
Contributor Author

sweep-ai bot commented Jan 2, 2024

Sweeping

Fixing PR: track the progress here.

I'm currently fixing this PR to address the following:

[Sweep GHA Fix] The GitHub Actions run failed with the following error logs:

The command:
Run ./scripts/githooks/commit-msg
yielded the following error:
##[error]Process completed with exit code 126.

Here are the logs:
/home/runner/work/_temp/759f3219-8d30-45bf-b694-f9c0926dd5ee.sh: line 1: ./scripts/githooks/commit-msg: Permission denied

Copy link
Contributor Author

sweep-ai bot commented Jan 2, 2024

Sweeping

Fixing PR: track the progress here.

I'm currently fixing this PR to address the following:

[Sweep GHA Fix] The GitHub Actions run failed with the following error logs:

The command:
Run ./scripts/githooks/commit-msg
yielded the following error:
##[error]Process completed with exit code 126.

Here are the logs:
/home/runner/work/_temp/329a4e63-aea4-476b-9c80-f93867e1658c.sh: line 1: ./scripts/githooks/commit-msg: Permission denied

Copy link
Contributor Author

sweep-ai bot commented Jan 2, 2024

Sweeping

Fixing PR: track the progress here.

I'm currently fixing this PR to address the following:

[Sweep GHA Fix] The GitHub Actions run failed with the following error logs:

The command:
Run anchore/scan-action@v3
yielded the following error:
##[error]Failed minimum severity level. Found vulnerabilities with level 'medium' or higher

Here are the logs:
[command]/usr/bin/chmod +x /home/runner/work/_temp/d9826567-687f-4f67-9bd1-c3e32f1b579d
[command]/home/runner/work/_temp/d9826567-687f-4f67-9bd1-c3e32f1b579d -b /home/runner/work/_temp/d9826567-687f-4f67-9bd1-c3e32f1b579d_grype v0.73.4
[info] checking github for release tag='v0.73.4'
[info] fetching release script for tag='v0.73.4'
[info] checking github for release tag='v0.73.4'
[info] using release tag='v0.73.4' version='0.73.4' os='linux' arch='amd64'
[info] installed /home/runner/work/_temp/d9826567-687f-4f67-9bd1-c3e32f1b579d_grype/grype
##[group]grype output...
Executing: grype -o sarif --fail-on medium dir:.
1 error occurred:
* discovered vulnerabilities at or above the severity threshold

##[endgroup]

Copy link
Contributor Author

sweep-ai bot commented Jan 2, 2024

Sweeping

Fixing PR: track the progress here.

I'm currently fixing this PR to address the following:

[Sweep GHA Fix] The GitHub Actions run failed with the following error logs:

The command:
Run git add .
yielded the following error:
##[error]Process completed with exit code 1.

Here are the logs:
�[93mkubecub : Running local kubecub pre-commit hook.�[0m
�[93mkubecub : Running the kubecub commit-msg hook.�[0m
./_output/tools/go-gitlint not found. Attempting to install it...
.git/hooks/commit-msg: line 64: ./_output/tools/go-gitlint: No such file or directory
�[31mkubecub : ./_output/tools/go-gitlint not found. Installing the go-gitlint tool...�[0m
make: Nothing to be done for 'tools'.
�[31mkubecub : Please make sure the installation was successful and re-run the commit-msg hook.�[0m
�[31mkubecub : Please fix your commit message to match kubecub coding standards�[0m
�[31mkubecub : https://gist.github.com/cubxxw/126b72104ac0b0ca484c9db09c3e5694#file-githook-md�[0m

Copy link
Contributor Author

sweep-ai bot commented Jan 2, 2024

Sweeping

Fixing PR: track the progress here.

I'm currently fixing this PR to address the following:

[Sweep GHA Fix] The GitHub Actions run failed with the following error logs:

The command:
Run git add .
yielded the following error:
##[error]Process completed with exit code 1.

Here are the logs:
�[93mkubecub : Running local kubecub pre-commit hook.�[0m
�[93mkubecub : Running the kubecub commit-msg hook.�[0m
.git/hooks/commit-msg: line 85: syntax error: unexpected end of file

Copy link
Contributor Author

sweep-ai bot commented Jan 2, 2024

Sweeping

Fixing PR: track the progress here.

I'm currently fixing this PR to address the following:

[Sweep GHA Fix] The GitHub Actions run failed with the following error logs:

The command:
Run git config --global user.email "3293172751ysy@gmail.com"
yielded the following error:
##[error]Process completed with exit code 1.

Here are the logs:
�[93mkubecub : Running local kubecub pre-commit hook.�[0m
�[93mkubecub : Running the kubecub commit-msg hook.�[0m
.git/hooks/commit-msg: line 85: syntax error: unexpected end of file

Copy link
Contributor Author

sweep-ai bot commented Jan 2, 2024

Sweeping

Fixing PR: track the progress here.

I'm currently fixing this PR to address the following:

[Sweep GHA Fix] The GitHub Actions run failed with the following error logs:

The command:
Run git add .
yielded the following error:
##[error]Process completed with exit code 1.

Here are the logs:
�[93mkubecub : Running local kubecub pre-commit hook.�[0m
�[93mkubecub : Running the kubecub commit-msg hook.�[0m
.git/hooks/commit-msg: line 85: syntax error: unexpected end of file

Copy link
Contributor Author

sweep-ai bot commented Jan 2, 2024

Sweeping

Fixing PR: track the progress here.

I'm currently fixing this PR to address the following:

[Sweep GHA Fix] The GitHub Actions run failed with the following error logs:

The command:
Run git config --global user.email "3293172751ysy@gmail.com"
yielded the following error:
##[error]Process completed with exit code 1.

Here are the logs:
�[93mkubecub : Running local kubecub pre-commit hook.�[0m
�[93mkubecub : Running the kubecub commit-msg hook.�[0m
./_output/tools/go-gitlint not found. Attempting to install it...
.git/hooks/commit-msg: line 64: ./_output/tools/go-gitlint: No such file or directory
�[31mkubecub : ./_output/tools/go-gitlint not found. Installing the go-gitlint tool...�[0m
make: Nothing to be done for 'tools'.
�[31mkubecub : Please make sure the installation was successful and re-run the commit-msg hook.�[0m
�[31mkubecub : Please fix your commit message to match kubecub coding standards�[0m
�[31mkubecub : https://gist.github.com/cubxxw/126b72104ac0b0ca484c9db09c3e5694#file-githook-md�[0m

@kubbot
Copy link
Member

kubbot commented Jan 9, 2024

This issue is stale because it has been open 7 days with no activity.

@kubbot kubbot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jan 9, 2024
@kubbot
Copy link
Member

kubbot commented Jan 15, 2024

This PR was closed because it has been stalled for 5 days with no activity. You can reopen it if you want.

@kubbot kubbot closed this Jan 15, 2024
@kubecub kubecub locked and limited conversation to collaborators Jan 15, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants