Skip to content

Commit

Permalink
feat: add script
Browse files Browse the repository at this point in the history
Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com>
  • Loading branch information
cubxxw committed Jul 24, 2023
1 parent feeb56b commit 40ff42c
Show file tree
Hide file tree
Showing 34 changed files with 1,884 additions and 132 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/script.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Execute script and push changes

on:
push:
schedule:
- cron: '0 * * * *' # Runs every hour

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0 # Fetch all history for all branches and tags.

- name: Execute script
env:
GITHUB_TOKEN: ${{ secrets.REDBOT_GITHUB_TOKEN }}
run: |
chmod +x ./script.sh
./script.sh
- name: Commit and push if it has changed
run: |
git config --global user.email "3293172751ysy@gmail.com"
git config --global user.name "openimbot"
git diff --quiet && git diff --staged --quiet || (git add .; git commit -m "Auto update from Github Action"; git push;)
2 changes: 1 addition & 1 deletion labels-templates/go-project-layout-json.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
[{"name":"API","description":"Issues and PR about the API","color":"FBCA04","default":false,"id":5520223401,"node_id":"LA_kwDOJk4SXM8AAAABSQfsqQ","url":"https://api.github.com/repos/kubecub/go-project-layout/labels/API"},{"name":"automerge","description":"Automatically synchronize files to merge PR tags","color":"FEF2C0","default":false,"id":5602537306,"node_id":"LA_kwDOJk4SXM8AAAABTe_vWg","url":"https://api.github.com/repos/kubecub/go-project-layout/labels/automerge"},{"name":"file-sync","description":"Autosync file","color":"FEF2C0","default":false,"id":5602535701,"node_id":"LA_kwDOJk4SXM8AAAABTe_pFQ","url":"https://api.github.com/repos/kubecub/go-project-layout/labels/file-sync"},{"name":"good first issue","description":"Good for newcomers","color":"7057ff","default":true,"id":5520223407,"node_id":"LA_kwDOJk4SXM8AAAABSQfsrw","url":"https://api.github.com/repos/kubecub/go-project-layout/labels/good%20first%20issue"},{"name":"help wanted","description":"Extra attention is needed","color":"008672","default":true,"id":5520223410,"node_id":"LA_kwDOJk4SXM8AAAABSQfssg","url":"https://api.github.com/repos/kubecub/go-project-layout/labels/help%20wanted"},{"name":"invalid","description":"This doesn't seem right","color":"e4e669","default":true,"id":5520223414,"node_id":"LA_kwDOJk4SXM8AAAABSQfstg","url":"https://api.github.com/repos/kubecub/go-project-layout/labels/invalid"},{"name":"kind/bug","description":"Something isn't working","color":"d73a4a","default":false,"id":5520223417,"node_id":"LA_kwDOJk4SXM8AAAABSQfsuQ","url":"https://api.github.com/repos/kubecub/go-project-layout/labels/kind/bug"},{"name":"kind/documentation","description":"Improvements or additions to documentation","color":"0075ca","default":false,"id":5520223420,"node_id":"LA_kwDOJk4SXM8AAAABSQfsvA","url":"https://api.github.com/repos/kubecub/go-project-layout/labels/kind/documentation"},{"name":"kind/enhancement","description":"New feature or request","color":"a2eeef","default":false,"id":5520223423,"node_id":"LA_kwDOJk4SXM8AAAABSQfsvw","url":"https://api.github.com/repos/kubecub/go-project-layout/labels/kind/enhancement"},{"name":"kind/feature","description":"","color":"DC03D2","default":false,"id":5520223425,"node_id":"LA_kwDOJk4SXM8AAAABSQfswQ","url":"https://api.github.com/repos/kubecub/go-project-layout/labels/kind/feature"},{"name":"lgtm","description":"Indicates that a PR is ready to be merged.","color":"0E8A16","default":false,"id":5520223428,"node_id":"LA_kwDOJk4SXM8AAAABSQfsxA","url":"https://api.github.com/repos/kubecub/go-project-layout/labels/lgtm"},{"name":"lifecycle/stale","description":"","color":"ededed","default":false,"id":5618487007,"node_id":"LA_kwDOJk4SXM8AAAABTuNO3w","url":"https://api.github.com/repos/kubecub/go-project-layout/labels/lifecycle/stale"},{"name":"log","description":"","color":"FBCA04","default":false,"id":5520223430,"node_id":"LA_kwDOJk4SXM8AAAABSQfsxg","url":"https://api.github.com/repos/kubecub/go-project-layout/labels/log"},{"name":"question","description":"Further information is requested","color":"d876e3","default":true,"id":5520223431,"node_id":"LA_kwDOJk4SXM8AAAABSQfsxw","url":"https://api.github.com/repos/kubecub/go-project-layout/labels/question"},{"name":"report","description":"","color":"0E8A16","default":false,"id":5520832656,"node_id":"LA_kwDOJk4SXM8AAAABSRE4kA","url":"https://api.github.com/repos/kubecub/go-project-layout/labels/report"},{"name":"RFC","description":"","color":"10C590","default":false,"id":5520223404,"node_id":"LA_kwDOJk4SXM8AAAABSQfsrA","url":"https://api.github.com/repos/kubecub/go-project-layout/labels/RFC"},{"name":"roadmap","description":"","color":"0E8A16","default":false,"id":5520223432,"node_id":"LA_kwDOJk4SXM8AAAABSQfsyA","url":"https://api.github.com/repos/kubecub/go-project-layout/labels/roadmap"},{"name":"triage/accepted","description":"","color":"0E8A16","default":false,"id":5520223434,"node_id":"LA_kwDOJk4SXM8AAAABSQfsyg","url":"https://api.github.com/repos/kubecub/go-project-layout/labels/triage/accepted"},{"name":"triage/duplicate","description":"This issue or pull request already exists","color":"C001BC","default":false,"id":5520223439,"node_id":"LA_kwDOJk4SXM8AAAABSQfszw","url":"https://api.github.com/repos/kubecub/go-project-layout/labels/triage/duplicate"},{"name":"triage/unresolved","description":"","color":"D93F0B","default":false,"id":5520832653,"node_id":"LA_kwDOJk4SXM8AAAABSRE4jQ","url":"https://api.github.com/repos/kubecub/go-project-layout/labels/triage/unresolved"},{"name":"wontfix","description":"This will not be worked on","color":"ffffff","default":true,"id":5520223448,"node_id":"LA_kwDOJk4SXM8AAAABSQfs2A","url":"https://api.github.com/repos/kubecub/go-project-layout/labels/wontfix"}]
[{"name":"API","description":"Issues and PR about the API","color":"FBCA04","default":false,"id":5520223401,"node_id":"LA_kwDOJk4SXM8AAAABSQfsqQ","url":"https://api.github.com/repos/kubecub/go-project-layout/labels/API"},{"name":"automerge","description":"Automatically synchronize files to merge PR tags","color":"FEF2C0","default":false,"id":5602537306,"node_id":"LA_kwDOJk4SXM8AAAABTe_vWg","url":"https://api.github.com/repos/kubecub/go-project-layout/labels/automerge"},{"name":"file-sync","description":"Autosync file","color":"FEF2C0","default":false,"id":5602535701,"node_id":"LA_kwDOJk4SXM8AAAABTe_pFQ","url":"https://api.github.com/repos/kubecub/go-project-layout/labels/file-sync"},{"name":"good first issue","description":"Good for newcomers","color":"7057ff","default":true,"id":5520223407,"node_id":"LA_kwDOJk4SXM8AAAABSQfsrw","url":"https://api.github.com/repos/kubecub/go-project-layout/labels/good%20first%20issue"},{"name":"help wanted","description":"Extra attention is needed","color":"008672","default":true,"id":5520223410,"node_id":"LA_kwDOJk4SXM8AAAABSQfssg","url":"https://api.github.com/repos/kubecub/go-project-layout/labels/help%20wanted"},{"name":"invalid","description":"This doesn't seem right","color":"e4e669","default":true,"id":5520223414,"node_id":"LA_kwDOJk4SXM8AAAABSQfstg","url":"https://api.github.com/repos/kubecub/go-project-layout/labels/invalid"},{"name":"kind/bug","description":"Something isn't working","color":"d73a4a","default":false,"id":5520223417,"node_id":"LA_kwDOJk4SXM8AAAABSQfsuQ","url":"https://api.github.com/repos/kubecub/go-project-layout/labels/kind/bug"},{"name":"kind/documentation","description":"Improvements or additions to documentation","color":"0075ca","default":false,"id":5520223420,"node_id":"LA_kwDOJk4SXM8AAAABSQfsvA","url":"https://api.github.com/repos/kubecub/go-project-layout/labels/kind/documentation"},{"name":"kind/enhancement","description":"New feature or request","color":"a2eeef","default":false,"id":5520223423,"node_id":"LA_kwDOJk4SXM8AAAABSQfsvw","url":"https://api.github.com/repos/kubecub/go-project-layout/labels/kind/enhancement"},{"name":"kind/feature","description":"","color":"DC03D2","default":false,"id":5520223425,"node_id":"LA_kwDOJk4SXM8AAAABSQfswQ","url":"https://api.github.com/repos/kubecub/go-project-layout/labels/kind/feature"},{"name":"lgtm","description":"Indicates that a PR is ready to be merged.","color":"0E8A16","default":false,"id":5520223428,"node_id":"LA_kwDOJk4SXM8AAAABSQfsxA","url":"https://api.github.com/repos/kubecub/go-project-layout/labels/lgtm"},{"name":"lifecycle/stale","description":"","color":"ededed","default":false,"id":5618487007,"node_id":"LA_kwDOJk4SXM8AAAABTuNO3w","url":"https://api.github.com/repos/kubecub/go-project-layout/labels/lifecycle/stale"},{"name":"log","description":"","color":"FBCA04","default":false,"id":5520223430,"node_id":"LA_kwDOJk4SXM8AAAABSQfsxg","url":"https://api.github.com/repos/kubecub/go-project-layout/labels/log"},{"name":"question","description":"Further information is requested","color":"d876e3","default":true,"id":5520223431,"node_id":"LA_kwDOJk4SXM8AAAABSQfsxw","url":"https://api.github.com/repos/kubecub/go-project-layout/labels/question"},{"name":"report","description":"","color":"0E8A16","default":false,"id":5520832656,"node_id":"LA_kwDOJk4SXM8AAAABSRE4kA","url":"https://api.github.com/repos/kubecub/go-project-layout/labels/report"},{"name":"RFC","description":"","color":"10C590","default":false,"id":5520223404,"node_id":"LA_kwDOJk4SXM8AAAABSQfsrA","url":"https://api.github.com/repos/kubecub/go-project-layout/labels/RFC"},{"name":"roadmap","description":"","color":"0E8A16","default":false,"id":5520223432,"node_id":"LA_kwDOJk4SXM8AAAABSQfsyA","url":"https://api.github.com/repos/kubecub/go-project-layout/labels/roadmap"},{"name":"size/XS","description":"","color":"3CBF00","default":false,"id":5766082794,"node_id":"LA_kwDOJk4SXM8AAAABV69w6g","url":"https://api.github.com/repos/kubecub/go-project-layout/labels/size/XS"},{"name":"triage/accepted","description":"","color":"0E8A16","default":false,"id":5520223434,"node_id":"LA_kwDOJk4SXM8AAAABSQfsyg","url":"https://api.github.com/repos/kubecub/go-project-layout/labels/triage/accepted"},{"name":"triage/duplicate","description":"This issue or pull request already exists","color":"C001BC","default":false,"id":5520223439,"node_id":"LA_kwDOJk4SXM8AAAABSQfszw","url":"https://api.github.com/repos/kubecub/go-project-layout/labels/triage/duplicate"},{"name":"triage/unresolved","description":"","color":"D93F0B","default":false,"id":5520832653,"node_id":"LA_kwDOJk4SXM8AAAABSRE4jQ","url":"https://api.github.com/repos/kubecub/go-project-layout/labels/triage/unresolved"},{"name":"wontfix","description":"This will not be worked on","color":"ffffff","default":true,"id":5520223448,"node_id":"LA_kwDOJk4SXM8AAAABSQfs2A","url":"https://api.github.com/repos/kubecub/go-project-layout/labels/wontfix"}]
1 change: 1 addition & 0 deletions labels-templates/go-project-layout-table.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
| report | | 0E8A16 |
| RFC | | 10C590 |
| roadmap | | 0E8A16 |
| size/XS | | 3CBF00 |
| triage/accepted | | 0E8A16 |
| triage/duplicate | This issue or pull request | C001BC |
| | already exists | |
Expand Down
15 changes: 9 additions & 6 deletions labels-templates/go-project-layout-xml.xml
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
<!--
Copyright © 2023 KubeCub open source community. All rights reserved.
Licensed under the MIT License (the "License");
you may not use this file except in compliance with the License.
-->

