-
Notifications
You must be signed in to change notification settings - Fork 587
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into carlos/update-middleware-docs
- Loading branch information
Showing
31 changed files
with
420 additions
and
656 deletions.
There are no files selected for viewing
Validating CODEOWNERS rules …
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,34 @@ | ||
package main | ||
|
||
import ( | ||
"flag" | ||
"fmt" | ||
"os" | ||
) | ||
|
||
var prNum int | ||
var ref string | ||
|
||
func init() { | ||
flag.IntVar(&prNum, "pr", 0, "the number of the pr") | ||
flag.StringVar(&ref, "ref", "", "the github ref") | ||
flag.Parse() | ||
} | ||
|
||
// in the context of a GithubAction workflow, the PR is the event number. So if the ref is not specified | ||
// but the event number is, that means we are running for a PR. If the ref is specified, this means | ||
// we have merged the PR, so we want to use the ref as a tag instead of the PR number. | ||
func main() { | ||
if prNum == 0 && ref == "" { | ||
fmt.Printf("must specify one or bot of [pr, ref]") | ||
os.Exit(1) | ||
} | ||
fmt.Printf(getSimdTag(prNum, ref)) | ||
} | ||
|
||
func getSimdTag(prNum int, ref string) string { | ||
if ref != "" { | ||
return ref | ||
} | ||
return fmt.Sprintf("pr-%d", prNum) | ||
} |
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
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
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
Oops, something went wrong.