You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2020/03/21 16:03:16 UTC

[GitHub] [airflow-on-k8s-operator] turbaszek opened a new pull request #16: Add pre-commit hooks

turbaszek opened a new pull request #16: Add pre-commit hooks
URL: https://github.com/apache/airflow-on-k8s-operator/pull/16
 
 
   This PR adds pre-commit hooks. Also, I've unified the licenses and added the missing ones. 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [airflow-on-k8s-operator] kaxil commented on issue #16: Add pre-commit hooks

Posted by GitBox <gi...@apache.org>.
kaxil commented on issue #16: Add pre-commit hooks
URL: https://github.com/apache/airflow-on-k8s-operator/pull/16#issuecomment-602223013
 
 
   > > @turbaszek Github Action doesn't work on forks. This PR is from apache repo.
   > 
   > Well, it works. I still don't get how the GA works...
   > This works:
   > 
   > ```yaml
   > on:
   >   push:
   >     branches:
   >       - master
   >   pull_request:
   >     branches:
   >       - master
   > ```
   > 
   > this not:
   > 
   > ```yaml
   > on: [push,  pull_request]
   > ```
   
   If the Pull request contains the branch from this repo itself, it would work. If you create a PR from your fork it won't work with GA

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [airflow-on-k8s-operator] turbaszek commented on issue #16: Add pre-commit hooks

Posted by GitBox <gi...@apache.org>.
turbaszek commented on issue #16: Add pre-commit hooks
URL: https://github.com/apache/airflow-on-k8s-operator/pull/16#issuecomment-602103990
 
 
   > GitHub actions works for this repository: https://github.com/apache/airflow-on-k8s-operator/actions
   
   I know, in closed PRs you can find my test one. I still don’t know why it doesn’t work on this PR (work on fork).

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [airflow-on-k8s-operator] mik-laj edited a comment on issue #16: Add pre-commit hooks

Posted by GitBox <gi...@apache.org>.
mik-laj edited a comment on issue #16: Add pre-commit hooks
URL: https://github.com/apache/airflow-on-k8s-operator/pull/16#issuecomment-602115095
 
 
   @turbaszek Github Action doesn't work on forks.   This PR is from apache repo.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [airflow-on-k8s-operator] kaxil merged pull request #16: Add pre-commit hooks

Posted by GitBox <gi...@apache.org>.
kaxil merged pull request #16: Add pre-commit hooks
URL: https://github.com/apache/airflow-on-k8s-operator/pull/16
 
 
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [airflow-on-k8s-operator] turbaszek commented on issue #16: Add pre-commit hooks

Posted by GitBox <gi...@apache.org>.
turbaszek commented on issue #16: Add pre-commit hooks
URL: https://github.com/apache/airflow-on-k8s-operator/pull/16#issuecomment-602077312
 
 
   @potiuk @mik-laj @ashb does Github Actions work for this repo? I see that it works on my fork but not here...

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [airflow-on-k8s-operator] turbaszek commented on issue #16: Add pre-commit hooks

Posted by GitBox <gi...@apache.org>.
turbaszek commented on issue #16: Add pre-commit hooks
URL: https://github.com/apache/airflow-on-k8s-operator/pull/16#issuecomment-602225363
 
 
   > If the Pull request contains the branch from this repo itself, it would work. If you create a PR from your fork it won't work with GA
   
   Got it! My assumption was that `on: [push, pull_request]` works always, no matter what. Anyway, we have running static checks on CI! Should we move on? @kaxil @mik-laj 
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [airflow-on-k8s-operator] mik-laj commented on a change in pull request #16: Add pre-commit hooks

Posted by GitBox <gi...@apache.org>.
mik-laj commented on a change in pull request #16: Add pre-commit hooks
URL: https://github.com/apache/airflow-on-k8s-operator/pull/16#discussion_r396004911
 
 

 ##########
 File path: .pre-commit-config.yaml
 ##########
 @@ -0,0 +1,70 @@