<labels>
<label>
<Name>API</Name>
Expand Down Expand Up @@ -158,6 +152,15 @@
<NodeID>LA_kwDOJk4SXM8AAAABSQfsyA</NodeID>
<URL>https://api.github.com/repos/kubecub/go-project-layout/labels/roadmap</URL>
</label>
<label>
<Name>size/XS</Name>
<Description></Description>
<Color>3CBF00</Color>
<Default>false</Default>
<ID>5766082794</ID>
<NodeID>LA_kwDOJk4SXM8AAAABV69w6g</NodeID>
<URL>https://api.github.com/repos/kubecub/go-project-layout/labels/size/XS</URL>
</label>
<label>
<Name>triage/accepted</Name>
<Description></Description>
Expand Down
11 changes: 7 additions & 4 deletions labels-templates/go-project-layout-yaml.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
# Copyright © 2023 KubeCub open source community. All rights reserved.
# Licensed under the MIT License (the "License");
# you may not use this file except in compliance with the License.

- color: FBCA04
default: false
description: Issues and PR about the API
Expand Down Expand Up @@ -121,6 +117,13 @@
name: roadmap
node_id: LA_kwDOJk4SXM8AAAABSQfsyA
url: https://api.github.com/repos/kubecub/go-project-layout/labels/roadmap
- color: 3CBF00
default: false
description: ""
id: 5766082794
name: size/XS
node_id: LA_kwDOJk4SXM8AAAABV69w6g
url: https://api.github.com/repos/kubecub/go-project-layout/labels/size/XS
- color: 0E8A16
default: false
description: ""
Expand Down
2 changes: 1 addition & 1 deletion labels-templates/kubernetes-json.json

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions labels-templates/kubernetes-table.txt
Original file line number Diff line number Diff line change
Expand Up @@ -200,8 +200,9 @@
| | prior release. | |
| kind/support | Categorizes issue or PR as a | d455d0 |
| | support question. | |
| lgtm | Indicates that a PR is ready | 15dd18 |
| | to be merged. | |
| lgtm | "Looks good to me", indicates | 15dd18 |
| | that a PR is ready to be | |
| | merged. | |
| lifecycle/active | Indicates that an issue or PR | 8fc951 |
| | is actively being worked on by | |
| | a contributor. | |
Expand Down
8 changes: 1 addition & 7 deletions labels-templates/kubernetes-xml.xml
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
<!--
Copyright © 2023 KubeCub open source community. All rights reserved.
Licensed under the MIT License (the "License");
you may not use this file except in compliance with the License.
-->

