Skip to content
/ ghactions Public

Create a Github Action in 5 seconds!

License

Notifications You must be signed in to change notification settings

ldez/ghactions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GHActions

GitHub tag (latest SemVer) Build Status PkgGoDev

Sponsor

Create a GitHub Action in 5 seconds!

Examples

package main

import (
	"context"
	"log"

	"github.com/google/go-github/v49/github"
	"github.com/ldez/ghactions"
	"github.com/ldez/ghactions/event"
)

func main() {
	ctx := context.Background()
	action := ghactions.NewAction(ctx)
	// action.SkipWhenNoHandler = true
	// action.SkipWhenTypeUnknown = true

	err := action.
		OnPullRequest(func(client *github.Client, requestEvent *github.PullRequestEvent) error {
			// TODO add your code.
			return nil
		}).
		OnIssues(func(client *github.Client, issuesEvent *github.IssuesEvent) error {
			// TODO add your code.
			return nil
		}).
		Run()

	if err != nil {
		log.Fatal(err)
	}
}

References

About

Create a Github Action in 5 seconds!

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Sponsor this project

 

Contributors 3

  •  
  •  
  •