Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions plugins/github/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ All of the webhooks are deleted when the plugin event source gets closed (i.e. w
| `github.repo` | `string` | None | (deprecated) URL of the git repository where the event occurred. Github Webhook payloads contain the repository property when the event occurs from activity in a repository. |
| `github.repo.url` | `string` | None | URL of the git repository where the event occurred. Github Webhook payloads contain the repository property when the event occurs from activity in a repository. |
| `github.repo.name` | `string` | None | Name of the git repository where the event occurred. Github Webhook payloads contain the repository property when the event occurs from activity in a repository. |
| `github.repo.description` | `string` | None | Description of the git repository where the event occurred. |
| `github.org` | `string` | None | Name of the organization the git repository belongs to. |
| `github.owner` | `string` | None | Name of the repository's owner. |
| `github.repo.public` | `string` | None | 'true' if the repository affected by the action is public. 'false' otherwise. |
Expand Down
3 changes: 3 additions & 0 deletions plugins/github/pkg/github/extract.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ func (p *Plugin) Fields() []sdk.FieldEntry {
{Type: "string", Name: "github.repo", Display: "Repository", Desc: "(deprecated) URL of the git repository where the event occurred. Github Webhook payloads contain the repository property when the event occurs from activity in a repository."},
{Type: "string", Name: "github.repo.url", Display: "Repository URL", Desc: "URL of the git repository where the event occurred. Github Webhook payloads contain the repository property when the event occurs from activity in a repository."},
{Type: "string", Name: "github.repo.name", Display: "Repository Name", Desc: "Name of the git repository where the event occurred. Github Webhook payloads contain the repository property when the event occurs from activity in a repository."},
{Type: "string", Name: "github.repo.description", Display: "Repository Description", Desc: "Description of the GitHub repository."},
{Type: "string", Name: "github.org", Display: "Organization", Desc: "Name of the organization the git repository belongs to."},
{Type: "string", Name: "github.owner", Display: "Owner", Desc: "Name of the repository's owner."},
{Type: "string", Name: "github.repo.public", Display: "Public", Desc: "'true' if the repository affected by the action is public. 'false' otherwise."},
Expand Down Expand Up @@ -145,6 +146,8 @@ func getfieldStr(jdata *fastjson.Value, field string) (bool, string) {
case "github.repo.name":
res = string(jdata.Get("repository", "html_url").GetStringBytes())
res = strings.TrimPrefix(res, "https://github.com/")
case "github.repo.description":
res = string(jdata.Get("repository", "description").GetStringBytes())
case "github.org":
res = string(jdata.Get("organization", "login").GetStringBytes())
case "github.owner":
Expand Down
Loading