Skip to content

Commit

Permalink
Create add-label.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
hello-stephen authored Oct 24, 2023
1 parent 40e430c commit 9b47e28
Showing 1 changed file with 66 additions and 0 deletions.
66 changes: 66 additions & 0 deletions .github/workflows/add-label.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.


name: Add Meta-change Label

on:
pull_request:
push:
branches:
- master

jobs:
add-meta-change-label:
runs-on: ubuntu-latest

steps:
- name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
if: ${{ github.event_name != 'pull_request' }}
uses: actions/checkout@v3
with:
submodules: recursive

- name: "Checkout ${{ github.ref }} ( ${{ github.event.pull_request.head.sha }} )"
if: ${{ github.event_name == 'pull_request' }}
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
submodules: recursive

- name: Paths filter
uses: ./.github/actions/paths-filter
id: filter
with:
filters: |
meta_changes:
- 'fe/fe-common/src/main/java/org/apache/doris/common/FeMetaVersion.java'
- 'fe/fe-core/src/main/java/org/apache/doris/alter/AlterOpType.java'
- 'gensrc/thrift/*'
- 'gensrc/proto/*'
- name: "Add meta-change label to PR"
if: ${{ steps.filter.outputs.meta_changes == 'true' }}
uses: actions/github-script@v6
with:
script: |
github.issues.addLabels({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.payload.pull_request.number,
labels: ['meta-change']
});

0 comments on commit 9b47e28

Please sign in to comment.