generated from kubernetes/kubernetes-template-project
-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12 from Adirio/prtypes-switch
⚠️ Define specific behavior for each PR action including synchronize
- Loading branch information
Showing
6 changed files
with
447 additions
and
141 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/* | ||
Copyright 2020 The Kubernetes Authors. | ||
Licensed 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. | ||
*/ | ||
|
||
package verify | ||
|
||
import ( | ||
"github.com/google/go-github/v32/github" | ||
) | ||
|
||
type CheckRunStatus string | ||
|
||
const ( | ||
Queued CheckRunStatus = "queued" | ||
Started CheckRunStatus = "in_progress" | ||
Finished CheckRunStatus = "completed" | ||
) | ||
|
||
func (status CheckRunStatus) StringP() *string { | ||
return github.String(string(status)) | ||
} | ||
|
||
func (status CheckRunStatus) Equal(other string) bool { | ||
return string(status) == other | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/* | ||
Copyright 2020 The Kubernetes Authors. | ||
Licensed 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. | ||
*/ | ||
|
||
package verify | ||
|
||
import ( | ||
"fmt" | ||
) | ||
|
||
type logger struct{} | ||
|
||
func (logger) errorf(format string, args ...interface{}) { | ||
fmt.Printf("::error::"+format+"\n", args...) | ||
} | ||
|
||
func (logger) debugf(format string, args ...interface{}) { | ||
fmt.Printf("::debug::"+format+"\n", args...) | ||
} | ||
|
||
func (logger) warningf(format string, args ...interface{}) { | ||
fmt.Printf("::warning::"+format+"\n", args...) | ||
} |
Oops, something went wrong.