Skip to content

Commit

Permalink
PR Comments
Browse files Browse the repository at this point in the history
  • Loading branch information
kyle committed Oct 3, 2023
1 parent ca44362 commit c46f99b
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 27 deletions.
6 changes: 0 additions & 6 deletions .github/composite_actions/log_cw_metric/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ inputs:
job-status:
description: Used to determine if we track success or failure.
required: true
job-identifier:
description: For differentiating jobs of a run.
required: true
github-token:
required: true
description: Github token for requesting failing steps.
Expand All @@ -28,9 +25,6 @@ inputs:
category:
description: analytics, api, authenticator, etc.
required: true
workflow-name:
description: The Github Action workflow.yaml file name. ie "AmplifyCanaries".
required: true

# FlutterDart Workflows Metric Dimensions
framework:
Expand Down
8 changes: 3 additions & 5 deletions .github/composite_actions/log_cw_metric/dist/main.cjs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions .github/composite_actions/log_cw_metric/dist/main.cjs.map

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ runs:
uses: ./.github/composite_actions/log_cw_metric
with:
job-status: ${{ inputs.job-status }}
job-identifier: ${{ inputs.job-identifier }}
github-token: ${{ inputs.github-token }}

metric-name: "github_metric_1.0"
Expand Down
6 changes: 0 additions & 6 deletions actions/bin/log_cw_metric.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ inputs:
job-status:
description: Used to determine if we track success or failure.
required: true
job-identifier:
description: For differentiating jobs of a run.
required: true
github-token:
required: true
description: Github token for requesting failing steps.
Expand All @@ -28,9 +25,6 @@ inputs:
category:
description: analytics, api, authenticator, etc.
required: true
workflow-name:
description: The Github Action workflow.yaml file name. ie "AmplifyCanaries".
required: true

# FlutterDart Workflows Metric Dimensions
framework:
Expand Down
3 changes: 3 additions & 0 deletions actions/lib/src/githubJobs/github_jobs.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0

import 'package:json_annotation/json_annotation.dart';

part 'github_jobs.g.dart';
Expand Down
7 changes: 3 additions & 4 deletions actions/lib/src/node/actions/http_request.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// SPDX-License-Identifier: Apache-2.0

import 'dart:js_interop';
import 'dart:js_util';

@JS()
extension type HttpClient._(JSObject it) {
Expand All @@ -13,12 +12,12 @@ extension type HttpClient._(JSObject it) {
]);

@JS('getJson')
external JSPromise _getJson(String requestUrl, dynamic headers);
external JSPromise _getJson(String requestUrl, [JSObject headers]);

Future<Map<String, Object?>> getJson(String requestUrl, {
Map<String, String>? headers,
Map<String, String> headers = const {},
} ) async {
final jsHeaders = jsify(headers);
final jsHeaders = headers.jsify() as JSObject;
final response = await _getJson(requestUrl, jsHeaders).toDart;
final result = response as TypedResponse<JSObject>;
if (result.statusCode != 200) {
Expand Down

0 comments on commit c46f99b

Please sign in to comment.