Skip to content

Commit f559c19

Browse files
committed
Renaming to match existing convention
1 parent 7ead8d4 commit f559c19

3 files changed

Lines changed: 10 additions & 10 deletions

File tree

pkg/github/feature_flags.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@ const FeatureFlagIFCLabels = "ifc_labels"
1616
// and field_values enrichment in list_issues / search_issues output.
1717
const FeatureFlagIssueFields = "remote_mcp_issue_fields"
1818

19-
// FeatureFlagIssueFieldsUseUpdateIntent is the feature flag name for sending the
20-
// rationale and confidence on issue field mutations as a nested `update_intent`
19+
// FeatureFlagIssueFieldsUseIntent is the feature flag name for sending the
20+
// rationale and confidence on issue field mutations as a nested `intent`
2121
// object (IssueUpdateIntent) instead of as flat fields. It exists so the
2222
// set_issue_fields tool can switch payload shapes while the backend migrates
2323
// IssueFieldCreateOrUpdateInput from IssueEventRationale to IssueUpdateIntent.
24-
const FeatureFlagIssueFieldsUseUpdateIntent = "issue_fields_use_update_intent"
24+
const FeatureFlagIssueFieldsUseIntent = "issue_fields_use_intent"
2525

2626
// FeatureFlagFileBlame is the feature flag name for the get_file_blame tool,
2727
// which exposes git blame information for a file. It is gated so the extra tool

pkg/github/granular_tools_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2048,7 +2048,7 @@ func TestGranularSetIssueFields(t *testing.T) {
20482048
TextValue: githubv4.NewString(githubv4.String("hello")),
20492049
// rationale and confidence are nested under intent,
20502050
// while suggest stays a flat field.
2051-
UpdateIntent: &IssueUpdateIntentInput{
2051+
Intent: &IssueUpdateIntentInput{
20522052
Rationale: githubv4.NewString(githubv4.String("Reflects the reported severity")),
20532053
Confidence: &confidence,
20542054
},
@@ -2073,7 +2073,7 @@ func TestGranularSetIssueFields(t *testing.T) {
20732073
deps := BaseDeps{
20742074
GQLClient: gqlClient,
20752075
featureChecker: func(_ context.Context, flag string) (bool, error) {
2076-
return flag == FeatureFlagIssueFieldsUseUpdateIntent, nil
2076+
return flag == FeatureFlagIssueFieldsUseIntent, nil
20772077
},
20782078
}
20792079
serverTool := GranularSetIssueFields(translations.NullTranslationHelper)

pkg/github/issues_granular.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -917,10 +917,10 @@ type IssueFieldCreateOrUpdateInput struct {
917917
Rationale *githubv4.String `json:"rationale,omitempty"`
918918
Confidence *string `json:"confidence,omitempty"`
919919
Suggest *githubv4.Boolean `json:"suggest,omitempty"`
920-
// UpdateIntent bundles rationale and confidence into a single object. It is
920+
// Intent bundles rationale and confidence into a single object. It is
921921
// the successor to the flat Rationale/Confidence fields above and is only
922-
// sent when the FeatureFlagIssueFieldsUseUpdateIntent feature flag is enabled.
923-
UpdateIntent *IssueUpdateIntentInput `json:"intent,omitempty"`
922+
// sent when the FeatureFlagIssueFieldsUseIntent feature flag is enabled.
923+
Intent *IssueUpdateIntentInput `json:"intent,omitempty"`
924924
}
925925

926926
// IssueUpdateIntentInput is the nested input object that carries the rationale
@@ -1062,7 +1062,7 @@ func GranularSetIssueFields(t translations.TranslationHelperFunc) inventory.Serv
10621062
// `intent` object (IssueUpdateIntent). While that migration is in
10631063
// flight, gate the payload shape behind a feature flag so we can
10641064
// switch over without breaking the un-migrated schema.
1065-
useIntentInput := deps.IsFeatureEnabled(ctx, FeatureFlagIssueFieldsUseUpdateIntent)
1065+
useIntentInput := deps.IsFeatureEnabled(ctx, FeatureFlagIssueFieldsUseIntent)
10661066
for _, fieldMap := range fieldMaps {
10671067
fieldID, err := RequiredParam[string](fieldMap, "field_id")
10681068
if err != nil {
@@ -1145,7 +1145,7 @@ func GranularSetIssueFields(t translations.TranslationHelperFunc) inventory.Serv
11451145
// on the feature flag.
11461146
if useIntentInput {
11471147
if rationalePtr != nil || confidencePtr != nil {
1148-
input.UpdateIntent = &IssueUpdateIntentInput{
1148+
input.Intent = &IssueUpdateIntentInput{
11491149
Rationale: rationalePtr,
11501150
Confidence: confidencePtr,
11511151
}

0 commit comments

Comments
 (0)