Skip to content

Commit

Permalink
update(apps/prod/tekton/configs): update the ci helper for pr
Browse files Browse the repository at this point in the history
- add guide comment when the label added.

Signed-off-by: wuhuizuo <[email protected]>
  • Loading branch information
wuhuizuo committed Nov 26, 2024
1 parent e5968fb commit 6ac4f14
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
6 changes: 4 additions & 2 deletions apps/prod/tekton/configs/tasks/ci/ci-helper-for-pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,12 @@ spec:
&& apt update \
&& apt install gh -y
gh auth login --with-token < $(workspaces.github.path)/token
# truct the pull request
echo "pull request url: https://github.com/$(params.owner)/$(params.repo)/pull/$(params.number)"
gh auth login --with-token < $(workspaces.github.path)/token
gh pr edit --add-label ok-to-test --remove-label needs-ok-to-test https://github.com/$(params.owner)/$(params.repo)/pull/$(params.number)
gh pr edit --add-label ok-to-test --remove-label needs-ok-to-test https://github.com/$(params.owner)/$(params.repo)/pull/$(params.number)
gh pr comment --body 'Now you can start all CI jobs with `/test all` in comment or query the triggers with `/test ?`' https://github.com/$(params.owner)/$(params.repo)/pull/$(params.number)
workspaces:
- name: github
description: Must includes a key `token`
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ resources:
- _/fake-github/fake-github-pr.yaml
- _/fake-github/fake-github-tag-create.yaml
- _/git-push-on-fips-branches.yaml
- _/github-pr-labeled.yaml
- _/harbor/artifact-push-on-harbor.yaml
- _/harbor/image-push-on-harbor.yaml
- PingCAP-QE/artifacts/git-push.yaml
- pingcap/_/git-create-branch-gomod-update.yaml
- pingcap/_/git-create-branch.yaml
- pingcap/_/git-create-tag.yaml
- pingcap/_/github-pr-labeled.yaml
- pingcap/advanced-statefulset/git-create-tag.yaml
- pingcap/advanced-statefulset/git-push.yaml
- pingcap/monitoring/git-push.yaml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ spec:
&&
body.label.name in ['needs-ok-to-test']
&&
body.repository.owner.login in ["PingCAP-QE", "pingcap", "tikv"]
body.repository.full_name in ['pingcap/tidb', 'tikv/tikv', 'tikv/pd']
&&
body.pull_request.user.login in ["wuhuizuo", "purelind", "VelocityLight", "alex-quan-001"]
body.pull_request.user.login in ['mittalrishabh', 'Tema', 'HaoW30']
bindings:
- ref: github-pr
template:
Expand Down

0 comments on commit 6ac4f14

Please sign in to comment.