+# 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.
+
+repos:
+  - repo: git://github.com/dnephin/pre-commit-golang
+    rev: master
+    hooks:
+      - id: go-fmt
+        exclude: ^vendor/.*$
+  - repo: https://github.com/pre-commit/pre-commit-hooks
+    rev: v2.5.0
+    hooks:
+      - id: check-merge-conflict
+      - id: debug-statements
+      - id: detect-private-key
+      - id: end-of-file-fixer
+        exclude: ^vendor/.*$
+      - id: mixed-line-ending
+      - id: check-executables-have-shebangs
+      - id: trailing-whitespace
+        exclude: ^vendor/.*$
+      - id: fix-encoding-pragma
+        args:
+          - --remove
+        exclude: ^vendor/.*$
+  - repo: https://github.com/Lucas-C/pre-commit-hooks
+    rev: v1.1.7
+    hooks:
+      - id: insert-license
+        name: Add license for all yaml files
+        exclude: ^\.github/.*$"|^vendor/.*$
+        types: [yaml]
+        args:
+          - --comment-style
+          - "|#|"
+          - --license-filepath
+          - license-templates/LICENSE.txt
+          - --fuzzy-match-generates-todo
+      - id: insert-license
+        name: Add license for all md files
+        files: \.md$
+        exclude: ^\.github/.*$|^vendor/.*$
+        args:
+          - --comment-style
+          - "<!--|| -->"
+          - --license-filepath
+          - license-templates/LICENSE.txt
+          - --fuzzy-match-generates-todo
+      - id: insert-license
+        name: Add license for all go files
+        files: \.go$
+        exclude: ^\.github/.*$|^vendor/.*$|^zz_generated.*$
+        args:
+          - --comment-style
+          - "//"
+          - --license-filepath
+          - license-templates/LICENSE.txt
+          - --fuzzy-match-generates-todo
 
 Review comment:
   Can you also add yamllint?  You can do it in a separate PR.
   https://github.com/apache/airflow/blob/master/.pre-commit-config.yaml#L164-L170

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [airflow-on-k8s-operator] turbaszek commented on issue #16: Add pre-commit hooks

Posted by GitBox <gi...@apache.org>.
turbaszek commented on issue #16: Add pre-commit hooks
URL: https://github.com/apache/airflow-on-k8s-operator/pull/16#issuecomment-602156455
 
 
   @mik-laj @potiuk now we've got both yamllint and Github Actions :)

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [airflow-on-k8s-operator] turbaszek opened a new pull request #16: Add pre-commit hooks

Posted by GitBox <gi...@apache.org>.
turbaszek opened a new pull request #16: Add pre-commit hooks
URL: https://github.com/apache/airflow-on-k8s-operator/pull/16
 
 
   This PR adds pre-commit hooks. Also, I've unified the licenses and added the missing ones. 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [airflow-on-k8s-operator] turbaszek closed pull request #16: Add pre-commit hooks

Posted by GitBox <gi...@apache.org>.
turbaszek closed pull request #16: Add pre-commit hooks
URL: https://github.com/apache/airflow-on-k8s-operator/pull/16
 
 
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [airflow-on-k8s-operator] mik-laj commented on issue #16: Add pre-commit hooks

Posted by GitBox <gi...@apache.org>.
mik-laj commented on issue #16: Add pre-commit hooks
URL: https://github.com/apache/airflow-on-k8s-operator/pull/16#issuecomment-602115095
 
 
   @turbaszek Github doesn't work on forks.  

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [airflow-on-k8s-operator] turbaszek commented on issue #16: Add pre-commit hooks

Posted by GitBox <gi...@apache.org>.
turbaszek commented on issue #16: Add pre-commit hooks
URL: https://github.com/apache/airflow-on-k8s-operator/pull/16#issuecomment-602155519
 
 
   > @turbaszek Github Action doesn't work on forks. This PR is from apache repo.
   
   Well, it works. I still don't get how the GA works... 
   This works:
   ```yml
   on:
     push:
       branches:
         - master
     pull_request:
       branches:
         - master
   ```
   this not:
   ```yml
   on: [push,  pull_request]
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [airflow-on-k8s-operator] mik-laj commented on issue #16: Add pre-commit hooks

Posted by GitBox <gi...@apache.org>.
mik-laj commented on issue #16: Add pre-commit hooks
URL: https://github.com/apache/airflow-on-k8s-operator/pull/16#issuecomment-602096031
 
 
   @turbaszek Github Action must be enabled through a ticket in INFRA.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [airflow-on-k8s-operator] mik-laj removed a comment on issue #16: Add pre-commit hooks

Posted by GitBox <gi...@apache.org>.
mik-laj removed a comment on issue #16: Add pre-commit hooks
URL: https://github.com/apache/airflow-on-k8s-operator/pull/16#issuecomment-602096031
 
 
   @turbaszek Github Action must be enabled through a ticket in INFRA.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [airflow-on-k8s-operator] mik-laj commented on issue #16: Add pre-commit hooks

Posted by GitBox <gi...@apache.org>.
mik-laj commented on issue #16: Add pre-commit hooks
URL: https://github.com/apache/airflow-on-k8s-operator/pull/16#issuecomment-602096281
 
 
   GitHub actions works for this repository: https://github.com/apache/airflow-on-k8s-operator/actions

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services