nebius/SWE-rebench-V2-PRs huggingface dataset:
Repository: ankitpokhrel/jira-cli
Pull request #58 (2021-01-08 15:08:52)

fix: Order by update when using "updated" filters


Patch:
diff --git a/internal/query/issue.go b/internal/query/issue.go
index 95479c0..60ea4a3 100644
--- a/internal/query/issue.go
+++ b/internal/query/issue.go
@@ -30,6 +30,10 @@ func NewIssue(project string, flags FlagParser) (*Issue, error) {
 // Get returns constructed jql query.
 func (i *Issue) Get() string {
 	q, obf := jql.NewJQL(i.Project), "created"
+	if (i.params.updated != "" || i.params.updatedBefore != "" || i.params.updatedAfter != "") &&
+		(i.params.created == "" && i.params.createdBefore == "" && i.params.createdAfter == "") {
+		obf = "updated"
+	}
 	q.And(func() {
 		if i.params.latest {
 			q.History()


Test patch:
diff --git a/internal/query/issue_test.go b/internal/query/issue_test.go
index eb784ec..3ca6a36 100644
--- a/internal/query/issue_test.go
+++ b/internal/query/issue_test.go
@@ -339,6 +339,44 @@ func TestIssueGet(t *testing.T) {
 				`AND component="test" AND createdDate>="2020-11-01" AND createdDate<"2020-11-02" AND updatedDate>="-10d" ` +
 				`ORDER BY lastViewed ASC`,
 		},
+		{
+			name: "created order gets priority over updated flag",
+			initialize: func() *Issue {
+				i, err := NewIssue("TEST", &issueFlagParser{
+					created:       "2020-11-01",
+					updated:       "-10d",
+					createdAfter:  "2020-12-01",
+					updatedBefore: "2020-12-31",
+					withCreated:   true,
+					withUpdated:   true,
+					noHistory:     true,
+				})
+				assert.NoError(t, err)
+				return i
+			},
+			expected: `project="TEST" AND issue IN watchedIssues() AND type="test" AND resolution="test" ` +
+				`AND status="test" AND priority="test" AND reporter="test" AND assignee="test" AND component="test" ` +
+				`AND createdDate>="2020-11-01" AND createdDate<"2020-11-02" AND updatedDate>="-10d" ` +
+				`ORDER BY created ASC`,
+		},
+		{
+			name: "it orders by updated if only updated flags are present",
+			initialize: func() *Issue {
+				i, err := NewIssue("TEST", &issueFlagParser{
+					updatedAfter:  "2020-11-31",
+					updatedBefore: "2020-12-31",
+					withCreated:   false,
+					withUpdated:   true,
+					noHistory:     true,
+				})
+				assert.NoError(t, err)
+				return i
+			},
+			expected: `project="TEST" AND issue IN watchedIssues() AND type="test" AND resolution="test" ` +
+				`AND status="test" AND priority="test" AND reporter="test" AND assignee="test" AND component="test" ` +
+				`AND updatedDate>"2020-11-31" AND updatedDate<"2020-12-31" ` +
+				`ORDER BY updated ASC`,
+		},
 	}
 
 	for _, tc := range cases {
Repository: ankitpokhrel/jira-cli
Pull request #141 (2021-09-12 14:39:09)

feat: Support link cmd for on-premise jira installation


Patch:
diff --git a/pkg/jira/issue.go b/pkg/jira/issue.go
index edd5e15..e61562c 100644
--- a/pkg/jira/issue.go
+++ b/pkg/jira/issue.go
@@ -109,7 +109,7 @@ func (c *Client) AssignIssue(key, accountID string) error {
 
 // GetIssueLinkTypes fetches issue link types using GET /issueLinkType endpoint.
 func (c *Client) GetIssueLinkTypes() ([]*IssueLinkType, error) {
-	res, err := c.Get(context.Background(), "/issueLinkType", nil)
+	res, err := c.GetV2(context.Background(), "/issueLinkType", nil)
 	if err != nil {
 		return nil, err
 	}


Test patch:
diff --git a/pkg/jira/issue_test.go b/pkg/jira/issue_test.go
index 09fb662..e7c8d96 100644
--- a/pkg/jira/issue_test.go
+++ b/pkg/jira/issue_test.go
@@ -224,7 +224,7 @@ func TestGetIssueLinkTypes(t *testing.T) {
 	var unexpectedStatusCode bool
 
 	server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
-		assert.Equal(t, "/rest/api/3/issueLinkType", r.URL.Path)
+		assert.Equal(t, "/rest/api/2/issueLinkType", r.URL.Path)
 
 		if unexpectedStatusCode {
 			w.WriteHeader(400)
Repository: VeryGoodOpenSource/very_good_cli
Pull request #1201 (2024-12-02 14:21:15)

chore: update subscribe URL
## Status

**READY**

## Description

Marketing team is making some path changes on the website and asked for this change. Current URL is still working and redirecting to the new one for a period of time so nothing is broken but need to get this deployed soon so they can take down the old route.

## Type of Change

<!--- Put an `x` in all the boxes that apply: -->

- [ ] ✨ New feature (non-breaking change which adds functionality)
- [ ] 🛠️ Bug fix (non-breaking change which fixes an issue)
- [ ] ❌ Breaking change (fix or feature that would cause existing functionality to change)
- [ ] 🧹 Code refactor
- [ ] ✅ Build configuration change
- [ ] 📝 Documentation
- [x] 🗑️ Chore



Patch:
diff --git a/lib/src/command_runner.dart b/lib/src/command_runner.dart
index b3f013e..b9e6dbc 100644
--- a/lib/src/command_runner.dart
+++ b/lib/src/command_runner.dart
@@ -163,7 +163,7 @@ Run ${lightCyan.wrap('very_good update')} to update''',
       lightMagenta.wrap('''
 
 Thank you for using Very Good Ventures open source tools!
-Don't forget to fill out this form to get information on future updates and releases here: ${lightBlue.wrap(link(uri: Uri.parse('https://verygood.ventures/open-source/cli/subscribe-latest-tool-updates')))}'''),
+Don't forget to fill out this form to get information on future updates and releases here: ${lightBlue.wrap(link(uri: Uri.parse('https://verygood.ventures/dev/tools/cli/subscribe')))}'''),
       print: _logger.info,
     );
   }


Test patch:
diff --git a/test/src/command_runner_test.dart b/test/src/command_runner_test.dart
index dff8dcc..5c207b3 100644
--- a/test/src/command_runner_test.dart
+++ b/test/src/command_runner_test.dart
@@ -224,7 +224,7 @@ void main() {
                 () => logger.info(
                       any(
                         that: contains(
-                          'https://verygood.ventures/open-source/cli/subscribe-latest-tool-updates',
+                          'https://verygood.ventures/dev/tools/cli/subscribe',
                         ),
                       ),
                     ),
Repository: aquasecurity/tfsec
Pull request #1204 (2021-12-25 10:31:06)

add support for moved blocks tf 1.1.0+
Fix to add support for the new moved blocks
see https://github.com/aquasecurity/tfsec/issues/1192

CLAassistant: [![CLA assistant check](https://cla-assistant.io/pull/badge/not_signed)](https://cla-assistant.io/aquasecurity/tfsec?pullRequest=1204) <br/>Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our [Contributor License Agreement](https://cla-assistant.io/aquasecurity/tfsec?pullRequest=1204) before we can accept your contribution.<br/><sub>You have signed the CLA already but the status is still pending? Let us [recheck](https://cla-assistant.io/check/aquasecurity/tfsec?pullRequest=1204) it.</sub>

Patch:
diff --git a/internal/app/tfsec/block/type.go b/internal/app/tfsec/block/type.go
index 05ee86f26..6c0fb7987 100644
--- a/internal/app/tfsec/block/type.go
+++ b/internal/app/tfsec/block/type.go
@@ -38,6 +38,10 @@ var TypeLocal = Type{
 	refName: "local",
 }
 
+var TypeMoved = Type{
+	name: "moved",
+}
+
 var TypeProvider = Type{
 	name: "provider",
 }
@@ -58,6 +62,7 @@ var ValidTypes = []Type{
 	TypeData,
 	TypeLocal,
 	TypeModule,
+	TypeMoved,
 	TypeOutput,
 	TypeProvider,
 	TypeResource,
diff --git a/internal/app/tfsec/parser/evaluator.go b/internal/app/tfsec/parser/evaluator.go
index 89d918fd3..a12bffedb 100644
--- a/internal/app/tfsec/parser/evaluator.go
+++ b/internal/app/tfsec/parser/evaluator.go
@@ -399,7 +399,7 @@ func (e *Evaluator) getValuesByBlockType(blockType string) cty.Value {
 				continue
 			}
 			values[b.Label()] = val
-		case "locals":
+		case "locals", "moved":
 			for key, val := range b.Values().AsValueMap() {
 				values[key] = val
 			}
diff --git a/internal/app/tfsec/schema/schema.go b/internal/app/tfsec/schema/schema.go
index 2f8d3023a..9920a7a15 100644
--- a/internal/app/tfsec/schema/schema.go
+++ b/internal/app/tfsec/schema/schema.go
@@ -19,6 +19,9 @@ var TerraformSchema_0_12 = &hcl.BodySchema{
 		{
 			Type: "locals",
 		},
+		{
+			Type: "moved",
+		},
 		{
 			Type:       "output",
 			LabelNames: []string{"name"},


Test patch:
diff --git a/internal/app/tfsec/parser/parser_test.go b/internal/app/tfsec/parser/parser_test.go
index b7cb16484..316d7c503 100644
--- a/internal/app/tfsec/parser/parser_test.go
+++ b/internal/app/tfsec/parser/parser_test.go
@@ -32,6 +32,10 @@ provider "cats" {
 
 }
 
+moved {
+
+}
+
 resource "cats_cat" "mittens" {
 	name = "mittens"
 	special = true
Repository: aquasecurity/tfsec
Pull request #1332 (2022-01-14 15:40:19)

Respect google firewall default ranges


Patch:
diff --git a/internal/app/tfsec/adapter/google/compute/networks.go b/internal/app/tfsec/adapter/google/compute/networks.go
index 9039350f4..7630cfc42 100644
--- a/internal/app/tfsec/adapter/google/compute/networks.go
+++ b/internal/app/tfsec/adapter/google/compute/networks.go
@@ -154,6 +154,9 @@ func adaptFirewallRule(firewall *compute.Firewall, firewallBlock, ruleBlock bloc
 				destinations = append(destinations, types.String(destination, destinationAttr.Metadata()))
 			}
 		}
+		if len(destinations) == 0 {
+			destinations = append(destinations, types.StringDefault("0.0.0.0/0", firewallBlock.Metadata()))
+		}
 		firewall.EgressRules = append(firewall.EgressRules, compute.EgressRule{
 			Metadata:          firewallBlock.Metadata(),
 			FirewallRule:      rule,
@@ -166,6 +169,9 @@ func adaptFirewallRule(firewall *compute.Firewall, firewallBlock, ruleBlock bloc
 				sources = append(sources, types.String(source, sourceAttr.Metadata()))
 			}
 		}
+		if len(sources) == 0 {
+			sources = append(sources, types.StringDefault("0.0.0.0/0", firewallBlock.Metadata()))
+		}
 		firewall.IngressRules = append(firewall.IngressRules, compute.IngressRule{
 			Metadata:     firewallBlock.Metadata(),
 			FirewallRule: rule,


Test patch:
diff --git a/internal/app/tfsec/rules/google/compute/no_public_egress_rule_test.go b/internal/app/tfsec/rules/google/compute/no_public_egress_rule_test.go
index f77735108..5aee2f0e1 100644
--- a/internal/app/tfsec/rules/google/compute/no_public_egress_rule_test.go
+++ b/internal/app/tfsec/rules/google/compute/no_public_egress_rule_test.go
@@ -24,6 +24,18 @@ func Test_GoogleOpenOutboundFirewallRule(t *testing.T) {
       protocol = "tcp"
     }
  	destination_ranges = ["0.0.0.0/0"]
+ }`,
+			mustIncludeResultCode: expectedCode,
+		},
+		{
+			name: "check google_compute_firewall egress on default destinations",
+			source: `
+ resource "google_compute_firewall" "my-firewall" {
+    direction = "EGRESS"
+    allow {
+      protocol = "tcp"
+    }
+ 	destination_ranges = []
  }`,
 			mustIncludeResultCode: expectedCode,
 		},
diff --git a/internal/app/tfsec/rules/google/compute/no_public_ingress_rule_test.go b/internal/app/tfsec/rules/google/compute/no_public_ingress_rule_test.go
index b85703b07..8287866a2 100644
--- a/internal/app/tfsec/rules/google/compute/no_public_ingress_rule_test.go
+++ b/internal/app/tfsec/rules/google/compute/no_public_ingress_rule_test.go
@@ -23,6 +23,17 @@ func Test_GoogleOpenInboundFirewallRule(t *testing.T) {
         protocol = "tcp"
     }
  	source_ranges = ["0.0.0.0/0"]
+ }`,
+			mustIncludeResultCode: expectedCode,
+		},
+		{
+			name: "check google_compute_firewall ingress on default sources",
+			source: `
+ resource "google_compute_firewall" "my-firewall" {
+    allow {
+        protocol = "tcp"
+    }
+ 	source_ranges = []
  }`,
 			mustIncludeResultCode: expectedCode,
 		},