Skip to content

Commit

Permalink
[CI] create Issues from the TODO in the code (#60)
Browse files Browse the repository at this point in the history
* [CI] add TODO to issue as github action

Signed-off-by: bertty <[email protected]>

* [TODO] add todo

Signed-off-by: bertty <[email protected]>

* [LICENSE-HEADER] add exceptions for the gitmodules

Signed-off-by: bertty <[email protected]>

* [CI] todo2issue: execute in all the case

Signed-off-by: bertty <[email protected]>

* [CI] todo2issue: update recursive to bring the submodules

Signed-off-by: bertty <[email protected]>

* [DOCS][TODO] add Documentation

Signed-off-by: bertty <[email protected]>

* [CI] todo2issue: add token

Signed-off-by: bertty <[email protected]>

* [DOCS][TODO] add documentation

Signed-off-by: bertty <[email protected]>

* [CI] add permissions

Signed-off-by: bertty <[email protected]>
  • Loading branch information
Bertty Contreras-Rojas authored Jan 24, 2022
1 parent 7a9396a commit 731b05b
Show file tree
Hide file tree
Showing 6 changed files with 56 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/actions/todo-to-issue-action
Submodule todo-to-issue-action added at 16fa73
38 changes: 38 additions & 0 deletions .github/workflows/todo2issue.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# 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: to-do to issue workflow

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
types: [closed]
permissions:
issues: write
jobs:
build:
runs-on: "ubuntu-latest"
steps:
- uses: "actions/checkout@master"
with:
persist-credentials: false
submodules: recursive
- name: "TODO to Issue"
uses: ./.github/actions/todo-to-issue-action
id: "todo"
with:
token: ${{ secrets.GITHUB_TOKEN }}
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule ".github/actions/todo-to-issue-action"]
path = .github/actions/todo-to-issue-action
url = https://github.com/alstr/todo-to-issue-action.git
2 changes: 2 additions & 0 deletions .licenserc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ header:
- '**/*.lock'
- '**/*.ini'
- '**/.gitignore'
- '**/.gitmodules'
- '**/.github/actions/todo-to-issue-action'
- '**/org/apache/wayang/commons/util/profiledb/**'

comment: on-failure
2 changes: 2 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1216,6 +1216,8 @@
<!-- Git related files -->
<exclude>**/.git/**</exclude>
<exclude>**/.gitignore</exclude>
<exclude>**/.gitmodules</exclude>
<exclude>**/.github/actions/**</exclude>

<!-- Maven related files -->
<exclude>**/target/**</exclude>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,11 @@ private void checkSubplanNotASingleton(Subplan subplan, final AtomicBoolean test
}
}

/**
* TODO: (Documentation) add SanityChecker.checkFlatAlternatives
* labels: documentation,todo
* @return
*/
public boolean checkFlatAlternatives() {
AtomicBoolean testOutcome = new AtomicBoolean(true);
new PlanTraversal(true, false)
Expand All @@ -123,6 +128,11 @@ public boolean checkFlatAlternatives() {
return testOutcome.get();
}

/**
* TODO: (Documentation) add SanityChecker.getFlatAlternativeCallback
* labels: documentation,todo
* @return
*/
private PlanTraversal.Callback getFlatAlternativeCallback(AtomicBoolean testOutcome) {
return (operator, fromInputSlot, fromOutputSlot) -> {
if (operator.isAlternative()) {
Expand Down

0 comments on commit 731b05b

Please sign in to comment.