Skip to content

Commit

Permalink
🔄 synced file(s) with kubecub/go-project-layout
Browse files Browse the repository at this point in the history
🤖 kubbot to synchronize the warehouse
  • Loading branch information
kubbot committed Jul 13, 2023
1 parent 1d1f17e commit e852ac7
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/auto-invite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,4 @@ jobs:
token: "${{ secrets.BOT_GITHUB_TOKEN }}"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}


2 changes: 1 addition & 1 deletion .github/workflows/gpt-translate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ jobs:
uses: 3ru/gpt-translate@v1.0
with:
apikey: ${{ secrets.OPENAI_API_KEY }}
token: "${{ secrets.BOT_GITHUB_TOKEN }}"
token: "${{ secrets.BOT_GITHUB_TOKEN }}"
20 changes: 20 additions & 0 deletions .github/workflows/help-comment-issue.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Good frist issue add comment
on:
issues:
types:
- labeled
jobs:
add-comment:
if: github.event.label.name == 'help wanted' || github.event.label.name == 'good first issue'
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- name: Add comment
uses: peter-evans/create-or-update-comment@v3
with:
issue-number: ${{ github.event.issue.number }}
token: ${{ secrets.BOT_GITHUB_TOKEN }}
body: |
This issue is available for anyone to work on. **Make sure to reference this issue in your pull request.** :sparkles: Thank you for your contribution! :sparkles:
If you wish to accept this assignment, please leave a comment in the comments section: `/accept`.🎯
2 changes: 1 addition & 1 deletion .github/workflows/issue-robot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ jobs:
# it is not necessary to decide whether you need to modify the issue header content
IS_MODIFY_TITLE: true
BOT_GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }}
# Required, input your bot github token
# Required, input your bot github token
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ jobs:

- name: Test build artifacts
run: |
# Add your tests here to check the build artifacts
# Add your tests here to check the build artifacts
13 changes: 13 additions & 0 deletions scripts/githooks/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@
#
# ==============================================================================

LC_ALL=C

local_branch="$(git rev-parse --abbrev-ref HEAD)"
valid_branch_regex="^(main|master|develop)$|(feature|feat|release|hotfix|test|bug|ci|style|)\/[a-z0-9._-]+$|^HEAD$"


YELLOW="\e[93m"
GREEN="\e[32m"
Expand Down Expand Up @@ -87,4 +92,12 @@ then
printMessage "If you really need to commit this file, you can override the size limit by setting the GIT_FILE_SIZE_LIMIT environment variable, e.g. GIT_FILE_SIZE_LIMIT=42000000 for 42MB. Or, commit with the --no-verify switch to skip the check entirely."
printError "Commit aborted"
exit 1;
fi

if [[ ! $local_branch =~ $valid_branch_regex ]]
then
printError "There is something wrong with your branch name. Branch names in this project must adhere to this contract: $valid_branch_regex.
Your commit will be rejected. You should rename your branch to a valid name(feat/name OR bug/name) and try again."
printError "For more on this, read on: https://gist.github.com/cubxxw/126b72104ac0b0ca484c9db09c3e5694"
exit 1
fi

0 comments on commit e852ac7

Please sign in to comment.