<labels>
<label>
<Name>¯\_(ツ)_/¯</Name>
Expand Down Expand Up @@ -1069,7 +1063,7 @@
</label>
<label>
<Name>lgtm</Name>
<Description>Indicates that a PR is ready to be merged.</Description>
<Description>&#34;Looks good to me&#34;, indicates that a PR is ready to be merged.</Description>
<Color>15dd18</Color>
<Default>false</Default>
<ID>148225179</ID>
Expand Down
6 changes: 1 addition & 5 deletions labels-templates/kubernetes-yaml.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
# Copyright © 2023 KubeCub open source community. All rights reserved.
# Licensed under the MIT License (the "License");
# you may not use this file except in compliance with the License.

- color: f9d0c4
default: false
description: ¯\\\_(ツ)_/¯
Expand Down Expand Up @@ -847,7 +843,7 @@
url: https://api.github.com/repos/kubernetes/kubernetes/labels/kind/support
- color: 15dd18
default: false
description: Indicates that a PR is ready to be merged.
description: '"Looks good to me", indicates that a PR is ready to be merged.'
id: 148225179
name: lgtm
node_id: MDU6TGFiZWwxNDgyMjUxNzk=
Expand Down
2 changes: 1 addition & 1 deletion labels-templates/kustomize-json.json

Large diffs are not rendered by default.

Loading

0 comments on commit 40ff42c

Please sign in to comment.