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 GitHub Actions Failure Due to Missing go-gitlint Tool #130

Closed
wants to merge 2 commits into from

Conversation

sweep-ai[bot]
Copy link
Contributor

@sweep-ai sweep-ai bot commented Dec 28, 2023

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 of GitHub Actions failing due to the go-gitlint tool not being found. The commit-msg script has been modified to check if the go-gitlint tool exists before attempting to use it. If the tool does not exist, the script now installs it automatically. This prevents the GitHub Actions run from failing due to the tool not being found.

The pre-commit script has also been reviewed and modified to ensure it does not rely on the go-gitlint tool without checking if it exists first.

Summary of Changes

  • Modified the commit-msg script to check if the go-gitlint tool exists before attempting to use it.
  • If the go-gitlint tool does not exist, the script now installs it automatically.
  • Moved the existing check for the go-gitlint tool and the error message to after the new installation step.
  • Reviewed and modified the pre-commit script to ensure it does not rely on the go-gitlint tool without checking if it exists first.

These changes should prevent the GitHub Actions run from failing due to the go-gitlint tool not being found.

@sweep-ai sweep-ai bot requested review from cubxxw and kubbot as code owners December 28, 2023 16:16
Copy link
Contributor Author

sweep-ai bot commented Dec 28, 2023

Rollback Files For Sweep

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

@sweep-ai sweep-ai bot added the sweep label Dec 28, 2023
Copy link
Contributor Author

sweep-ai bot commented Dec 28, 2023

Sandbox Executions

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

Ran GitHub Actions for 9fb04ddbfd1800c6b4936b281d5cf589dd0c19ea:

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

Ran GitHub Actions for 7ed72290f0c68823e213c39a29df5d0a96522964:

@pull-request-size pull-request-size bot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Dec 28, 2023
Copy link
Contributor Author

sweep-ai bot commented Dec 28, 2023

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 "[email protected]"
yielded the following error:
##[error]Process completed with exit code 1.

Here are the logs:
�[93mkubecub : Running local kubecub pre-commit hook.�[0m
make: Nothing to be done for 'tools'.
�[93mkubecub : Running the kubecub commit-msg hook.�[0m
.git/hooks/commit-msg: line 60: ./_output/tools/go-gitlint: No such file or directory
�[31mkubecub : ./_output/tools/go-gitlint not found. Please run 'make tools' OR 'make tools.verify.go-gitlint' make verto install it.�[0m
.git/hooks/commit-msg: line 73: syntax error near unexpected token `fi'
.git/hooks/commit-msg: line 73: `    fi'

Making changes according to plan... (step 3/3)

Copy link
Contributor Author

sweep-ai bot commented Dec 28, 2023

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 "[email protected]"
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 55: ./_output/tools/go-gitlint: No such file or directory
�[31mkubecub : ./_output/tools/go-gitlint not found. Please run 'make tools' OR 'make tools.verify.go-gitlint' make verto install it.�[0m
�[31mkubecub : Please fix your commit message to match kubecub coding standards�[0m
�[31mkubecub : https://gist.github.com/cubxxw/126b72104ac0b0ca484c9db09c3e5694#file-githook-md�[0m

Making changes according to plan... (step 3/3)

Copy link
Contributor Author

sweep-ai bot commented Dec 28, 2023

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/641e42ad-bca6-41c6-b75f-c7d073ac377b.sh: line 1: ./tools/typos: No such file or directory

Making changes according to plan... (step 3/3)

Copy link
Contributor Author

sweep-ai bot commented Dec 28, 2023

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/aec93a3a-5187-4824-8e91-657210ee6c57.sh: line 1: ./tools/typos: No such file or directory

Making changes according to plan... (step 3/3)

@kubbot kubbot removed the sweep label Dec 30, 2023
@kubbot
Copy link
Member

kubbot commented Feb 1, 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 Feb 1, 2024
@kubbot
Copy link
Member

kubbot commented Feb 6, 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 Feb 6, 2024
@kubecub kubecub locked and limited conversation to collaborators Feb 6, 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/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants