Compare commits

...

29 Commits

Author SHA1 Message Date
TP Honey 5f3c26274c
(maint) release prep for 1.28.0 (#232) 2 years ago
Vinícius Calasans 1949a8eb74
Add support for Github release webhook (#229)
* Add support for Github release webhook
2 years ago
Brad Rydzewski b29a0d2b0f
Merge pull request #230 from rutvijmehta-harness/master
Add Actor UUID to push and branch create events for Bitbucket
2 years ago
Rutvij Mehta 692aa9a8d2 Add Actor UUID to push and branch create events for Bitbucket 2 years ago
Brad Rydzewski ed290da0ed
Merge pull request #227 from rutvijmehta-harness/master
Add Actor UUID to Sender for all webhooks responses for Bitbucket
2 years ago
kit101 81afb0fa48
fixbug: gitee convert repository (#226) 2 years ago
Rutvij Mehta a6796f5d93 Add Actor UUID to Sender for all webhooks responses for Bitbucket 2 years ago
Brad Rydzewski b1a365cc57
Merge pull request #225 from drone/bitbucket_sha_fix
Bitbucket sha fix for merged pr
2 years ago
raghavharness c7c7db684a use new merge field instead of exisiting sha field 2 years ago
raghavharness 3eba41b4a1 Merge branch 'master' of https://github.com/drone/go-scm into bitbucket_sha_fix 2 years ago
Brad Rydzewski e073dbfa2b
Add field to capture merge sha 2 years ago
raghavharness cfb5ca9937 changes for stash 2 years ago
raghavharness 32e680098b use merge commit sha if pull request is merged for bitbucket 2 years ago
Raghav 7ee0aa5806
decoding projectName for azure repo (#224) 2 years ago
Raghav 531cb95bd1
added omitempty annotation for secret (#221) 2 years ago
Raghav c43e9f0b54
added date info for commits in push hook (#223)
* added date info for commits in push hook
2 years ago
Bhavya Agrawal f4a311024d
[PL-26239]: fix for list response (#218)
* [PL-26239]: fix for list response
2 years ago
Brad Rydzewski b83308fa5a fix naming convention for CreateBranch Input 2 years ago
Mohit Garg 09a4fde591
Added support for branch in list commits bb onprem API (#215)
* added support for branch in list commits bb onprem API
2 years ago
Brad Rydzewski 43b3e0a4fc update list (by) installation name 2 years ago
Brad Rydzewski 3edbe5560f upate function to match convention List[By] where By is singular 2 years ago
Brad Rydzewski 48f05b7abd
Merge pull request #213 from bhavya181/github-app
[PL-26239]: added api to list installation for github app
2 years ago
Brad Rydzewski b9de5f548d pin golangci version to use image from docker cache 2 years ago
Brad Rydzewski f481597b5e adopt golangci config from Rancher project 2 years ago
Bhavya Agrawal 6024f33534 [PL-26239]: added api to list installation for github app 2 years ago
TP Honey b8f5fce356
Merge pull request #211 from tphoney/naming_conventions
(maint) fixing naming and add more go best practice
2 years ago
TP Honey 99b9843dc4 (maint) fixing naming and add more go best practice 2 years ago
Brad Rydzewski c29b3f1156 escape forward slashes in gitlab branch name 2 years ago
Brad Rydzewski 07b069c7f7 gogs find commit for branch 2 years ago

@ -1,11 +1,10 @@
---
kind: pipeline
type: docker
type: vm
name: default
platform:
os: linux
arch: amd64
pool:
use: ubuntu
steps:
- name: vet
@ -15,6 +14,8 @@ steps:
volumes:
- name: gopath
path: /go
depends_on:
- clone
- name: test
image: golang:1.15
@ -23,6 +24,30 @@ steps:
volumes:
- name: gopath
path: /go
depends_on:
- vet
- name: check go.mod is up to date
image: golang:1.15
commands:
- cp go.mod go.mod.bak
- go mod tidy
- diff go.mod go.mod.bak || (echo "go.mod is not up to date" && exit 1)
volumes:
- name: gopath
path: /go
depends_on:
- vet
- name: golangci-lint
image: golangci/golangci-lint:v1.48-alpine
commands:
- golangci-lint run --timeout 500s --new-from-rev=HEAD~
volumes:
- name: gopath
path: /go
depends_on:
- clone
volumes:
- name: gopath

@ -0,0 +1,51 @@
{
"linters": {
"disable-all": true,
"enable": [
"govet",
"revive",
"goimports",
"misspell",
"ineffassign",
"gofmt"
]
},
"linters-settings": {
"govet": {
"check-shadowing": false
},
"gofmt": {
"simplify": false
}
},
"run": {
"skip-dirs": [
"vendor",
"tests",
"pkg/client",
"pkg/generated"
],
"tests": false,
"timeout": "10m"
},
"issues": {
"exclude-rules": [
{
"linters": "govet",
"text": "^(nilness|structtag)"
},
{
"linters": "revive",
"text": "should have comment"
},
{
"linters": "revive",
"text": "should be of the form"
},
{
"linters": "typecheck",
"text": "imported but not used as apierrors"
}
]
}
}

@ -1,11 +1,44 @@
# Changelog
## [v1.27.0](https://github.com/drone/go-scm/tree/v1.27.0) (2022-07-18)
## [1.28.0](https://github.com/drone/go-scm/tree/1.28.0) (2022-11-22)
[Full Changelog](https://github.com/drone/go-scm/compare/v1.27.0...1.28.0)
**Implemented enhancements:**
- Add Actor UUID to push and branch create events for Bitbucket [\#230](https://github.com/drone/go-scm/pull/230) ([rutvijmehta-harness](https://github.com/rutvijmehta-harness))
- Add support for Github release webhook [\#229](https://github.com/drone/go-scm/pull/229) ([vcalasansh](https://github.com/vcalasansh))
- Add Actor UUID to Sender for all webhooks responses for Bitbucket [\#227](https://github.com/drone/go-scm/pull/227) ([rutvijmehta-harness](https://github.com/rutvijmehta-harness))
- added date info for commits in push hook [\#223](https://github.com/drone/go-scm/pull/223) ([raghavharness](https://github.com/raghavharness))
- Added support for branch in list commits bb onprem API [\#215](https://github.com/drone/go-scm/pull/215) ([mohitg0795](https://github.com/mohitg0795))
- \[PL-26239\]: added api to list installation for github app [\#213](https://github.com/drone/go-scm/pull/213) ([bhavya181](https://github.com/bhavya181))
**Fixed bugs:**
- fixbug: gitee convert repository [\#226](https://github.com/drone/go-scm/pull/226) ([kit101](https://github.com/kit101))
- Bitbucket sha fix for merged pr [\#225](https://github.com/drone/go-scm/pull/225) ([raghavharness](https://github.com/raghavharness))
- decoding projectName for azure repo [\#224](https://github.com/drone/go-scm/pull/224) ([raghavharness](https://github.com/raghavharness))
- added omitempty annotation for secret [\#221](https://github.com/drone/go-scm/pull/221) ([raghavharness](https://github.com/raghavharness))
- \[PL-26239\]: fix for list response [\#218](https://github.com/drone/go-scm/pull/218) ([bhavya181](https://github.com/bhavya181))
**Closed issues:**
- gitlab: force\_remove\_source\_branch type is inconsistent [\#228](https://github.com/drone/go-scm/issues/228)
- gitee: When the name and path are inconsistent, got 404 error [\#217](https://github.com/drone/go-scm/issues/217)
- file naming conventions [\#208](https://github.com/drone/go-scm/issues/208)
- Support for Azure Devops git repos? [\#53](https://github.com/drone/go-scm/issues/53)
**Merged pull requests:**
- \(maint\) fixing naming and add more go best practice [\#211](https://github.com/drone/go-scm/pull/211) ([tphoney](https://github.com/tphoney))
## [v1.27.0](https://github.com/drone/go-scm/tree/v1.27.0) (2022-07-19)
[Full Changelog](https://github.com/drone/go-scm/compare/v1.26.0...v1.27.0)
**Merged pull requests:**
- Update scm version 1.27.0 [\#206](https://github.com/drone/go-scm/pull/206) ([raghavharness](https://github.com/raghavharness))
- Using resource version 2.0 for Azure [\#205](https://github.com/drone/go-scm/pull/205) ([raghavharness](https://github.com/raghavharness))
## [v1.26.0](https://github.com/drone/go-scm/tree/v1.26.0) (2022-07-01)

@ -42,6 +42,11 @@ const (
ActionMerge
// issue comment
ActionEdit
// release
ActionPublish
ActionUnpublish
ActionPrerelease
ActionRelease
)
// String returns the string representation of Action.
@ -67,8 +72,14 @@ func (a Action) String() (s string) {
return "synchronized"
case ActionMerge:
return "merged"
case ActionEdit:
return "edited"
case ActionPublish:
return "published"
case ActionUnpublish:
return "unpublished"
case ActionPrerelease:
return "prereleased"
case ActionRelease:
return "released"
default:
return
}
@ -108,6 +119,14 @@ func (a *Action) UnmarshalJSON(data []byte) error {
*a = ActionMerge
case "edited":
*a = ActionEdit
case "published":
*a = ActionPublish
case "unpublished":
*a = ActionUnpublish
case "prereleased":
*a = ActionPrerelease
case "released":
*a = ActionRelease
}
return nil
}

@ -16,7 +16,7 @@ type gitService struct {
client *wrapper
}
func (s *gitService) CreateBranch(ctx context.Context, repo string, params *scm.CreateBranch) (*scm.Response, error) {
func (s *gitService) CreateBranch(ctx context.Context, repo string, params *scm.ReferenceInput) (*scm.Response, error) {
// https://docs.microsoft.com/en-us/rest/api/azure/devops/git/refs/update-refs?view=azure-devops-rest-6.0
if s.client.project == "" {
return nil, ProjectRequiredError()

@ -53,7 +53,7 @@ func TestGitCreateBranch(t *testing.T) {
Type("application/json").
File("testdata/branch_create.json")
params := &scm.CreateBranch{
params := &scm.ReferenceInput{
Name: "test_branch",
Sha: "312797ba52425353dec56871a255e2a36fc96344",
}

@ -54,7 +54,7 @@ func TestCreateBranch(t *testing.T) {
if commitErr != nil {
t.Errorf("we got an error %v", commitErr)
}
input := &scm.CreateBranch{
input := &scm.ReferenceInput{
Name: "test_branch",
Sha: currentCommit,
}

@ -7,6 +7,7 @@ package azure
import (
"context"
"fmt"
"net/url"
"github.com/drone/go-scm/scm"
)
@ -146,6 +147,11 @@ func (s *RepositoryService) DeleteHook(ctx context.Context, repo, id string) (*s
// helper function to return the projectID from the project name
func (s *RepositoryService) getProjectIDFromProjectName(ctx context.Context, projectName string) (string, error) {
// https://docs.microsoft.com/en-us/rest/api/azure/devops/core/projects/list?view=azure-devops-rest-6.0
projectName, err := url.PathUnescape(projectName)
if err != nil {
return "", fmt.Errorf("unable to unscape project: %s", projectName)
}
endpoint := fmt.Sprintf("%s/_apis/projects?api-version=6.0", s.client.owner)
type projects struct {
Count int64 `json:"count"`

@ -16,7 +16,7 @@ type gitService struct {
client *wrapper
}
func (s *gitService) CreateBranch(ctx context.Context, repo string, params *scm.CreateBranch) (*scm.Response, error) {
func (s *gitService) CreateBranch(ctx context.Context, repo string, params *scm.ReferenceInput) (*scm.Response, error) {
path := fmt.Sprintf("2.0/repositories/%s/refs/branches", repo)
in := &createBranch{
Name: params.Name,

@ -81,7 +81,7 @@ func TestGitCreateBranch(t *testing.T) {
Type("application/json").
File("testdata/branch_create.json")
params := &scm.CreateBranch{
params := &scm.ReferenceInput{
Name: "yooo",
Sha: "2e684d13a43afd86cb48ea36d9f40f43e791fae9",
}

@ -108,6 +108,10 @@ type pr struct {
HTML string `json:"html"`
Type string `json:"type"`
} `json:"summary"`
MergeCommit struct {
Type string `json:"type"`
Hash string `json:"hash"`
} `json:"merge_commit"`
Source reference `json:"source"`
State string `json:"state"`
Author user `json:"author"`
@ -149,6 +153,7 @@ func convertPullRequest(from *pr) *scm.PullRequest {
Title: from.Title,
Body: from.Description,
Sha: from.Source.Commit.Hash,
Merge: from.MergeCommit.Hash,
Source: from.Source.Branch.Name,
Target: from.Destination.Branch.Name,
Fork: from.Source.Repository.FullName,

@ -35,6 +35,7 @@
"Updated": "2018-07-02T21:51:39.532546Z"
},
"Sender": {
"ID": "{87bb15eb-47c1-49b3-9f16-ca824a2979a4}",
"Login": "brydzewski",
"Name": "Brad Rydzewski",
"Email": "",

@ -35,6 +35,7 @@
"Updated": "2018-07-03T01:44:00.030575Z"
},
"Sender": {
"ID": "{87bb15eb-47c1-49b3-9f16-ca824a2979a4}",
"Login": "brydzewski",
"Name": "Brad Rydzewski",
"Email": "",

@ -18,6 +18,7 @@
"Title": "Awesome new feature",
"Body": "made some changes",
"Sha": "0704fc5beccc",
"Merge": "4f8f6de9d0ff",
"Ref": "refs/pull-requests/1/from",
"Source": "develop",
"Target": "master",
@ -35,6 +36,7 @@
"Updated": "2018-07-03T01:28:05.903251Z"
},
"Sender": {
"ID": "{87bb15eb-47c1-49b3-9f16-ca824a2979a4}",
"Login": "brydzewski",
"Name": "Brad Rydzewski",
"Email": "",

@ -35,6 +35,7 @@
"Updated": "2018-07-02T21:54:34.210775Z"
},
"Sender": {
"ID": "{87bb15eb-47c1-49b3-9f16-ca824a2979a4}",
"Login": "brydzewski",
"Name": "Brad Rydzewski",
"Email": "",

@ -56,6 +56,7 @@
}
],
"Sender": {
"ID": "{87bb15eb-47c1-49b3-9f16-ca824a2979a4}",
"Login": "brydzewski",
"Name": "Brad Rydzewski",
"Email": "",

@ -74,6 +74,7 @@
}
],
"Sender": {
"ID": "{87bb15eb-47c1-49b3-9f16-ca824a2979a4}",
"Login": "brydzewski",
"Name": "Brad Rydzewski",
"Email": "",

@ -18,6 +18,7 @@
},
"Action": "deleted",
"Sender": {
"ID": "{87bb15eb-47c1-49b3-9f16-ca824a2979a4}",
"Login": "brydzewski",
"Name": "Brad Rydzewski",
"Email": "",

@ -34,6 +34,7 @@
"Link": "https://bitbucket.org/brydzewski/foo/commits/141977fedf5cf35aa290ac87d4b5177ac4cd9de1"
},
"Sender": {
"ID": "{87bb15eb-47c1-49b3-9f16-ca824a2979a4}",
"Login": "brydzewski",
"Name": "Brad Rydzewski",
"Email": "",

@ -18,6 +18,7 @@
},
"Action": "deleted",
"Sender": {
"ID": "{87bb15eb-47c1-49b3-9f16-ca824a2979a4}",
"Login": "brydzewski",
"Name": "Brad Rydzewski",
"Email": "",

@ -657,6 +657,7 @@ func convertPushHook(src *pushHook) *scm.PushHook {
Link: src.Repository.Links.HTML.Href,
},
Sender: scm.User{
ID: src.Actor.UUID,
Login: src.Actor.Username,
Name: src.Actor.DisplayName,
Avatar: src.Actor.Links.Avatar.Href,
@ -689,6 +690,7 @@ func convertBranchCreateHook(src *pushHook) *scm.BranchHook {
Link: src.Repository.Links.HTML.Href,
},
Sender: scm.User{
ID: src.Actor.UUID,
Login: src.Actor.Username,
Name: src.Actor.DisplayName,
Avatar: src.Actor.Links.Avatar.Href,
@ -716,6 +718,7 @@ func convertBranchDeleteHook(src *pushHook) *scm.BranchHook {
Link: src.Repository.Links.HTML.Href,
},
Sender: scm.User{
ID: src.Actor.UUID,
Login: src.Actor.Username,
Name: src.Actor.DisplayName,
Avatar: src.Actor.Links.Avatar.Href,
@ -743,6 +746,7 @@ func convertTagCreateHook(src *pushHook) *scm.TagHook {
Link: src.Repository.Links.HTML.Href,
},
Sender: scm.User{
ID: src.Actor.UUID,
Login: src.Actor.Username,
Name: src.Actor.DisplayName,
Avatar: src.Actor.Links.Avatar.Href,
@ -770,6 +774,7 @@ func convertTagDeleteHook(src *pushHook) *scm.TagHook {
Link: src.Repository.Links.HTML.Href,
},
Sender: scm.User{
ID: src.Actor.UUID,
Login: src.Actor.Username,
Name: src.Actor.DisplayName,
Avatar: src.Actor.Links.Avatar.Href,
@ -790,6 +795,7 @@ func convertPullRequestHook(src *webhook) *scm.PullRequestHook {
Title: src.PullRequest.Title,
Body: src.PullRequest.Description,
Sha: src.PullRequest.Source.Commit.Hash,
Merge: src.PullRequest.MergeCommit.Hash,
Ref: fmt.Sprintf("refs/pull-requests/%d/from", src.PullRequest.ID),
Source: src.PullRequest.Source.Branch.Name,
Target: src.PullRequest.Destination.Branch.Name,
@ -815,6 +821,7 @@ func convertPullRequestHook(src *webhook) *scm.PullRequestHook {
Link: src.Repository.Links.HTML.Href,
},
Sender: scm.User{
ID: src.Actor.UUID,
Login: src.Actor.Username,
Name: src.Actor.DisplayName,
Avatar: src.Actor.Links.Avatar.Href,

@ -17,7 +17,7 @@ type gitService struct {
client *wrapper
}
func (s *gitService) CreateBranch(ctx context.Context, repo string, params *scm.CreateBranch) (*scm.Response, error) {
func (s *gitService) CreateBranch(ctx context.Context, repo string, params *scm.ReferenceInput) (*scm.Response, error) {
return nil, scm.ErrNotSupported
}

@ -16,7 +16,7 @@ type gitService struct {
client *wrapper
}
func (s *gitService) CreateBranch(ctx context.Context, repo string, params *scm.CreateBranch) (*scm.Response, error) {
func (s *gitService) CreateBranch(ctx context.Context, repo string, params *scm.ReferenceInput) (*scm.Response, error) {
path := fmt.Sprintf("repos/%s/branches", repo)
in := &branchCreate{
Refs: params.Sha,

@ -26,7 +26,7 @@ func TestGitCreateBranch(t *testing.T) {
SetHeaders(mockHeaders)
client := NewDefault()
input := scm.CreateBranch{
input := scm.ReferenceInput{
Name: "create-by-api",
Sha: "b72a4c4a2d838d96a545a42d41d7776ae5566f4a",
}

@ -159,7 +159,7 @@ func convertRepositoryList(from []*repository) []*scm.Repository {
func convertRepository(from *repository) *scm.Repository {
return &scm.Repository{
ID: strconv.Itoa(from.ID),
Name: from.Name,
Name: from.Path,
Namespace: from.Namespace.Path,
Perm: &scm.Perm{
Push: from.Permission.Push,

@ -16,7 +16,7 @@ type gitService struct {
client *wrapper
}
func (s *gitService) CreateBranch(ctx context.Context, repo string, params *scm.CreateBranch) (*scm.Response, error) {
func (s *gitService) CreateBranch(ctx context.Context, repo string, params *scm.ReferenceInput) (*scm.Response, error) {
path := fmt.Sprintf("repos/%s/git/refs", repo)
in := &createBranch{
Ref: scm.ExpandRef(params.Name, "refs/heads"),

@ -116,7 +116,7 @@ func TestGitCreateBranch(t *testing.T) {
SetHeaders(mockHeaders).
File("testdata/branch_create.json")
params := &scm.CreateBranch{
params := &scm.ReferenceInput{
Name: "Hello",
Sha: "312797ba52425353dec56871a255e2a36fc96344",
}

@ -53,6 +53,11 @@ type hook struct {
} `json:"config"`
}
type repositoryList struct {
TotalCount int `json:"total_count"`
Repositories []*repository `json:"repositories"`
}
// RepositoryService implements the repository service for
// the GitHub driver.
type RepositoryService struct {
@ -105,6 +110,14 @@ func (s *RepositoryService) List(ctx context.Context, opts scm.ListOptions) ([]*
return convertRepositoryList(out), res, err
}
// List returns the github app installation repository list.
func (s *RepositoryService) ListByInstallation(ctx context.Context, opts scm.ListOptions) ([]*scm.Repository, *scm.Response, error) {
path := fmt.Sprintf("installation/repositories?%s", encodeListOptions(opts))
out := new(repositoryList)
res, err := s.client.do(ctx, "GET", path, nil, out)
return convertRepositoryList(out.Repositories), res, err
}
// ListHooks returns a list or repository hooks.
func (s *RepositoryService) ListHooks(ctx context.Context, repo string, opts scm.ListOptions) ([]*scm.Hook, *scm.Response, error) {
path := fmt.Sprintf("repos/%s/hooks?%s", repo, encodeListOptions(opts))

@ -131,6 +131,40 @@ func TestRepositoryList(t *testing.T) {
t.Run("Page", testPage(res))
}
func TestGithubAppInstallationList(t *testing.T) {
defer gock.Off()
gock.New("https://api.github.com").
Get("/installation/repositories").
MatchParam("page", "1").
MatchParam("per_page", "30").
Reply(200).
Type("application/json").
SetHeaders(mockHeaders).
SetHeaders(mockPageHeaders).
File("testdata/github_app_repos.json")
client := NewDefault()
got, res, err := client.Repositories.(*RepositoryService).ListByInstallation(context.Background(), scm.ListOptions{Page: 1, Size: 30})
if err != nil {
t.Error(err)
return
}
want := []*scm.Repository{}
raw, _ := ioutil.ReadFile("testdata/repos.json.golden")
_ = json.Unmarshal(raw, &want)
if diff := cmp.Diff(got, want); diff != "" {
t.Errorf("Unexpected Results")
t.Log(diff)
}
t.Run("Request", testRequest(res))
t.Run("Rate", testRate(res))
t.Run("Page", testPage(res))
}
func TestStatusList(t *testing.T) {
defer gock.Off()

@ -0,0 +1,115 @@
{
"total_count": 1,
"repositories": [
{
"id": 1296269,
"owner": {
"login": "octocat",
"id": 1,
"avatar_url": "https://github.com/images/error/octocat_happy.gif",
"gravatar_id": "",
"url": "https://api.github.com/users/octocat",
"html_url": "https://github.com/octocat",
"followers_url": "https://api.github.com/users/octocat/followers",
"following_url": "https://api.github.com/users/octocat/following{/other_user}",
"gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
"starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
"organizations_url": "https://api.github.com/users/octocat/orgs",
"repos_url": "https://api.github.com/users/octocat/repos",
"events_url": "https://api.github.com/users/octocat/events{/privacy}",
"received_events_url": "https://api.github.com/users/octocat/received_events",
"type": "User",
"site_admin": false
},
"name": "Hello-World",
"full_name": "octocat/Hello-World",
"description": "This your first repo!",
"private": true,
"fork": true,
"visibility": "public",
"url": "https://api.github.com/repos/octocat/Hello-World",
"html_url": "https://github.com/octocat/Hello-World",
"archive_url": "http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}",
"assignees_url": "http://api.github.com/repos/octocat/Hello-World/assignees{/user}",
"blobs_url": "http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}",
"branches_url": "http://api.github.com/repos/octocat/Hello-World/branches{/branch}",
"clone_url": "https://github.com/octocat/Hello-World.git",
"collaborators_url": "http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}",
"comments_url": "http://api.github.com/repos/octocat/Hello-World/comments{/number}",
"commits_url": "http://api.github.com/repos/octocat/Hello-World/commits{/sha}",
"compare_url": "http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}",
"contents_url": "http://api.github.com/repos/octocat/Hello-World/contents/{+path}",
"contributors_url": "http://api.github.com/repos/octocat/Hello-World/contributors",
"deployments_url": "http://api.github.com/repos/octocat/Hello-World/deployments",
"downloads_url": "http://api.github.com/repos/octocat/Hello-World/downloads",
"events_url": "http://api.github.com/repos/octocat/Hello-World/events",
"forks_url": "http://api.github.com/repos/octocat/Hello-World/forks",
"git_commits_url": "http://api.github.com/repos/octocat/Hello-World/git/commits{/sha}",
"git_refs_url": "http://api.github.com/repos/octocat/Hello-World/git/refs{/sha}",
"git_tags_url": "http://api.github.com/repos/octocat/Hello-World/git/tags{/sha}",
"git_url": "git:github.com/octocat/Hello-World.git",
"hooks_url": "http://api.github.com/repos/octocat/Hello-World/hooks",
"issue_comment_url": "http://api.github.com/repos/octocat/Hello-World/issues/comments{/number}",
"issue_events_url": "http://api.github.com/repos/octocat/Hello-World/issues/events{/number}",
"issues_url": "http://api.github.com/repos/octocat/Hello-World/issues{/number}",
"keys_url": "http://api.github.com/repos/octocat/Hello-World/keys{/key_id}",
"labels_url": "http://api.github.com/repos/octocat/Hello-World/labels{/name}",
"languages_url": "http://api.github.com/repos/octocat/Hello-World/languages",
"merges_url": "http://api.github.com/repos/octocat/Hello-World/merges",
"milestones_url": "http://api.github.com/repos/octocat/Hello-World/milestones{/number}",
"mirror_url": "git:git.example.com/octocat/Hello-World",
"notifications_url": "http://api.github.com/repos/octocat/Hello-World/notifications{?since, all, participating}",
"pulls_url": "http://api.github.com/repos/octocat/Hello-World/pulls{/number}",
"releases_url": "http://api.github.com/repos/octocat/Hello-World/releases{/id}",
"ssh_url": "git@github.com:octocat/Hello-World.git",
"stargazers_url": "http://api.github.com/repos/octocat/Hello-World/stargazers",
"statuses_url": "http://api.github.com/repos/octocat/Hello-World/statuses/{sha}",
"subscribers_url": "http://api.github.com/repos/octocat/Hello-World/subscribers",
"subscription_url": "http://api.github.com/repos/octocat/Hello-World/subscription",
"svn_url": "https://svn.github.com/octocat/Hello-World",
"tags_url": "http://api.github.com/repos/octocat/Hello-World/tags",
"teams_url": "http://api.github.com/repos/octocat/Hello-World/teams",
"trees_url": "http://api.github.com/repos/octocat/Hello-World/git/trees{/sha}",
"homepage": "https://github.com",
"language": null,
"forks_count": 9,
"stargazers_count": 80,
"watchers_count": 80,
"size": 108,
"default_branch": "master",
"open_issues_count": 0,
"topics": [
"octocat",
"atom",
"electron",
"API"
],
"has_issues": true,
"has_wiki": true,
"has_pages": false,
"has_downloads": true,
"archived": false,
"pushed_at": "2011-01-26T19:06:43Z",
"created_at": "2011-01-26T19:01:12Z",
"updated_at": "2011-01-26T19:14:43Z",
"permissions": {
"admin": true,
"push": true,
"pull": true
},
"allow_rebase_merge": true,
"allow_squash_merge": true,
"allow_merge_commit": true,
"subscribers_count": 42,
"network_count": 0,
"license": {
"key": "mit",
"name": "MIT License",
"spdx_id": "MIT",
"url": "https://api.github.com/licenses/mit",
"html_url": "http://choosealicense.com/licenses/mit/"
}
}
]
}

@ -0,0 +1,164 @@
{
"action": "created",
"release": {
"url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/releases/81372309",
"assets_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/releases/81372309/assets",
"upload_url": "https://uploads.github.com/repos/vcalasansh/harness-ngtriggers-test/releases/81372309/assets{?name,label}",
"html_url": "https://github.com/vcalasansh/harness-ngtriggers-test/releases/tag/v1.0.0",
"id": 81372309,
"author": {
"login": "vcalasansh",
"id": 109106581,
"node_id": "U_kgDOBoDVlQ",
"avatar_url": "https://avatars.githubusercontent.com/u/109106581?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/vcalasansh",
"html_url": "https://github.com/vcalasansh",
"followers_url": "https://api.github.com/users/vcalasansh/followers",
"following_url": "https://api.github.com/users/vcalasansh/following{/other_user}",
"gists_url": "https://api.github.com/users/vcalasansh/gists{/gist_id}",
"starred_url": "https://api.github.com/users/vcalasansh/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/vcalasansh/subscriptions",
"organizations_url": "https://api.github.com/users/vcalasansh/orgs",
"repos_url": "https://api.github.com/users/vcalasansh/repos",
"events_url": "https://api.github.com/users/vcalasansh/events{/privacy}",
"received_events_url": "https://api.github.com/users/vcalasansh/received_events",
"type": "User",
"site_admin": false
},
"node_id": "RE_kwDOH5utuc4E2aSV",
"tag_name": "v1.0.0",
"target_commitish": "test-branch",
"name": "New release!",
"draft": false,
"prerelease": false,
"created_at": "2022-10-28T13:03:11Z",
"published_at": "2022-10-28T16:36:52Z",
"assets": [
],
"tarball_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/tarball/v1.0.0",
"zipball_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/zipball/v1.0.0",
"body": "New release!"
},
"repository": {
"id": 530296249,
"node_id": "R_kgDOH5utuQ",
"name": "harness-ngtriggers-test",
"full_name": "vcalasansh/harness-ngtriggers-test",
"private": true,
"owner": {
"login": "vcalasansh",
"id": 109106581,
"node_id": "U_kgDOBoDVlQ",
"avatar_url": "https://avatars.githubusercontent.com/u/109106581?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/vcalasansh",
"html_url": "https://github.com/vcalasansh",
"followers_url": "https://api.github.com/users/vcalasansh/followers",
"following_url": "https://api.github.com/users/vcalasansh/following{/other_user}",
"gists_url": "https://api.github.com/users/vcalasansh/gists{/gist_id}",
"starred_url": "https://api.github.com/users/vcalasansh/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/vcalasansh/subscriptions",
"organizations_url": "https://api.github.com/users/vcalasansh/orgs",
"repos_url": "https://api.github.com/users/vcalasansh/repos",
"events_url": "https://api.github.com/users/vcalasansh/events{/privacy}",
"received_events_url": "https://api.github.com/users/vcalasansh/received_events",
"type": "User",
"site_admin": false
},
"html_url": "https://github.com/vcalasansh/harness-ngtriggers-test",
"description": null,
"fork": false,
"url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test",
"forks_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/forks",
"keys_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/keys{/key_id}",
"collaborators_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/collaborators{/collaborator}",
"teams_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/teams",
"hooks_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/hooks",
"issue_events_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/issues/events{/number}",
"events_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/events",
"assignees_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/assignees{/user}",
"branches_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/branches{/branch}",
"tags_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/tags",
"blobs_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/git/blobs{/sha}",
"git_tags_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/git/tags{/sha}",
"git_refs_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/git/refs{/sha}",
"trees_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/git/trees{/sha}",
"statuses_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/statuses/{sha}",
"languages_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/languages",
"stargazers_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/stargazers",
"contributors_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/contributors",
"subscribers_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/subscribers",
"subscription_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/subscription",
"commits_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/commits{/sha}",
"git_commits_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/git/commits{/sha}",
"comments_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/comments{/number}",
"issue_comment_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/issues/comments{/number}",
"contents_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/contents/{+path}",
"compare_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/compare/{base}...{head}",
"merges_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/merges",
"archive_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/{archive_format}{/ref}",
"downloads_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/downloads",
"issues_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/issues{/number}",
"pulls_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/pulls{/number}",
"milestones_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/milestones{/number}",
"notifications_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/notifications{?since,all,participating}",
"labels_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/labels{/name}",
"releases_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/releases{/id}",
"deployments_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/deployments",
"created_at": "2022-08-29T16:12:07Z",
"updated_at": "2022-08-29T16:12:07Z",
"pushed_at": "2022-10-28T16:36:27Z",
"git_url": "git://github.com/vcalasansh/harness-ngtriggers-test.git",
"ssh_url": "git@github.com:vcalasansh/harness-ngtriggers-test.git",
"clone_url": "https://github.com/vcalasansh/harness-ngtriggers-test.git",
"svn_url": "https://github.com/vcalasansh/harness-ngtriggers-test",
"homepage": null,
"size": 11,
"stargazers_count": 0,
"watchers_count": 0,
"language": null,
"has_issues": true,
"has_projects": true,
"has_downloads": true,
"has_wiki": true,
"has_pages": false,
"forks_count": 0,
"mirror_url": null,
"archived": false,
"disabled": false,
"open_issues_count": 0,
"license": null,
"allow_forking": true,
"is_template": false,
"web_commit_signoff_required": false,
"topics": [
],
"forks": 0,
"open_issues": 0,
"watchers": 0,
"default_branch": "test-branch"
},
"sender": {
"login": "vcalasansh",
"id": 109106581,
"node_id": "U_kgDOBoDVlQ",
"avatar_url": "https://avatars.githubusercontent.com/u/109106581?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/vcalasansh",
"html_url": "https://github.com/vcalasansh",
"followers_url": "https://api.github.com/users/vcalasansh/followers",
"following_url": "https://api.github.com/users/vcalasansh/following{/other_user}",
"gists_url": "https://api.github.com/users/vcalasansh/gists{/gist_id}",
"starred_url": "https://api.github.com/users/vcalasansh/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/vcalasansh/subscriptions",
"organizations_url": "https://api.github.com/users/vcalasansh/orgs",
"repos_url": "https://api.github.com/users/vcalasansh/repos",
"events_url": "https://api.github.com/users/vcalasansh/events{/privacy}",
"received_events_url": "https://api.github.com/users/vcalasansh/received_events",
"type": "User",
"site_admin": false
}
}

@ -0,0 +1,34 @@
{
"Action": "created",
"Release": {
"ID": 81372309,
"Title": "New release!",
"Description": "New release!",
"Link": "https://github.com/vcalasansh/harness-ngtriggers-test/releases/tag/v1.0.0",
"Tag": "v1.0.0",
"Commitish": "test-branch",
"Draft": false,
"Prerelease": false,
"Created": "2022-10-28T13:03:11Z",
"Published": "2022-10-28T16:36:52Z"
},
"Repo": {
"ID": "530296249",
"Namespace": "vcalasansh",
"Name": "harness-ngtriggers-test",
"Perm": null,
"Branch": "test-branch",
"Private": true,
"Clone": "https://github.com/vcalasansh/harness-ngtriggers-test.git",
"CloneSSH": "git@github.com:vcalasansh/harness-ngtriggers-test.git",
"Link": "https://github.com/vcalasansh/harness-ngtriggers-test",
"Created": "0001-01-01T00:00:00Z",
"Updated": "0001-01-01T00:00:00Z"
},
"Sender": {
"Login": "vcalasansh",
"Name": "",
"Email": "",
"Avatar": "https://avatars.githubusercontent.com/u/109106581?v=4"
}
}

@ -0,0 +1,164 @@
{
"action": "deleted",
"release": {
"url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/releases/81372309",
"assets_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/releases/81372309/assets",
"upload_url": "https://uploads.github.com/repos/vcalasansh/harness-ngtriggers-test/releases/81372309/assets{?name,label}",
"html_url": "https://github.com/vcalasansh/harness-ngtriggers-test/releases/tag/v1.0.0",
"id": 81372309,
"author": {
"login": "vcalasansh",
"id": 109106581,
"node_id": "U_kgDOBoDVlQ",
"avatar_url": "https://avatars.githubusercontent.com/u/109106581?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/vcalasansh",
"html_url": "https://github.com/vcalasansh",
"followers_url": "https://api.github.com/users/vcalasansh/followers",
"following_url": "https://api.github.com/users/vcalasansh/following{/other_user}",
"gists_url": "https://api.github.com/users/vcalasansh/gists{/gist_id}",
"starred_url": "https://api.github.com/users/vcalasansh/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/vcalasansh/subscriptions",
"organizations_url": "https://api.github.com/users/vcalasansh/orgs",
"repos_url": "https://api.github.com/users/vcalasansh/repos",
"events_url": "https://api.github.com/users/vcalasansh/events{/privacy}",
"received_events_url": "https://api.github.com/users/vcalasansh/received_events",
"type": "User",
"site_admin": false
},
"node_id": "RE_kwDOH5utuc4E2aSV",
"tag_name": "v1.0.0",
"target_commitish": "test-branch",
"name": "New release!",
"draft": false,
"prerelease": false,
"created_at": "2022-10-28T13:03:11Z",
"published_at": "2022-10-28T16:36:52Z",
"assets": [
],
"tarball_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/tarball/v1.0.0",
"zipball_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/zipball/v1.0.0",
"body": "New release!"
},
"repository": {
"id": 530296249,
"node_id": "R_kgDOH5utuQ",
"name": "harness-ngtriggers-test",
"full_name": "vcalasansh/harness-ngtriggers-test",
"private": true,
"owner": {
"login": "vcalasansh",
"id": 109106581,
"node_id": "U_kgDOBoDVlQ",
"avatar_url": "https://avatars.githubusercontent.com/u/109106581?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/vcalasansh",
"html_url": "https://github.com/vcalasansh",
"followers_url": "https://api.github.com/users/vcalasansh/followers",
"following_url": "https://api.github.com/users/vcalasansh/following{/other_user}",
"gists_url": "https://api.github.com/users/vcalasansh/gists{/gist_id}",
"starred_url": "https://api.github.com/users/vcalasansh/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/vcalasansh/subscriptions",
"organizations_url": "https://api.github.com/users/vcalasansh/orgs",
"repos_url": "https://api.github.com/users/vcalasansh/repos",
"events_url": "https://api.github.com/users/vcalasansh/events{/privacy}",
"received_events_url": "https://api.github.com/users/vcalasansh/received_events",
"type": "User",
"site_admin": false
},
"html_url": "https://github.com/vcalasansh/harness-ngtriggers-test",
"description": null,
"fork": false,
"url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test",
"forks_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/forks",
"keys_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/keys{/key_id}",
"collaborators_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/collaborators{/collaborator}",
"teams_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/teams",
"hooks_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/hooks",
"issue_events_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/issues/events{/number}",
"events_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/events",
"assignees_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/assignees{/user}",
"branches_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/branches{/branch}",
"tags_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/tags",
"blobs_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/git/blobs{/sha}",
"git_tags_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/git/tags{/sha}",
"git_refs_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/git/refs{/sha}",
"trees_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/git/trees{/sha}",
"statuses_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/statuses/{sha}",
"languages_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/languages",
"stargazers_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/stargazers",
"contributors_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/contributors",
"subscribers_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/subscribers",
"subscription_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/subscription",
"commits_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/commits{/sha}",
"git_commits_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/git/commits{/sha}",
"comments_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/comments{/number}",
"issue_comment_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/issues/comments{/number}",
"contents_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/contents/{+path}",
"compare_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/compare/{base}...{head}",
"merges_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/merges",
"archive_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/{archive_format}{/ref}",
"downloads_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/downloads",
"issues_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/issues{/number}",
"pulls_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/pulls{/number}",
"milestones_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/milestones{/number}",
"notifications_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/notifications{?since,all,participating}",
"labels_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/labels{/name}",
"releases_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/releases{/id}",
"deployments_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/deployments",
"created_at": "2022-08-29T16:12:07Z",
"updated_at": "2022-08-29T16:12:07Z",
"pushed_at": "2022-10-28T16:36:27Z",
"git_url": "git://github.com/vcalasansh/harness-ngtriggers-test.git",
"ssh_url": "git@github.com:vcalasansh/harness-ngtriggers-test.git",
"clone_url": "https://github.com/vcalasansh/harness-ngtriggers-test.git",
"svn_url": "https://github.com/vcalasansh/harness-ngtriggers-test",
"homepage": null,
"size": 11,
"stargazers_count": 0,
"watchers_count": 0,
"language": null,
"has_issues": true,
"has_projects": true,
"has_downloads": true,
"has_wiki": true,
"has_pages": false,
"forks_count": 0,
"mirror_url": null,
"archived": false,
"disabled": false,
"open_issues_count": 0,
"license": null,
"allow_forking": true,
"is_template": false,
"web_commit_signoff_required": false,
"topics": [
],
"forks": 0,
"open_issues": 0,
"watchers": 0,
"default_branch": "test-branch"
},
"sender": {
"login": "vcalasansh",
"id": 109106581,
"node_id": "U_kgDOBoDVlQ",
"avatar_url": "https://avatars.githubusercontent.com/u/109106581?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/vcalasansh",
"html_url": "https://github.com/vcalasansh",
"followers_url": "https://api.github.com/users/vcalasansh/followers",
"following_url": "https://api.github.com/users/vcalasansh/following{/other_user}",
"gists_url": "https://api.github.com/users/vcalasansh/gists{/gist_id}",
"starred_url": "https://api.github.com/users/vcalasansh/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/vcalasansh/subscriptions",
"organizations_url": "https://api.github.com/users/vcalasansh/orgs",
"repos_url": "https://api.github.com/users/vcalasansh/repos",
"events_url": "https://api.github.com/users/vcalasansh/events{/privacy}",
"received_events_url": "https://api.github.com/users/vcalasansh/received_events",
"type": "User",
"site_admin": false
}
}

@ -0,0 +1,34 @@
{
"Action": "deleted",
"Release": {
"ID": 81372309,
"Title": "New release!",
"Description": "New release!",
"Link": "https://github.com/vcalasansh/harness-ngtriggers-test/releases/tag/v1.0.0",
"Tag": "v1.0.0",
"Commitish": "test-branch",
"Draft": false,
"Prerelease": false,
"Created": "2022-10-28T13:03:11Z",
"Published": "2022-10-28T16:36:52Z"
},
"Repo": {
"ID": "530296249",
"Namespace": "vcalasansh",
"Name": "harness-ngtriggers-test",
"Perm": null,
"Branch": "test-branch",
"Private": true,
"Clone": "https://github.com/vcalasansh/harness-ngtriggers-test.git",
"CloneSSH": "git@github.com:vcalasansh/harness-ngtriggers-test.git",
"Link": "https://github.com/vcalasansh/harness-ngtriggers-test",
"Created": "0001-01-01T00:00:00Z",
"Updated": "0001-01-01T00:00:00Z"
},
"Sender": {
"Login": "vcalasansh",
"Name": "",
"Email": "",
"Avatar": "https://avatars.githubusercontent.com/u/109106581?v=4"
}
}

@ -0,0 +1,164 @@
{
"action": "edited",
"release": {
"url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/releases/81372309",
"assets_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/releases/81372309/assets",
"upload_url": "https://uploads.github.com/repos/vcalasansh/harness-ngtriggers-test/releases/81372309/assets{?name,label}",
"html_url": "https://github.com/vcalasansh/harness-ngtriggers-test/releases/tag/v1.0.0",
"id": 81372309,
"author": {
"login": "vcalasansh",
"id": 109106581,
"node_id": "U_kgDOBoDVlQ",
"avatar_url": "https://avatars.githubusercontent.com/u/109106581?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/vcalasansh",
"html_url": "https://github.com/vcalasansh",
"followers_url": "https://api.github.com/users/vcalasansh/followers",
"following_url": "https://api.github.com/users/vcalasansh/following{/other_user}",
"gists_url": "https://api.github.com/users/vcalasansh/gists{/gist_id}",
"starred_url": "https://api.github.com/users/vcalasansh/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/vcalasansh/subscriptions",
"organizations_url": "https://api.github.com/users/vcalasansh/orgs",
"repos_url": "https://api.github.com/users/vcalasansh/repos",
"events_url": "https://api.github.com/users/vcalasansh/events{/privacy}",
"received_events_url": "https://api.github.com/users/vcalasansh/received_events",
"type": "User",
"site_admin": false
},
"node_id": "RE_kwDOH5utuc4E2aSV",
"tag_name": "v1.0.0",
"target_commitish": "test-branch",
"name": "New release!",
"draft": false,
"prerelease": false,
"created_at": "2022-10-28T13:03:11Z",
"published_at": "2022-10-28T16:36:52Z",
"assets": [
],
"tarball_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/tarball/v1.0.0",
"zipball_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/zipball/v1.0.0",
"body": "New release!"
},
"repository": {
"id": 530296249,
"node_id": "R_kgDOH5utuQ",
"name": "harness-ngtriggers-test",
"full_name": "vcalasansh/harness-ngtriggers-test",
"private": true,
"owner": {
"login": "vcalasansh",
"id": 109106581,
"node_id": "U_kgDOBoDVlQ",
"avatar_url": "https://avatars.githubusercontent.com/u/109106581?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/vcalasansh",
"html_url": "https://github.com/vcalasansh",
"followers_url": "https://api.github.com/users/vcalasansh/followers",
"following_url": "https://api.github.com/users/vcalasansh/following{/other_user}",
"gists_url": "https://api.github.com/users/vcalasansh/gists{/gist_id}",
"starred_url": "https://api.github.com/users/vcalasansh/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/vcalasansh/subscriptions",
"organizations_url": "https://api.github.com/users/vcalasansh/orgs",
"repos_url": "https://api.github.com/users/vcalasansh/repos",
"events_url": "https://api.github.com/users/vcalasansh/events{/privacy}",
"received_events_url": "https://api.github.com/users/vcalasansh/received_events",
"type": "User",
"site_admin": false
},
"html_url": "https://github.com/vcalasansh/harness-ngtriggers-test",
"description": null,
"fork": false,
"url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test",
"forks_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/forks",
"keys_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/keys{/key_id}",
"collaborators_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/collaborators{/collaborator}",
"teams_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/teams",
"hooks_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/hooks",
"issue_events_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/issues/events{/number}",
"events_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/events",
"assignees_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/assignees{/user}",
"branches_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/branches{/branch}",
"tags_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/tags",
"blobs_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/git/blobs{/sha}",
"git_tags_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/git/tags{/sha}",
"git_refs_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/git/refs{/sha}",
"trees_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/git/trees{/sha}",
"statuses_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/statuses/{sha}",
"languages_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/languages",
"stargazers_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/stargazers",
"contributors_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/contributors",
"subscribers_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/subscribers",
"subscription_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/subscription",
"commits_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/commits{/sha}",
"git_commits_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/git/commits{/sha}",
"comments_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/comments{/number}",
"issue_comment_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/issues/comments{/number}",
"contents_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/contents/{+path}",
"compare_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/compare/{base}...{head}",
"merges_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/merges",
"archive_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/{archive_format}{/ref}",
"downloads_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/downloads",
"issues_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/issues{/number}",
"pulls_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/pulls{/number}",
"milestones_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/milestones{/number}",
"notifications_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/notifications{?since,all,participating}",
"labels_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/labels{/name}",
"releases_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/releases{/id}",
"deployments_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/deployments",
"created_at": "2022-08-29T16:12:07Z",
"updated_at": "2022-08-29T16:12:07Z",
"pushed_at": "2022-10-28T16:36:27Z",
"git_url": "git://github.com/vcalasansh/harness-ngtriggers-test.git",
"ssh_url": "git@github.com:vcalasansh/harness-ngtriggers-test.git",
"clone_url": "https://github.com/vcalasansh/harness-ngtriggers-test.git",
"svn_url": "https://github.com/vcalasansh/harness-ngtriggers-test",
"homepage": null,
"size": 11,
"stargazers_count": 0,
"watchers_count": 0,
"language": null,
"has_issues": true,
"has_projects": true,
"has_downloads": true,
"has_wiki": true,
"has_pages": false,
"forks_count": 0,
"mirror_url": null,
"archived": false,
"disabled": false,
"open_issues_count": 0,
"license": null,
"allow_forking": true,
"is_template": false,
"web_commit_signoff_required": false,
"topics": [
],
"forks": 0,
"open_issues": 0,
"watchers": 0,
"default_branch": "test-branch"
},
"sender": {
"login": "vcalasansh",
"id": 109106581,
"node_id": "U_kgDOBoDVlQ",
"avatar_url": "https://avatars.githubusercontent.com/u/109106581?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/vcalasansh",
"html_url": "https://github.com/vcalasansh",
"followers_url": "https://api.github.com/users/vcalasansh/followers",
"following_url": "https://api.github.com/users/vcalasansh/following{/other_user}",
"gists_url": "https://api.github.com/users/vcalasansh/gists{/gist_id}",
"starred_url": "https://api.github.com/users/vcalasansh/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/vcalasansh/subscriptions",
"organizations_url": "https://api.github.com/users/vcalasansh/orgs",
"repos_url": "https://api.github.com/users/vcalasansh/repos",
"events_url": "https://api.github.com/users/vcalasansh/events{/privacy}",
"received_events_url": "https://api.github.com/users/vcalasansh/received_events",
"type": "User",
"site_admin": false
}
}

@ -0,0 +1,34 @@
{
"Action": "edited",
"Release": {
"ID": 81372309,
"Title": "New release!",
"Description": "New release!",
"Link": "https://github.com/vcalasansh/harness-ngtriggers-test/releases/tag/v1.0.0",
"Tag": "v1.0.0",
"Commitish": "test-branch",
"Draft": false,
"Prerelease": false,
"Created": "2022-10-28T13:03:11Z",
"Published": "2022-10-28T16:36:52Z"
},
"Repo": {
"ID": "530296249",
"Namespace": "vcalasansh",
"Name": "harness-ngtriggers-test",
"Perm": null,
"Branch": "test-branch",
"Private": true,
"Clone": "https://github.com/vcalasansh/harness-ngtriggers-test.git",
"CloneSSH": "git@github.com:vcalasansh/harness-ngtriggers-test.git",
"Link": "https://github.com/vcalasansh/harness-ngtriggers-test",
"Created": "0001-01-01T00:00:00Z",
"Updated": "0001-01-01T00:00:00Z"
},
"Sender": {
"Login": "vcalasansh",
"Name": "",
"Email": "",
"Avatar": "https://avatars.githubusercontent.com/u/109106581?v=4"
}
}

@ -0,0 +1,164 @@
{
"action": "prereleased",
"release": {
"url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/releases/81372309",
"assets_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/releases/81372309/assets",
"upload_url": "https://uploads.github.com/repos/vcalasansh/harness-ngtriggers-test/releases/81372309/assets{?name,label}",
"html_url": "https://github.com/vcalasansh/harness-ngtriggers-test/releases/tag/v1.0.0",
"id": 81372309,
"author": {
"login": "vcalasansh",
"id": 109106581,
"node_id": "U_kgDOBoDVlQ",
"avatar_url": "https://avatars.githubusercontent.com/u/109106581?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/vcalasansh",
"html_url": "https://github.com/vcalasansh",
"followers_url": "https://api.github.com/users/vcalasansh/followers",
"following_url": "https://api.github.com/users/vcalasansh/following{/other_user}",
"gists_url": "https://api.github.com/users/vcalasansh/gists{/gist_id}",
"starred_url": "https://api.github.com/users/vcalasansh/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/vcalasansh/subscriptions",
"organizations_url": "https://api.github.com/users/vcalasansh/orgs",
"repos_url": "https://api.github.com/users/vcalasansh/repos",
"events_url": "https://api.github.com/users/vcalasansh/events{/privacy}",
"received_events_url": "https://api.github.com/users/vcalasansh/received_events",
"type": "User",
"site_admin": false
},
"node_id": "RE_kwDOH5utuc4E2aSV",
"tag_name": "v1.0.0",
"target_commitish": "test-branch",
"name": "New release!",
"draft": false,
"prerelease": false,
"created_at": "2022-10-28T13:03:11Z",
"published_at": "2022-10-28T16:36:52Z",
"assets": [
],
"tarball_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/tarball/v1.0.0",
"zipball_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/zipball/v1.0.0",
"body": "New release!"
},
"repository": {
"id": 530296249,
"node_id": "R_kgDOH5utuQ",
"name": "harness-ngtriggers-test",
"full_name": "vcalasansh/harness-ngtriggers-test",
"private": true,
"owner": {
"login": "vcalasansh",
"id": 109106581,
"node_id": "U_kgDOBoDVlQ",
"avatar_url": "https://avatars.githubusercontent.com/u/109106581?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/vcalasansh",
"html_url": "https://github.com/vcalasansh",
"followers_url": "https://api.github.com/users/vcalasansh/followers",
"following_url": "https://api.github.com/users/vcalasansh/following{/other_user}",
"gists_url": "https://api.github.com/users/vcalasansh/gists{/gist_id}",
"starred_url": "https://api.github.com/users/vcalasansh/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/vcalasansh/subscriptions",
"organizations_url": "https://api.github.com/users/vcalasansh/orgs",
"repos_url": "https://api.github.com/users/vcalasansh/repos",
"events_url": "https://api.github.com/users/vcalasansh/events{/privacy}",
"received_events_url": "https://api.github.com/users/vcalasansh/received_events",
"type": "User",
"site_admin": false
},
"html_url": "https://github.com/vcalasansh/harness-ngtriggers-test",
"description": null,
"fork": false,
"url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test",
"forks_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/forks",
"keys_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/keys{/key_id}",
"collaborators_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/collaborators{/collaborator}",
"teams_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/teams",
"hooks_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/hooks",
"issue_events_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/issues/events{/number}",
"events_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/events",
"assignees_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/assignees{/user}",
"branches_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/branches{/branch}",
"tags_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/tags",
"blobs_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/git/blobs{/sha}",
"git_tags_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/git/tags{/sha}",
"git_refs_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/git/refs{/sha}",
"trees_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/git/trees{/sha}",
"statuses_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/statuses/{sha}",
"languages_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/languages",
"stargazers_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/stargazers",
"contributors_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/contributors",
"subscribers_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/subscribers",
"subscription_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/subscription",
"commits_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/commits{/sha}",
"git_commits_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/git/commits{/sha}",
"comments_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/comments{/number}",
"issue_comment_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/issues/comments{/number}",
"contents_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/contents/{+path}",
"compare_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/compare/{base}...{head}",
"merges_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/merges",
"archive_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/{archive_format}{/ref}",
"downloads_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/downloads",
"issues_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/issues{/number}",
"pulls_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/pulls{/number}",
"milestones_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/milestones{/number}",
"notifications_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/notifications{?since,all,participating}",
"labels_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/labels{/name}",
"releases_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/releases{/id}",
"deployments_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/deployments",
"created_at": "2022-08-29T16:12:07Z",
"updated_at": "2022-08-29T16:12:07Z",
"pushed_at": "2022-10-28T16:36:27Z",
"git_url": "git://github.com/vcalasansh/harness-ngtriggers-test.git",
"ssh_url": "git@github.com:vcalasansh/harness-ngtriggers-test.git",
"clone_url": "https://github.com/vcalasansh/harness-ngtriggers-test.git",
"svn_url": "https://github.com/vcalasansh/harness-ngtriggers-test",
"homepage": null,
"size": 11,
"stargazers_count": 0,
"watchers_count": 0,
"language": null,
"has_issues": true,
"has_projects": true,
"has_downloads": true,
"has_wiki": true,
"has_pages": false,
"forks_count": 0,
"mirror_url": null,
"archived": false,
"disabled": false,
"open_issues_count": 0,
"license": null,
"allow_forking": true,
"is_template": false,
"web_commit_signoff_required": false,
"topics": [
],
"forks": 0,
"open_issues": 0,
"watchers": 0,
"default_branch": "test-branch"
},
"sender": {
"login": "vcalasansh",
"id": 109106581,
"node_id": "U_kgDOBoDVlQ",
"avatar_url": "https://avatars.githubusercontent.com/u/109106581?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/vcalasansh",
"html_url": "https://github.com/vcalasansh",
"followers_url": "https://api.github.com/users/vcalasansh/followers",
"following_url": "https://api.github.com/users/vcalasansh/following{/other_user}",
"gists_url": "https://api.github.com/users/vcalasansh/gists{/gist_id}",
"starred_url": "https://api.github.com/users/vcalasansh/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/vcalasansh/subscriptions",
"organizations_url": "https://api.github.com/users/vcalasansh/orgs",
"repos_url": "https://api.github.com/users/vcalasansh/repos",
"events_url": "https://api.github.com/users/vcalasansh/events{/privacy}",
"received_events_url": "https://api.github.com/users/vcalasansh/received_events",
"type": "User",
"site_admin": false
}
}

@ -0,0 +1,34 @@
{
"Action": "prereleased",
"Release": {
"ID": 81372309,
"Title": "New release!",
"Description": "New release!",
"Link": "https://github.com/vcalasansh/harness-ngtriggers-test/releases/tag/v1.0.0",
"Tag": "v1.0.0",
"Commitish": "test-branch",
"Draft": false,
"Prerelease": false,
"Created": "2022-10-28T13:03:11Z",
"Published": "2022-10-28T16:36:52Z"
},
"Repo": {
"ID": "530296249",
"Namespace": "vcalasansh",
"Name": "harness-ngtriggers-test",
"Perm": null,
"Branch": "test-branch",
"Private": true,
"Clone": "https://github.com/vcalasansh/harness-ngtriggers-test.git",
"CloneSSH": "git@github.com:vcalasansh/harness-ngtriggers-test.git",
"Link": "https://github.com/vcalasansh/harness-ngtriggers-test",
"Created": "0001-01-01T00:00:00Z",
"Updated": "0001-01-01T00:00:00Z"
},
"Sender": {
"Login": "vcalasansh",
"Name": "",
"Email": "",
"Avatar": "https://avatars.githubusercontent.com/u/109106581?v=4"
}
}

@ -0,0 +1,164 @@
{
"action": "published",
"release": {
"url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/releases/81372309",
"assets_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/releases/81372309/assets",
"upload_url": "https://uploads.github.com/repos/vcalasansh/harness-ngtriggers-test/releases/81372309/assets{?name,label}",
"html_url": "https://github.com/vcalasansh/harness-ngtriggers-test/releases/tag/v1.0.0",
"id": 81372309,
"author": {
"login": "vcalasansh",
"id": 109106581,
"node_id": "U_kgDOBoDVlQ",
"avatar_url": "https://avatars.githubusercontent.com/u/109106581?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/vcalasansh",
"html_url": "https://github.com/vcalasansh",
"followers_url": "https://api.github.com/users/vcalasansh/followers",
"following_url": "https://api.github.com/users/vcalasansh/following{/other_user}",
"gists_url": "https://api.github.com/users/vcalasansh/gists{/gist_id}",
"starred_url": "https://api.github.com/users/vcalasansh/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/vcalasansh/subscriptions",
"organizations_url": "https://api.github.com/users/vcalasansh/orgs",
"repos_url": "https://api.github.com/users/vcalasansh/repos",
"events_url": "https://api.github.com/users/vcalasansh/events{/privacy}",
"received_events_url": "https://api.github.com/users/vcalasansh/received_events",
"type": "User",
"site_admin": false
},
"node_id": "RE_kwDOH5utuc4E2aSV",
"tag_name": "v1.0.0",
"target_commitish": "test-branch",
"name": "New release!",
"draft": false,
"prerelease": false,
"created_at": "2022-10-28T13:03:11Z",
"published_at": "2022-10-28T16:36:52Z",
"assets": [
],
"tarball_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/tarball/v1.0.0",
"zipball_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/zipball/v1.0.0",
"body": "New release!"
},
"repository": {
"id": 530296249,
"node_id": "R_kgDOH5utuQ",
"name": "harness-ngtriggers-test",
"full_name": "vcalasansh/harness-ngtriggers-test",
"private": true,
"owner": {
"login": "vcalasansh",
"id": 109106581,
"node_id": "U_kgDOBoDVlQ",
"avatar_url": "https://avatars.githubusercontent.com/u/109106581?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/vcalasansh",
"html_url": "https://github.com/vcalasansh",
"followers_url": "https://api.github.com/users/vcalasansh/followers",
"following_url": "https://api.github.com/users/vcalasansh/following{/other_user}",
"gists_url": "https://api.github.com/users/vcalasansh/gists{/gist_id}",
"starred_url": "https://api.github.com/users/vcalasansh/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/vcalasansh/subscriptions",
"organizations_url": "https://api.github.com/users/vcalasansh/orgs",
"repos_url": "https://api.github.com/users/vcalasansh/repos",
"events_url": "https://api.github.com/users/vcalasansh/events{/privacy}",
"received_events_url": "https://api.github.com/users/vcalasansh/received_events",
"type": "User",
"site_admin": false
},
"html_url": "https://github.com/vcalasansh/harness-ngtriggers-test",
"description": null,
"fork": false,
"url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test",
"forks_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/forks",
"keys_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/keys{/key_id}",
"collaborators_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/collaborators{/collaborator}",
"teams_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/teams",
"hooks_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/hooks",
"issue_events_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/issues/events{/number}",
"events_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/events",
"assignees_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/assignees{/user}",
"branches_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/branches{/branch}",
"tags_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/tags",
"blobs_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/git/blobs{/sha}",
"git_tags_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/git/tags{/sha}",
"git_refs_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/git/refs{/sha}",
"trees_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/git/trees{/sha}",
"statuses_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/statuses/{sha}",
"languages_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/languages",
"stargazers_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/stargazers",
"contributors_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/contributors",
"subscribers_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/subscribers",
"subscription_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/subscription",
"commits_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/commits{/sha}",
"git_commits_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/git/commits{/sha}",
"comments_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/comments{/number}",
"issue_comment_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/issues/comments{/number}",
"contents_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/contents/{+path}",
"compare_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/compare/{base}...{head}",
"merges_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/merges",
"archive_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/{archive_format}{/ref}",
"downloads_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/downloads",
"issues_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/issues{/number}",
"pulls_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/pulls{/number}",
"milestones_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/milestones{/number}",
"notifications_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/notifications{?since,all,participating}",
"labels_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/labels{/name}",
"releases_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/releases{/id}",
"deployments_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/deployments",
"created_at": "2022-08-29T16:12:07Z",
"updated_at": "2022-08-29T16:12:07Z",
"pushed_at": "2022-10-28T16:36:27Z",
"git_url": "git://github.com/vcalasansh/harness-ngtriggers-test.git",
"ssh_url": "git@github.com:vcalasansh/harness-ngtriggers-test.git",
"clone_url": "https://github.com/vcalasansh/harness-ngtriggers-test.git",
"svn_url": "https://github.com/vcalasansh/harness-ngtriggers-test",
"homepage": null,
"size": 11,
"stargazers_count": 0,
"watchers_count": 0,
"language": null,
"has_issues": true,
"has_projects": true,
"has_downloads": true,
"has_wiki": true,
"has_pages": false,
"forks_count": 0,
"mirror_url": null,
"archived": false,
"disabled": false,
"open_issues_count": 0,
"license": null,
"allow_forking": true,
"is_template": false,
"web_commit_signoff_required": false,
"topics": [
],
"forks": 0,
"open_issues": 0,
"watchers": 0,
"default_branch": "test-branch"
},
"sender": {
"login": "vcalasansh",
"id": 109106581,
"node_id": "U_kgDOBoDVlQ",
"avatar_url": "https://avatars.githubusercontent.com/u/109106581?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/vcalasansh",
"html_url": "https://github.com/vcalasansh",
"followers_url": "https://api.github.com/users/vcalasansh/followers",
"following_url": "https://api.github.com/users/vcalasansh/following{/other_user}",
"gists_url": "https://api.github.com/users/vcalasansh/gists{/gist_id}",
"starred_url": "https://api.github.com/users/vcalasansh/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/vcalasansh/subscriptions",
"organizations_url": "https://api.github.com/users/vcalasansh/orgs",
"repos_url": "https://api.github.com/users/vcalasansh/repos",
"events_url": "https://api.github.com/users/vcalasansh/events{/privacy}",
"received_events_url": "https://api.github.com/users/vcalasansh/received_events",
"type": "User",
"site_admin": false
}
}

@ -0,0 +1,34 @@
{
"Action": "published",
"Release": {
"ID": 81372309,
"Title": "New release!",
"Description": "New release!",
"Link": "https://github.com/vcalasansh/harness-ngtriggers-test/releases/tag/v1.0.0",
"Tag": "v1.0.0",
"Commitish": "test-branch",
"Draft": false,
"Prerelease": false,
"Created": "2022-10-28T13:03:11Z",
"Published": "2022-10-28T16:36:52Z"
},
"Repo": {
"ID": "530296249",
"Namespace": "vcalasansh",
"Name": "harness-ngtriggers-test",
"Perm": null,
"Branch": "test-branch",
"Private": true,
"Clone": "https://github.com/vcalasansh/harness-ngtriggers-test.git",
"CloneSSH": "git@github.com:vcalasansh/harness-ngtriggers-test.git",
"Link": "https://github.com/vcalasansh/harness-ngtriggers-test",
"Created": "0001-01-01T00:00:00Z",
"Updated": "0001-01-01T00:00:00Z"
},
"Sender": {
"Login": "vcalasansh",
"Name": "",
"Email": "",
"Avatar": "https://avatars.githubusercontent.com/u/109106581?v=4"
}
}

@ -0,0 +1,164 @@
{
"action": "released",
"release": {
"url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/releases/81372309",
"assets_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/releases/81372309/assets",
"upload_url": "https://uploads.github.com/repos/vcalasansh/harness-ngtriggers-test/releases/81372309/assets{?name,label}",
"html_url": "https://github.com/vcalasansh/harness-ngtriggers-test/releases/tag/v1.0.0",
"id": 81372309,
"author": {
"login": "vcalasansh",
"id": 109106581,
"node_id": "U_kgDOBoDVlQ",
"avatar_url": "https://avatars.githubusercontent.com/u/109106581?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/vcalasansh",
"html_url": "https://github.com/vcalasansh",
"followers_url": "https://api.github.com/users/vcalasansh/followers",
"following_url": "https://api.github.com/users/vcalasansh/following{/other_user}",
"gists_url": "https://api.github.com/users/vcalasansh/gists{/gist_id}",
"starred_url": "https://api.github.com/users/vcalasansh/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/vcalasansh/subscriptions",
"organizations_url": "https://api.github.com/users/vcalasansh/orgs",
"repos_url": "https://api.github.com/users/vcalasansh/repos",
"events_url": "https://api.github.com/users/vcalasansh/events{/privacy}",
"received_events_url": "https://api.github.com/users/vcalasansh/received_events",
"type": "User",
"site_admin": false
},
"node_id": "RE_kwDOH5utuc4E2aSV",
"tag_name": "v1.0.0",
"target_commitish": "test-branch",
"name": "New release!",
"draft": false,
"prerelease": false,
"created_at": "2022-10-28T13:03:11Z",
"published_at": "2022-10-28T16:36:52Z",
"assets": [
],
"tarball_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/tarball/v1.0.0",
"zipball_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/zipball/v1.0.0",
"body": "New release!"
},
"repository": {
"id": 530296249,
"node_id": "R_kgDOH5utuQ",
"name": "harness-ngtriggers-test",
"full_name": "vcalasansh/harness-ngtriggers-test",
"private": true,
"owner": {
"login": "vcalasansh",
"id": 109106581,
"node_id": "U_kgDOBoDVlQ",
"avatar_url": "https://avatars.githubusercontent.com/u/109106581?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/vcalasansh",
"html_url": "https://github.com/vcalasansh",
"followers_url": "https://api.github.com/users/vcalasansh/followers",
"following_url": "https://api.github.com/users/vcalasansh/following{/other_user}",
"gists_url": "https://api.github.com/users/vcalasansh/gists{/gist_id}",
"starred_url": "https://api.github.com/users/vcalasansh/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/vcalasansh/subscriptions",
"organizations_url": "https://api.github.com/users/vcalasansh/orgs",
"repos_url": "https://api.github.com/users/vcalasansh/repos",
"events_url": "https://api.github.com/users/vcalasansh/events{/privacy}",
"received_events_url": "https://api.github.com/users/vcalasansh/received_events",
"type": "User",
"site_admin": false
},
"html_url": "https://github.com/vcalasansh/harness-ngtriggers-test",
"description": null,
"fork": false,
"url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test",
"forks_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/forks",
"keys_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/keys{/key_id}",
"collaborators_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/collaborators{/collaborator}",
"teams_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/teams",
"hooks_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/hooks",
"issue_events_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/issues/events{/number}",
"events_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/events",
"assignees_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/assignees{/user}",
"branches_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/branches{/branch}",
"tags_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/tags",
"blobs_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/git/blobs{/sha}",
"git_tags_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/git/tags{/sha}",
"git_refs_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/git/refs{/sha}",
"trees_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/git/trees{/sha}",
"statuses_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/statuses/{sha}",
"languages_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/languages",
"stargazers_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/stargazers",
"contributors_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/contributors",
"subscribers_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/subscribers",
"subscription_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/subscription",
"commits_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/commits{/sha}",
"git_commits_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/git/commits{/sha}",
"comments_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/comments{/number}",
"issue_comment_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/issues/comments{/number}",
"contents_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/contents/{+path}",
"compare_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/compare/{base}...{head}",
"merges_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/merges",
"archive_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/{archive_format}{/ref}",
"downloads_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/downloads",
"issues_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/issues{/number}",
"pulls_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/pulls{/number}",
"milestones_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/milestones{/number}",
"notifications_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/notifications{?since,all,participating}",
"labels_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/labels{/name}",
"releases_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/releases{/id}",
"deployments_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/deployments",
"created_at": "2022-08-29T16:12:07Z",
"updated_at": "2022-08-29T16:12:07Z",
"pushed_at": "2022-10-28T16:36:27Z",
"git_url": "git://github.com/vcalasansh/harness-ngtriggers-test.git",
"ssh_url": "git@github.com:vcalasansh/harness-ngtriggers-test.git",
"clone_url": "https://github.com/vcalasansh/harness-ngtriggers-test.git",
"svn_url": "https://github.com/vcalasansh/harness-ngtriggers-test",
"homepage": null,
"size": 11,
"stargazers_count": 0,
"watchers_count": 0,
"language": null,
"has_issues": true,
"has_projects": true,
"has_downloads": true,
"has_wiki": true,
"has_pages": false,
"forks_count": 0,
"mirror_url": null,
"archived": false,
"disabled": false,
"open_issues_count": 0,
"license": null,
"allow_forking": true,
"is_template": false,
"web_commit_signoff_required": false,
"topics": [
],
"forks": 0,
"open_issues": 0,
"watchers": 0,
"default_branch": "test-branch"
},
"sender": {
"login": "vcalasansh",
"id": 109106581,
"node_id": "U_kgDOBoDVlQ",
"avatar_url": "https://avatars.githubusercontent.com/u/109106581?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/vcalasansh",
"html_url": "https://github.com/vcalasansh",
"followers_url": "https://api.github.com/users/vcalasansh/followers",
"following_url": "https://api.github.com/users/vcalasansh/following{/other_user}",
"gists_url": "https://api.github.com/users/vcalasansh/gists{/gist_id}",
"starred_url": "https://api.github.com/users/vcalasansh/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/vcalasansh/subscriptions",
"organizations_url": "https://api.github.com/users/vcalasansh/orgs",
"repos_url": "https://api.github.com/users/vcalasansh/repos",
"events_url": "https://api.github.com/users/vcalasansh/events{/privacy}",
"received_events_url": "https://api.github.com/users/vcalasansh/received_events",
"type": "User",
"site_admin": false
}
}

@ -0,0 +1,34 @@
{
"Action": "released",
"Release": {
"ID": 81372309,
"Title": "New release!",
"Description": "New release!",
"Link": "https://github.com/vcalasansh/harness-ngtriggers-test/releases/tag/v1.0.0",
"Tag": "v1.0.0",
"Commitish": "test-branch",
"Draft": false,
"Prerelease": false,
"Created": "2022-10-28T13:03:11Z",
"Published": "2022-10-28T16:36:52Z"
},
"Repo": {
"ID": "530296249",
"Namespace": "vcalasansh",
"Name": "harness-ngtriggers-test",
"Perm": null,
"Branch": "test-branch",
"Private": true,
"Clone": "https://github.com/vcalasansh/harness-ngtriggers-test.git",
"CloneSSH": "git@github.com:vcalasansh/harness-ngtriggers-test.git",
"Link": "https://github.com/vcalasansh/harness-ngtriggers-test",
"Created": "0001-01-01T00:00:00Z",
"Updated": "0001-01-01T00:00:00Z"
},
"Sender": {
"Login": "vcalasansh",
"Name": "",
"Email": "",
"Avatar": "https://avatars.githubusercontent.com/u/109106581?v=4"
}
}

@ -0,0 +1,164 @@
{
"action": "unpublished",
"release": {
"url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/releases/81372309",
"assets_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/releases/81372309/assets",
"upload_url": "https://uploads.github.com/repos/vcalasansh/harness-ngtriggers-test/releases/81372309/assets{?name,label}",
"html_url": "https://github.com/vcalasansh/harness-ngtriggers-test/releases/tag/v1.0.0",
"id": 81372309,
"author": {
"login": "vcalasansh",
"id": 109106581,
"node_id": "U_kgDOBoDVlQ",
"avatar_url": "https://avatars.githubusercontent.com/u/109106581?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/vcalasansh",
"html_url": "https://github.com/vcalasansh",
"followers_url": "https://api.github.com/users/vcalasansh/followers",
"following_url": "https://api.github.com/users/vcalasansh/following{/other_user}",
"gists_url": "https://api.github.com/users/vcalasansh/gists{/gist_id}",
"starred_url": "https://api.github.com/users/vcalasansh/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/vcalasansh/subscriptions",
"organizations_url": "https://api.github.com/users/vcalasansh/orgs",
"repos_url": "https://api.github.com/users/vcalasansh/repos",
"events_url": "https://api.github.com/users/vcalasansh/events{/privacy}",
"received_events_url": "https://api.github.com/users/vcalasansh/received_events",
"type": "User",
"site_admin": false
},
"node_id": "RE_kwDOH5utuc4E2aSV",
"tag_name": "v1.0.0",
"target_commitish": "test-branch",
"name": "New release!",
"draft": false,
"prerelease": false,
"created_at": "2022-10-28T13:03:11Z",
"published_at": "2022-10-28T16:36:52Z",
"assets": [
],
"tarball_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/tarball/v1.0.0",
"zipball_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/zipball/v1.0.0",
"body": "New release!"
},
"repository": {
"id": 530296249,
"node_id": "R_kgDOH5utuQ",
"name": "harness-ngtriggers-test",
"full_name": "vcalasansh/harness-ngtriggers-test",
"private": true,
"owner": {
"login": "vcalasansh",
"id": 109106581,
"node_id": "U_kgDOBoDVlQ",
"avatar_url": "https://avatars.githubusercontent.com/u/109106581?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/vcalasansh",
"html_url": "https://github.com/vcalasansh",
"followers_url": "https://api.github.com/users/vcalasansh/followers",
"following_url": "https://api.github.com/users/vcalasansh/following{/other_user}",
"gists_url": "https://api.github.com/users/vcalasansh/gists{/gist_id}",
"starred_url": "https://api.github.com/users/vcalasansh/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/vcalasansh/subscriptions",
"organizations_url": "https://api.github.com/users/vcalasansh/orgs",
"repos_url": "https://api.github.com/users/vcalasansh/repos",
"events_url": "https://api.github.com/users/vcalasansh/events{/privacy}",
"received_events_url": "https://api.github.com/users/vcalasansh/received_events",
"type": "User",
"site_admin": false
},
"html_url": "https://github.com/vcalasansh/harness-ngtriggers-test",
"description": null,
"fork": false,
"url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test",
"forks_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/forks",
"keys_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/keys{/key_id}",
"collaborators_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/collaborators{/collaborator}",
"teams_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/teams",
"hooks_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/hooks",
"issue_events_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/issues/events{/number}",
"events_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/events",
"assignees_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/assignees{/user}",
"branches_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/branches{/branch}",
"tags_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/tags",
"blobs_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/git/blobs{/sha}",
"git_tags_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/git/tags{/sha}",
"git_refs_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/git/refs{/sha}",
"trees_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/git/trees{/sha}",
"statuses_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/statuses/{sha}",
"languages_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/languages",
"stargazers_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/stargazers",
"contributors_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/contributors",
"subscribers_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/subscribers",
"subscription_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/subscription",
"commits_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/commits{/sha}",
"git_commits_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/git/commits{/sha}",
"comments_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/comments{/number}",
"issue_comment_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/issues/comments{/number}",
"contents_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/contents/{+path}",
"compare_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/compare/{base}...{head}",
"merges_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/merges",
"archive_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/{archive_format}{/ref}",
"downloads_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/downloads",
"issues_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/issues{/number}",
"pulls_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/pulls{/number}",
"milestones_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/milestones{/number}",
"notifications_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/notifications{?since,all,participating}",
"labels_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/labels{/name}",
"releases_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/releases{/id}",
"deployments_url": "https://api.github.com/repos/vcalasansh/harness-ngtriggers-test/deployments",
"created_at": "2022-08-29T16:12:07Z",
"updated_at": "2022-08-29T16:12:07Z",
"pushed_at": "2022-10-28T16:36:27Z",
"git_url": "git://github.com/vcalasansh/harness-ngtriggers-test.git",
"ssh_url": "git@github.com:vcalasansh/harness-ngtriggers-test.git",
"clone_url": "https://github.com/vcalasansh/harness-ngtriggers-test.git",
"svn_url": "https://github.com/vcalasansh/harness-ngtriggers-test",
"homepage": null,
"size": 11,
"stargazers_count": 0,
"watchers_count": 0,
"language": null,
"has_issues": true,
"has_projects": true,
"has_downloads": true,
"has_wiki": true,
"has_pages": false,
"forks_count": 0,
"mirror_url": null,
"archived": false,
"disabled": false,
"open_issues_count": 0,
"license": null,
"allow_forking": true,
"is_template": false,
"web_commit_signoff_required": false,
"topics": [
],
"forks": 0,
"open_issues": 0,
"watchers": 0,
"default_branch": "test-branch"
},
"sender": {
"login": "vcalasansh",
"id": 109106581,
"node_id": "U_kgDOBoDVlQ",
"avatar_url": "https://avatars.githubusercontent.com/u/109106581?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/vcalasansh",
"html_url": "https://github.com/vcalasansh",
"followers_url": "https://api.github.com/users/vcalasansh/followers",
"following_url": "https://api.github.com/users/vcalasansh/following{/other_user}",
"gists_url": "https://api.github.com/users/vcalasansh/gists{/gist_id}",
"starred_url": "https://api.github.com/users/vcalasansh/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/vcalasansh/subscriptions",
"organizations_url": "https://api.github.com/users/vcalasansh/orgs",
"repos_url": "https://api.github.com/users/vcalasansh/repos",
"events_url": "https://api.github.com/users/vcalasansh/events{/privacy}",
"received_events_url": "https://api.github.com/users/vcalasansh/received_events",
"type": "User",
"site_admin": false
}
}

@ -0,0 +1,34 @@
{
"Action": "unpublished",
"Release": {
"ID": 81372309,
"Title": "New release!",
"Description": "New release!",
"Link": "https://github.com/vcalasansh/harness-ngtriggers-test/releases/tag/v1.0.0",
"Tag": "v1.0.0",
"Commitish": "test-branch",
"Draft": false,
"Prerelease": false,
"Created": "2022-10-28T13:03:11Z",
"Published": "2022-10-28T16:36:52Z"
},
"Repo": {
"ID": "530296249",
"Namespace": "vcalasansh",
"Name": "harness-ngtriggers-test",
"Perm": null,
"Branch": "test-branch",
"Private": true,
"Clone": "https://github.com/vcalasansh/harness-ngtriggers-test.git",
"CloneSSH": "git@github.com:vcalasansh/harness-ngtriggers-test.git",
"Link": "https://github.com/vcalasansh/harness-ngtriggers-test",
"Created": "0001-01-01T00:00:00Z",
"Updated": "0001-01-01T00:00:00Z"
},
"Sender": {
"Login": "vcalasansh",
"Name": "",
"Email": "",
"Avatar": "https://avatars.githubusercontent.com/u/109106581?v=4"
}
}

@ -46,6 +46,8 @@ func (s *webhookService) Parse(req *http.Request, fn scm.SecretFunc) (scm.Webhoo
// case "issues":
case "issue_comment":
hook, err = s.parseIssueCommentHook(data)
case "release":
hook, err = s.parseReleaseHook(data)
default:
return nil, scm.ErrUnknownEvent
}
@ -178,6 +180,34 @@ func (s *webhookService) parsePullRequestHook(data []byte) (scm.Webhook, error)
return dst, nil
}
func (s *webhookService) parseReleaseHook(data []byte) (scm.Webhook, error) {
src := new(releaseHook)
err := json.Unmarshal(data, src)
if err != nil {
return nil, err
}
dst := convertReleaseHook(src)
switch src.Action {
case "created":
dst.Action = scm.ActionCreate
case "edited":
dst.Action = scm.ActionEdit
case "deleted":
dst.Action = scm.ActionDelete
case "published":
dst.Action = scm.ActionPublish
case "unpublished":
dst.Action = scm.ActionUnpublish
case "prereleased":
dst.Action = scm.ActionPrerelease
case "released":
dst.Action = scm.ActionRelease
default:
dst.Action = scm.ActionUnknown
}
return dst, nil
}
//
// native data structures
//
@ -301,6 +331,25 @@ type (
Updated time.Time `json:"updated_at"`
} `json:"comment"`
}
// github release webhook payload
releaseHook struct {
Action string `json:"action"`
Release struct {
ID int `json:"id"`
Title string `json:"name"`
Description string `json:"body"`
Link string `json:"html_url,omitempty"`
Tag string `json:"tag_name,omitempty"`
Commitish string `json:"target_commitish,omitempty"`
Draft bool `json:"draft"`
Prerelease bool `json:"prerelease"`
Created time.Time `json:"created_at"`
Published time.Time `json:"published_at"`
} `json:"release"`
Repository repository `json:"repository"`
Sender user `json:"sender"`
}
)
//
@ -500,6 +549,36 @@ func convertIssueCommentHook(src *issueCommentHook) *scm.IssueCommentHook {
return dst
}
func convertReleaseHook(src *releaseHook) *scm.ReleaseHook {
dst := &scm.ReleaseHook{
Release: scm.Release{
ID: src.Release.ID,
Title: src.Release.Title,
Description: src.Release.Description,
Link: src.Release.Link,
Tag: src.Release.Tag,
Commitish: src.Release.Commitish,
Draft: src.Release.Draft,
Prerelease: src.Release.Prerelease,
Created: src.Release.Created,
Published: src.Release.Published,
},
Repo: scm.Repository{
ID: fmt.Sprint(src.Repository.ID),
Namespace: src.Repository.Owner.Login,
Name: src.Repository.Name,
Branch: src.Repository.DefaultBranch,
Private: src.Repository.Private,
Visibility: convertVisibility(src.Repository.Visibility),
Clone: src.Repository.CloneURL,
CloneSSH: src.Repository.SSHURL,
Link: src.Repository.HTMLURL,
},
Sender: *convertUser(&src.Sender),
}
return dst
}
// regexp help determine if the named git object is a tag.
// this is not meant to be 100% accurate.
var tagRE = regexp.MustCompile("^v?(\\d+).(.+)")

@ -185,6 +185,51 @@ func TestWebhooks(t *testing.T) {
after: "testdata/webhooks/deployment_commit.json.golden",
obj: new(scm.DeployHook),
},
//
// release
//
{
event: "release",
before: "testdata/webhooks/release_published.json",
after: "testdata/webhooks/release_published.json.golden",
obj: new(scm.ReleaseHook),
},
{
event: "release",
before: "testdata/webhooks/release_unpublished.json",
after: "testdata/webhooks/release_unpublished.json.golden",
obj: new(scm.ReleaseHook),
},
{
event: "release",
before: "testdata/webhooks/release_created.json",
after: "testdata/webhooks/release_created.json.golden",
obj: new(scm.ReleaseHook),
},
{
event: "release",
before: "testdata/webhooks/release_edited.json",
after: "testdata/webhooks/release_edited.json.golden",
obj: new(scm.ReleaseHook),
},
{
event: "release",
before: "testdata/webhooks/release_deleted.json",
after: "testdata/webhooks/release_deleted.json.golden",
obj: new(scm.ReleaseHook),
},
{
event: "release",
before: "testdata/webhooks/release_prereleased.json",
after: "testdata/webhooks/release_prereleased.json.golden",
obj: new(scm.ReleaseHook),
},
{
event: "release",
before: "testdata/webhooks/release_released.json",
after: "testdata/webhooks/release_released.json.golden",
obj: new(scm.ReleaseHook),
},
}
for _, test := range tests {

@ -7,6 +7,8 @@ package gitlab
import (
"context"
"fmt"
"net/url"
"strings"
"time"
"github.com/drone/go-scm/scm"
@ -16,7 +18,7 @@ type gitService struct {
client *wrapper
}
func (s *gitService) CreateBranch(ctx context.Context, repo string, params *scm.CreateBranch) (*scm.Response, error) {
func (s *gitService) CreateBranch(ctx context.Context, repo string, params *scm.ReferenceInput) (*scm.Response, error) {
path := fmt.Sprintf("api/v4/projects/%s/repository/branches", encode(repo))
in := &createBranch{
Branch: params.Name,
@ -33,6 +35,11 @@ func (s *gitService) FindBranch(ctx context.Context, repo, name string) (*scm.Re
}
func (s *gitService) FindCommit(ctx context.Context, repo, ref string) (*scm.Commit, *scm.Response, error) {
// if the reference is a branch, ensure forward slashes
// in the branch name are escaped.
if strings.Contains("ref", "/") {
ref = url.PathEscape(ref)
}
path := fmt.Sprintf("api/v4/projects/%s/repository/commits/%s", encode(repo), scm.TrimRef(ref))
out := new(commit)
res, err := s.client.do(ctx, "GET", path, nil, out)

@ -90,7 +90,7 @@ func TestGitCreateBranch(t *testing.T) {
SetHeaders(mockHeaders).
File("testdata/branch_create.json")
params := &scm.CreateBranch{
params := &scm.ReferenceInput{
Name: "yooo",
Sha: "0efb1bed7c6a4871cb4ddb862ecc2111e11f31ee",
}

@ -34,7 +34,7 @@
{
"id": "c4c79227ed610f1151f05bbc5be33b4f340d39c8",
"message": "update readme\n",
"timestamp": "2017-12-10T08:28:36-08:00",
"timestamp": "2017-12-10T08:28:36+00:00",
"url": "https://gitlab.com/gitlab-org/hello-world/commit/c4c79227ed610f1151f05bbc5be33b4f340d39c8",
"author": {
"name": "Sid Sijbrandij",

@ -41,14 +41,14 @@
"Author": {
"Name": "Sid Sijbrandij",
"Email": "noreply@gitlab.com",
"Date": "0001-01-01T00:00:00Z",
"Date": "2017-12-10T08:28:36Z",
"Login": "",
"Avatar": ""
},
"Committer": {
"Name": "Sid Sijbrandij",
"Email": "noreply@gitlab.com",
"Date": "0001-01-01T00:00:00Z",
"Date": "2017-12-10T08:28:36Z",
"Login": "",
"Avatar": ""
},

@ -34,7 +34,7 @@
{
"id": "2adc9465c4edfc33834e173fe89436a7cb899a1d",
"message": "added readme\n",
"timestamp": "2017-12-10T08:26:38-08:00",
"timestamp": "2017-12-10T08:26:38+00:00",
"url": "https://gitlab.com/gitlab-org/hello-world/commit/2adc9465c4edfc33834e173fe89436a7cb899a1d",
"author": {
"name": "Sid Sijbrandij",

@ -41,14 +41,14 @@
"Author": {
"Name": "Sid Sijbrandij",
"Email": "noreply@gitlab.com",
"Date": "0001-01-01T00:00:00Z",
"Date": "2017-12-10T08:26:38Z",
"Login": "",
"Avatar": ""
},
"Committer": {
"Name": "Sid Sijbrandij",
"Email": "noreply@gitlab.com",
"Date": "0001-01-01T00:00:00Z",
"Date": "2017-12-10T08:26:38Z",
"Login": "",
"Avatar": ""
},

@ -34,7 +34,7 @@
{
"id": "2adc9465c4edfc33834e173fe89436a7cb899a1d",
"message": "added readme\n",
"timestamp": "2017-12-10T08:26:38-08:00",
"timestamp": "2017-12-10T08:26:38+00:00",
"url": "https://gitlab.com/gitlab-org/hello-world/commit/2adc9465c4edfc33834e173fe89436a7cb899a1d",
"author": {
"name": "Sid Sijbrandij",

@ -41,14 +41,14 @@
"Author": {
"Name": "Sid Sijbrandij",
"Email": "noreply@gitlab.com",
"Date": "0001-01-01T00:00:00Z",
"Date": "2017-12-10T08:26:38Z",
"Login": "",
"Avatar": ""
},
"Committer": {
"Name": "Sid Sijbrandij",
"Email": "noreply@gitlab.com",
"Date": "0001-01-01T00:00:00Z",
"Date": "2017-12-10T08:26:38Z",
"Login": "",
"Avatar": ""
},

@ -14,6 +14,7 @@ import (
"time"
"github.com/drone/go-scm/scm"
"github.com/drone/go-scm/scm/driver/internal/null"
)
type webhookService struct {
@ -130,10 +131,12 @@ func convertPushHook(src *pushHook) *scm.PushHook {
Author: scm.Signature{
Name: c.Author.Name,
Email: c.Author.Email,
Date: c.Timestamp.ValueOrZero(),
},
Committer: scm.Signature{
Name: c.Author.Name,
Email: c.Author.Email,
Date: c.Timestamp.ValueOrZero(),
},
})
}
@ -219,8 +222,8 @@ func converBranchHook(src *pushHook) *scm.BranchHook {
}
func convertCommentHook(src *commentHook) (*scm.IssueCommentHook, error) {
var issue scm.Issue
var comment scm.Comment
var issue scm.Issue
var comment scm.Comment
switch src.ObjectAttributes.NoteableType {
case "Commit", "Issue", "Snippet":
@ -242,7 +245,7 @@ func convertCommentHook(src *commentHook) (*scm.IssueCommentHook, error) {
Updated: parseTimeString(src.MergeRequest.UpdatedAt),
}
for _, l := range src.MergeRequest.Labels {
label := scm.Label {
label := scm.Label{
Name: l.Title,
Color: l.Color,
}
@ -271,16 +274,16 @@ func convertCommentHook(src *commentHook) (*scm.IssueCommentHook, error) {
namespace, _ := scm.Split(src.Project.PathWithNamespace)
dst := scm.IssueCommentHook{
Action: scm.ActionCreate,
Repo: scm.Repository{
ID: strconv.Itoa(src.Project.ID),
Namespace: namespace,
Name: src.Repository.Name,
Clone: src.Project.GitHTTPURL,
CloneSSH: src.Project.GitSSHURL,
Link: src.Project.WebURL,
Branch: src.Project.DefaultBranch,
Private: false, // TODO how do we correctly set Private vs Public?
Action: scm.ActionCreate,
Repo: scm.Repository{
ID: strconv.Itoa(src.Project.ID),
Namespace: namespace,
Name: src.Repository.Name,
Clone: src.Project.GitHTTPURL,
CloneSSH: src.Project.GitSSHURL,
Link: src.Project.WebURL,
Branch: src.Project.DefaultBranch,
Private: false, // TODO how do we correctly set Private vs Public?
},
Issue: issue,
Comment: comment,
@ -383,7 +386,7 @@ func convertPullRequestHook(src *pullRequestHook) *scm.PullRequestHook {
}
}
func parseTimeString(timeString string) (time.Time) {
func parseTimeString(timeString string) time.Time {
layout := "2006-01-02 15:04:05 UTC"
// Returns zero value of time in case of an error 0001-01-01 00:00:00 +0000 UTC
t, _ := time.Parse(layout, timeString)
@ -424,10 +427,10 @@ type (
HTTPURL string `json:"http_url"`
} `json:"project"`
Commits []struct {
ID string `json:"id"`
Message string `json:"message"`
Timestamp string `json:"timestamp"`
URL string `json:"url"`
ID string `json:"id"`
Message string `json:"message"`
Timestamp null.Time `json:"timestamp"`
URL string `json:"url"`
Author struct {
Name string `json:"name"`
Email string `json:"email"`
@ -471,7 +474,7 @@ type (
SSHURL string `json:"ssh_url"`
HTTPURL string `json:"http_url"`
} `json:"project"`
ObjectAttributes struct {
ObjectAttributes struct {
ID int `json:"id"`
Note string `json:"note"`
NoteableType string `json:"noteable_type"`
@ -496,13 +499,13 @@ type (
Type interface{} `json:"type"`
Description string `json:"description"`
} `json:"object_attributes"`
Repository struct {
Repository struct {
Name string `json:"name"`
URL string `json:"url"`
Description string `json:"description"`
Homepage string `json:"homepage"`
} `json:"repository"`
MergeRequest struct {
MergeRequest struct {
AssigneeID interface{} `json:"assignee_id"`
AuthorID int `json:"author_id"`
CreatedAt string `json:"created_at"`
@ -558,7 +561,7 @@ type (
SSHURL string `json:"ssh_url"`
HTTPURL string `json:"http_url"`
} `json:"source"`
Target struct {
Target struct {
ID int `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
@ -576,7 +579,7 @@ type (
SSHURL string `json:"ssh_url"`
HTTPURL string `json:"http_url"`
} `json:"target"`
LastCommit struct {
LastCommit struct {
ID string `json:"id"`
Message string `json:"message"`
Timestamp string `json:"timestamp"`
@ -586,7 +589,7 @@ type (
Email string `json:"email"`
} `json:"author"`
} `json:"last_commit"`
Labels []struct {
Labels []struct {
ID int `json:"id"`
Title string `json:"title"`
Color string `json:"color"`
@ -598,7 +601,6 @@ type (
Type string `json:"type"`
GroupID interface{} `json:"group_id"`
} `json:"labels"`
} `json:"merge_request"`
}

@ -16,7 +16,7 @@ type gitService struct {
client *wrapper
}
func (s *gitService) CreateBranch(ctx context.Context, repo string, params *scm.CreateBranch) (*scm.Response, error) {
func (s *gitService) CreateBranch(ctx context.Context, repo string, params *scm.ReferenceInput) (*scm.Response, error) {
return nil, scm.ErrNotSupported
}
@ -28,6 +28,15 @@ func (s *gitService) FindBranch(ctx context.Context, repo, name string) (*scm.Re
}
func (s *gitService) FindCommit(ctx context.Context, repo, ref string) (*scm.Commit, *scm.Response, error) {
// github and gitlab permit fetching a commit by sha
// or branch. This code emulates the github and gitlab
// behavior for gogs by fetching the commit sha for the
// branch and using in the subsequent API call.
if scm.IsHash(ref) == false {
if branch, _, err := s.FindBranch(ctx, repo, scm.TrimRef(ref)); err == nil {
ref = branch.Sha // replace ref with sha
}
}
path := fmt.Sprintf("api/v1/repos/%s/commits/%s", repo, ref)
out := new(commitDetail)
res, err := s.client.do(ctx, "GET", path, nil, out)

@ -44,6 +44,40 @@ func TestCommitFind(t *testing.T) {
}
}
func TestCommitFindBranch(t *testing.T) {
defer gock.Off()
gock.New("https://try.gogs.io").
Get("/api/v1/repos/gogits/gogs/branches/master").
Reply(200).
Type("application/json").
File("testdata/branch.json")
gock.New("https://try.gogs.io").
Get("/api/v1/repos/gogits/gogs/commits/f05f642b892d59a0a9ef6a31f6c905a24b5db13a").
Reply(200).
Type("application/json").
File("testdata/commits.json")
client, _ := New("https://try.gogs.io")
got, _, err := client.Git.FindCommit(
context.Background(),
"gogits/gogs",
"master",
)
if err != nil {
t.Error(err)
}
want := new(scm.Commit)
raw, _ := ioutil.ReadFile("testdata/commits.json.golden")
json.Unmarshal(raw, &want)
if diff := cmp.Diff(got, want); diff != "" {
t.Errorf("Unexpected Results")
t.Log(diff)
}
}
func TestCommitList(t *testing.T) {
client, _ := New("https://try.gogs.io")
_, _, err := client.Git.ListCommits(context.Background(), "gogits/gogs", scm.CommitListOptions{})

@ -19,7 +19,7 @@ type gitService struct {
client *wrapper
}
func (s *gitService) CreateBranch(ctx context.Context, repo string, params *scm.CreateBranch) (*scm.Response, error) {
func (s *gitService) CreateBranch(ctx context.Context, repo string, params *scm.ReferenceInput) (*scm.Response, error) {
namespace, repoName := scm.Split(repo)
path := fmt.Sprintf("rest/api/1.0/projects/%s/repos/%s/branches", namespace, repoName)
in := &createBranch{
@ -83,9 +83,9 @@ func (s *gitService) ListCommits(ctx context.Context, repo string, opts scm.Comm
namespace, name := scm.Split(repo)
var requestPath string
if opts.Path != "" {
requestPath = fmt.Sprintf("rest/api/1.0/projects/%s/repos/%s/commits?path=%s", namespace, name, opts.Path)
requestPath = fmt.Sprintf("rest/api/1.0/projects/%s/repos/%s/commits?until=%s&path=%s", namespace, name, opts.Ref, opts.Path)
} else {
requestPath = fmt.Sprintf("rest/api/1.0/projects/%s/repos/%s/commits", namespace, name)
requestPath = fmt.Sprintf("rest/api/1.0/projects/%s/repos/%s/commits?until=%s", namespace, name, opts.Ref)
}
out := new(commits)
res, err := s.client.do(ctx, "GET", requestPath, nil, out)

@ -98,6 +98,7 @@ func TestGitListCommits(t *testing.T) {
gock.New("http://example.com:7990").
Get("/rest/api/1.0/projects/PRJ/repos/my-repo/commits").
MatchParam("until", "").
Reply(200).
Type("application/json").
File("testdata/commits.json")
@ -238,7 +239,7 @@ func TestCreateBranch(t *testing.T) {
File("testdata/branch_create.json")
client, _ := New("http://example.com:7990")
params := &scm.CreateBranch{
params := &scm.ReferenceInput{
Name: "Hello",
Sha: "312797ba52425353dec56871a255e2a36fc96344",
}

@ -23,7 +23,7 @@ func TestCreateBranch(t *testing.T) {
}
commitId, _ := GetCurrentCommitOfBranch(client, "master")
input := &scm.CreateBranch{
input := &scm.ReferenceInput{
Name: "test_branch",
Sha: commitId,
}
@ -62,3 +62,57 @@ func TestGetLatestCommitOfBranch(t *testing.T) {
}
}
}
func TestGetLatestCommitOfNonDefaultBranch(t *testing.T) {
if token == "" {
t.Skip("Skipping, Acceptance test")
}
client, _ = stash.New(endpoint)
client.Client = &http.Client{
Transport: &transport.BasicAuth{
Username: username,
Password: token,
},
}
commits, response, err := client.Git.ListCommits(context.Background(), repoID, scm.CommitListOptions{Ref: "main", Path: "do-not-touch.txt"})
if err != nil {
t.Errorf("GetLatestCommitOfFile got an error %v", err)
} else {
if response.Status != http.StatusOK {
t.Errorf("GetLatestCommitOfFile did not get a 200 back %v", response.Status)
}
if commits[0].Sha != "76fb1762048a277596d3fa330b3da140cd12d361" {
t.Errorf("Got the commitId %s instead of the top commit of the file", commits[0].Sha)
}
}
}
func TestGetLatestCommitOfBranchWhenNoRefPassed(t *testing.T) {
if token == "" {
t.Skip("Skipping, Acceptance test")
}
client, _ = stash.New(endpoint)
client.Client = &http.Client{
Transport: &transport.BasicAuth{
Username: username,
Password: token,
},
}
commits, response, err := client.Git.ListCommits(context.Background(), repoID, scm.CommitListOptions{Path: "README"})
if err != nil {
t.Errorf("GetLatestCommitOfFile got an error %v", err)
} else {
if response.Status != http.StatusOK {
t.Errorf("GetLatestCommitOfFile did not get a 200 back %v", response.Status)
}
if commits[0].Sha != "2cc4dbe084f0d66761318b305c408cb0ea300c9a" {
t.Errorf("Got the commitId %s instead of the top commit of the file", commits[0].Sha)
}
}
}

@ -173,6 +173,12 @@ type pr struct {
Links struct {
Self []link `json:"self"`
} `json:"links"`
Properties struct {
MergeCommit struct {
ID string `json:"id"`
DisplayID string `json:"displayId"`
} `json:"mergeCommit"`
} `json:"properties"`
}
type prs struct {
@ -221,6 +227,7 @@ func convertPullRequest(from *pr) *scm.PullRequest {
Title: from.Title,
Body: from.Description,
Sha: from.FromRef.LatestCommit,
Merge: from.Properties.MergeCommit.ID,
Ref: fmt.Sprintf("refs/pull-requests/%d/from", from.ID),
Source: from.FromRef.DisplayID,
Target: from.ToRef.DisplayID,

@ -81,7 +81,7 @@ type hookInput struct {
URL string `json:"url"`
Active bool `json:"active"`
Config struct {
Secret string `json:"secret"`
Secret string `json:"secret,omitempty"`
} `json:"configuration"`
}

@ -18,6 +18,7 @@
"Title": "Develop",
"Body": "* added LICENSE\r\n* add COPYING file",
"Sha": "b9eaed50a03c073b20dfa82e5e753d295e7f0e56",
"Merge": "83f836ca538dc4f43d29fda46a5b85ea49f1b8e7",
"Ref": "refs/pull-requests/3/from",
"Source": "develop",
"Target": "master",

@ -13,16 +13,16 @@ import (
const EmptyCommit = "0000000000000000000000000000000000000000"
type (
// CreateBranch provides a SHA for creating a branch.
CreateBranch struct {
// Reference represents a git reference.
Reference struct {
Name string
Path string
Sha string
}
// Reference represents a git reference.
Reference struct {
// ReferenceInput provides a SHA for creating a reference.
ReferenceInput struct {
Name string
Path string
Sha string
}
@ -59,7 +59,7 @@ type (
// GitService provides access to git resources.
GitService interface {
// CreateBranch creates a git branch by name given a sha.
CreateBranch(ctx context.Context, repo string, params *CreateBranch) (*Response, error)
CreateBranch(ctx context.Context, repo string, params *ReferenceInput) (*Response, error)
// FindBranch finds a git branch by name.
FindBranch(ctx context.Context, repo, name string) (*Reference, *Response, error)
@ -88,4 +88,8 @@ type (
// return a 2-way or 3-way diff changeset.
CompareChanges(ctx context.Context, repo, source, target string, opts ListOptions) ([]*Change, *Response, error)
}
// CreateBranch is a type alias for upstream projects
// that use the previous CreateBranch type name.
CreateBranch = ReferenceInput
)

@ -24,6 +24,7 @@ type (
Diff string
Closed bool
Merged bool
Merge string
Base Reference
Head Reference
Author User

@ -115,6 +115,15 @@ type (
Task string
}
// ReleaseHook represents a release event. This is
// currently a GitHub-specific event type.
ReleaseHook struct {
Action Action
Release Release
Repo Repository
Sender User
}
// SecretFunc provides the Webhook parser with the
// secret key used to validate webhook authenticity.
SecretFunc func(webhook Webhook) (string, error)
@ -140,3 +149,4 @@ func (h *IssueCommentHook) Repository() Repository { return h.Repo }
func (h *PullRequestHook) Repository() Repository { return h.Repo }
func (h *PullRequestCommentHook) Repository() Repository { return h.Repo }
func (h *ReviewCommentHook) Repository() Repository { return h.Repo }
func (h *ReleaseHook) Repository() Repository { return h.Repo }

Loading…
Cancel
Save