From 27753fcc3dfd4e91105f1e26cf740d0d320a2bff Mon Sep 17 00:00:00 2001 From: "Jorge C. Leitao" Date: Fri, 2 Oct 2020 09:03:11 +0200 Subject: [PATCH 1/5] Added github action to label PRs for rust. --- .github/workflows/dev_cron.yml | 11 +++++++++++ .github/workflows/dev_cron/labeler.yml | 6 ++++++ 2 files changed, 17 insertions(+) create mode 100644 .github/workflows/dev_cron/labeler.yml diff --git a/.github/workflows/dev_cron.yml b/.github/workflows/dev_cron.yml index 77127185118..274a8c6cf04 100644 --- a/.github/workflows/dev_cron.yml +++ b/.github/workflows/dev_cron.yml @@ -61,3 +61,14 @@ jobs: const path = ".github/workflows/dev_cron/title_check.js"; const script = fs.readFileSync(path).toString(); eval(script); + + assign-rust-labels: + if: github.repository == 'apache/arrow' + runs-on: ubuntu-latest + steps: + - name: Assign labels + uses: actions/labeler@2.2.0 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + configuration-path: .github/workflows/dev_cron/labeler.yml + sync-labels: true diff --git a/.github/workflows/dev_cron/labeler.yml b/.github/workflows/dev_cron/labeler.yml new file mode 100644 index 00000000000..81550fa1f10 --- /dev/null +++ b/.github/workflows/dev_cron/labeler.yml @@ -0,0 +1,6 @@ + +rust-lang: + - any: ['rust/*.'] + +datafusion: + - any: ['rust/datafusion/*.'] From 69ce93cd82a13f125e27cec44a8ac91237c8a748 Mon Sep 17 00:00:00 2001 From: "Jorge C. Leitao" Date: Fri, 2 Oct 2020 09:22:10 +0200 Subject: [PATCH 2/5] Fixed typo. --- .github/workflows/dev_cron/labeler.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dev_cron/labeler.yml b/.github/workflows/dev_cron/labeler.yml index 81550fa1f10..9e4e30a525f 100644 --- a/.github/workflows/dev_cron/labeler.yml +++ b/.github/workflows/dev_cron/labeler.yml @@ -1,6 +1,6 @@ rust-lang: - - any: ['rust/*.'] +- any: ['rust/*.'] datafusion: - - any: ['rust/datafusion/*.'] +- any: ['rust/datafusion/*.'] From d8155b549efb7b05addaa5b64de526fb1eaef31e Mon Sep 17 00:00:00 2001 From: "Jorge C. Leitao" Date: Fri, 2 Oct 2020 09:23:00 +0200 Subject: [PATCH 3/5] Added license. --- .github/workflows/dev_cron/labeler.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.github/workflows/dev_cron/labeler.yml b/.github/workflows/dev_cron/labeler.yml index 9e4e30a525f..33c069bf00e 100644 --- a/.github/workflows/dev_cron/labeler.yml +++ b/.github/workflows/dev_cron/labeler.yml @@ -1,3 +1,19 @@ +# 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. rust-lang: - any: ['rust/*.'] From 5db3cf4e5bb0937b66ec4d156fdd88abd300e715 Mon Sep 17 00:00:00 2001 From: "Jorge C. Leitao" Date: Fri, 2 Oct 2020 17:23:37 +0200 Subject: [PATCH 4/5] Moved files around. --- .github/workflows/dev_cron.yml | 11 ------- .github/workflows/dev_labeler.yml | 31 +++++++++++++++++++ .../{dev_cron => dev_labeler}/labeler.yml | 4 +-- 3 files changed, 33 insertions(+), 13 deletions(-) create mode 100644 .github/workflows/dev_labeler.yml rename .github/workflows/{dev_cron => dev_labeler}/labeler.yml (94%) diff --git a/.github/workflows/dev_cron.yml b/.github/workflows/dev_cron.yml index 274a8c6cf04..77127185118 100644 --- a/.github/workflows/dev_cron.yml +++ b/.github/workflows/dev_cron.yml @@ -61,14 +61,3 @@ jobs: const path = ".github/workflows/dev_cron/title_check.js"; const script = fs.readFileSync(path).toString(); eval(script); - - assign-rust-labels: - if: github.repository == 'apache/arrow' - runs-on: ubuntu-latest - steps: - - name: Assign labels - uses: actions/labeler@2.2.0 - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - configuration-path: .github/workflows/dev_cron/labeler.yml - sync-labels: true diff --git a/.github/workflows/dev_labeler.yml b/.github/workflows/dev_labeler.yml new file mode 100644 index 00000000000..2b8a90a3333 --- /dev/null +++ b/.github/workflows/dev_labeler.yml @@ -0,0 +1,31 @@ +# 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. + +on: +- pull_request_target + +jobs: + assign-rust-labels: + if: github.repository == 'apache/arrow' + runs-on: ubuntu-latest + steps: + - name: Assign github labels + uses: actions/labeler@2.2.0 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + configuration-path: .github/workflows/dev_labeler/labeler.yml + sync-labels: true diff --git a/.github/workflows/dev_cron/labeler.yml b/.github/workflows/dev_labeler/labeler.yml similarity index 94% rename from .github/workflows/dev_cron/labeler.yml rename to .github/workflows/dev_labeler/labeler.yml index 33c069bf00e..9c4b5c2fdfa 100644 --- a/.github/workflows/dev_cron/labeler.yml +++ b/.github/workflows/dev_labeler/labeler.yml @@ -16,7 +16,7 @@ # under the License. rust-lang: -- any: ['rust/*.'] +- any: ['rust/*'] datafusion: -- any: ['rust/datafusion/*.'] +- any: ['rust/datafusion/*'] From 2879be66f1382e12626df440f0bc1f2ead4777b8 Mon Sep 17 00:00:00 2001 From: "Jorge C. Leitao" Date: Sat, 3 Oct 2020 06:04:08 +0200 Subject: [PATCH 5/5] Removed conditional and fixed nit --- .github/workflows/dev_labeler.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/dev_labeler.yml b/.github/workflows/dev_labeler.yml index 2b8a90a3333..2fc665a56b1 100644 --- a/.github/workflows/dev_labeler.yml +++ b/.github/workflows/dev_labeler.yml @@ -20,10 +20,9 @@ on: jobs: assign-rust-labels: - if: github.repository == 'apache/arrow' runs-on: ubuntu-latest steps: - - name: Assign github labels + - name: Assign Github labels uses: actions/labeler@2.2.0 with: repo-token: ${{ secrets.GITHUB_TOKEN }}