nebius/SWE-rebench-V2-PRs huggingface dataset:
Repository: ctreminiom/go-atlassian
Pull request #165 (2022-11-10 06:19:38)

:bug: Fixed the Filter.Change() method


Patch:
diff --git a/jira/internal/filter_impl.go b/jira/internal/filter_impl.go
index 5662f72..740984f 100644
--- a/jira/internal/filter_impl.go
+++ b/jira/internal/filter_impl.go
@@ -276,7 +276,7 @@ func (i *internalFilterServiceImpl) Change(ctx context.Context, filterId int, ac
 		AccountID: accountId,
 	}
 
-	reader, err := i.c.TransformStructToReader(payload)
+	reader, err := i.c.TransformStructToReader(&payload)
 	if err != nil {
 		return nil, err
 	}


Test patch:
diff --git a/jira/internal/filter_impl_test.go b/jira/internal/filter_impl_test.go
index 813dd28..bf353a3 100644
--- a/jira/internal/filter_impl_test.go
+++ b/jira/internal/filter_impl_test.go
@@ -1093,7 +1093,7 @@ func TestFilterService_Change(t *testing.T) {
 				client := mocks.NewClient(t)
 
 				client.On("TransformStructToReader",
-					struct {
+					&struct {
 						AccountID string "json:\"accountId\""
 					}{AccountID: "account-id-sample"}).
 					Return(bytes.NewReader([]byte{}), nil)
@@ -1128,7 +1128,7 @@ func TestFilterService_Change(t *testing.T) {
 				client := mocks.NewClient(t)
 
 				client.On("TransformStructToReader",
-					struct {
+					&struct {
 						AccountID string "json:\"accountId\""
 					}{AccountID: "account-id-sample"}).
 					Return(bytes.NewReader([]byte{}), nil)
@@ -1163,7 +1163,7 @@ func TestFilterService_Change(t *testing.T) {
 				client := mocks.NewClient(t)
 
 				client.On("TransformStructToReader",
-					struct {
+					&struct {
 						AccountID string "json:\"accountId\""
 					}{AccountID: "account-id-sample"}).
 					Return(bytes.NewReader([]byte{}), nil)
Repository: ctreminiom/go-atlassian
Pull request #182 (2023-03-31 12:50:23)

Added the expand option to the internalSearch implementation for content
# Background
The internal content search implementation currently does not propagate the "expand" option to the underlying query. This does not allow the user to pass that parameter in.

I adjusted the appropriate tests.


Patch:
diff --git a/confluence/internal/search_impl.go b/confluence/internal/search_impl.go
index 2bcff00..9f8667e 100644
--- a/confluence/internal/search_impl.go
+++ b/confluence/internal/search_impl.go
@@ -99,6 +99,12 @@ func (i *internalSearchImpl) Content(ctx context.Context, cql string, options *m
 		if options.SitePermissionTypeFilter != "" {
 			query.Add("sitePermissionTypeFilter", options.SitePermissionTypeFilter)
 		}
+
+		if len(options.Expand) > 0 {
+			for _, value := range options.Expand {
+				query.Add("expand", value)
+			}
+		}
 	}
 
 	endpoint := fmt.Sprintf("wiki/rest/api/search?%v", query.Encode())


Test patch:
diff --git a/confluence/internal/search_impl_test.go b/confluence/internal/search_impl_test.go
index f0a64d8..415d2c7 100644
--- a/confluence/internal/search_impl_test.go
+++ b/confluence/internal/search_impl_test.go
@@ -57,7 +57,7 @@ func Test_internalSearchImpl_Content(t *testing.T) {
 				client.On("NewRequest",
 					context.Background(),
 					http.MethodGet,
-					"wiki/rest/api/search?cql=type%3Dpage&cqlcontext=spaceKey&cursor=raNDoMsTRiNg&excerpt=indexed&excludeCurrentSpaces=true&includeArchivedSpaces=true&limit=20&next=true&prev=true&sitePermissionTypeFilter=externalCollaborator&start=10",
+					"wiki/rest/api/search?cql=type%3Dpage&cqlcontext=spaceKey&cursor=raNDoMsTRiNg&excerpt=indexed&excludeCurrentSpaces=true&expand=space&includeArchivedSpaces=true&limit=20&next=true&prev=true&sitePermissionTypeFilter=externalCollaborator&start=10",
 					nil).
 					Return(&http.Request{}, nil)
 
@@ -97,7 +97,7 @@ func Test_internalSearchImpl_Content(t *testing.T) {
 				client.On("NewRequest",
 					context.Background(),
 					http.MethodGet,
-					"wiki/rest/api/search?cql=type%3Dpage&cqlcontext=spaceKey&cursor=raNDoMsTRiNg&excerpt=indexed&excludeCurrentSpaces=true&includeArchivedSpaces=true&limit=20&next=true&prev=true&sitePermissionTypeFilter=externalCollaborator&start=10",
+					"wiki/rest/api/search?cql=type%3Dpage&cqlcontext=spaceKey&cursor=raNDoMsTRiNg&excerpt=indexed&excludeCurrentSpaces=true&expand=space&includeArchivedSpaces=true&limit=20&next=true&prev=true&sitePermissionTypeFilter=externalCollaborator&start=10",
 					nil).
 					Return(&http.Request{}, errors.New("error, unable to create the http request"))
Repository: gembaadvantage/uplift
Pull request #91 (2022-02-04 05:33:28)

feat: changelog sort order can be set through config


Patch:
diff --git a/README.md b/README.md
index bfedccb..8b02226 100644
--- a/README.md
+++ b/README.md
@@ -28,7 +28,8 @@ brew install uplift
 To use [Fish](https://gofi.sh/):
 
 ```sh
-gofish install uplift
+gofish rig add https://github.com/gembaadvantage/fish-food
+gofish install github.com/gembaadvantage/fish-food/uplift
 ```
 
 ### Scoop
diff --git a/cmd/uplift/changelog.go b/cmd/uplift/changelog.go
index d47fa47..f267732 100644
--- a/cmd/uplift/changelog.go
+++ b/cmd/uplift/changelog.go
@@ -89,7 +89,7 @@ func newChangelogCmd(gopts *globalOptions, out io.Writer) *changelogCommand {
 	f.BoolVar(&chglogCmd.Opts.DiffOnly, "diff-only", false, "output the changelog diff only")
 	f.BoolVar(&chglogCmd.Opts.All, "all", false, "generate a changelog from the entire history of this repository")
 	f.StringSliceVar(&chglogCmd.Opts.Exclude, "exclude", []string{}, "a list of conventional commit prefixes to exclude")
-	f.StringVar(&chglogCmd.Opts.Sort, "sort", "desc", "the sort order of commits within each changelog entry")
+	f.StringVar(&chglogCmd.Opts.Sort, "sort", "", "the sort order of commits within each changelog entry")
 
 	chglogCmd.Cmd = cmd
 	return chglogCmd
@@ -145,7 +145,13 @@ func setupChangelogContext(opts changelogOptions, out io.Writer) (*context.Conte
 	ctx.NoPush = opts.NoPush
 	ctx.ChangelogDiff = opts.DiffOnly
 	ctx.ChangelogAll = opts.All
+
+	// Sort order provided as a command-line flag takes precedence
 	ctx.ChangelogSort = opts.Sort
+	if ctx.ChangelogSort == "" {
+		ctx.ChangelogSort = cfg.Changelog.Sort
+	}
+
 	ctx.Out = out
 
 	// Merge config and command line arguments together


Test patch:
diff --git a/cmd/uplift/changelog_test.go b/cmd/uplift/changelog_test.go
index ba1af63..6f4ec3c 100644
--- a/cmd/uplift/changelog_test.go
+++ b/cmd/uplift/changelog_test.go
@@ -198,7 +198,7 @@ func TestChangelog_SortOrder(t *testing.T) {
 	}
 }
 
-func TestChangelog_SortDescByDefault(t *testing.T) {
+func TestChangelog_SortEmptyByDefault(t *testing.T) {
 	taggedRepo(t)
 
 	chglogCmd := newChangelogCmd(&globalOptions{}, os.Stdout)
@@ -206,7 +206,7 @@ func TestChangelog_SortDescByDefault(t *testing.T) {
 	require.NoError(t, err)
 
 	assert.True(t, changelogExists(t))
-	assert.Equal(t, "desc", chglogCmd.Opts.Sort)
+	assert.Equal(t, "", chglogCmd.Opts.Sort)
 }
 
 func changelogExists(t *testing.T) bool {