runs

package
v0.0.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 3, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func Fetch

func Fetch(c *gin.Context)

func Found added in v0.0.5

func Found(ids []string, current int64) bool
Example
package main

import (
	"fmt"

	"github.com/itsubaki/fourkeys/handler/actions/runs"
)

func main() {
	ids := []string{"1111", "2222", "3333"}

	fmt.Println(runs.Found(ids, 1111))
	fmt.Println(runs.Found(ids, 4444))
	fmt.Println(runs.Found([]string{}, 1111))

}
Output:

true
false
true

func GetLastID added in v0.0.5

func GetLastID(ctx context.Context, projectID, dsn, owner, repository string) (int64, int64, error)

func Reverse

func Reverse(list []*github.WorkflowRun) []*github.WorkflowRun
Example
package main

import (
	"fmt"

	"github.com/google/go-github/v40/github"
	"github.com/itsubaki/fourkeys/handler/actions/runs"
)

func main() {
	list := []*github.WorkflowRun{
		{Name: github.String("aaa")},
		{Name: github.String("bbb")},
		{Name: github.String("ccc")},
	}

	for _, r := range runs.Reverse(list) {
		fmt.Println(*r.Name)
	}

}
Output:

ccc
bbb
aaa

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL