From 3d34a3c6d6dfd7599e489b3c04fcf95a8a428434 Mon Sep 17 00:00:00 2001 From: Yashwanth Anantharaju Date: Mon, 21 Oct 2024 11:00:59 -0400 Subject: [PATCH] send action name for run service (#3520) * send action * format * comment * Delete .github/workflows/lint.yml --- .github/workflows/lint.yml | 24 ------------------------ src/Runner.Worker/ExecutionContext.cs | 1 + src/Sdk/RSWebApi/Contracts/StepResult.cs | 7 ++++++- 3 files changed, 7 insertions(+), 25 deletions(-) delete mode 100644 .github/workflows/lint.yml diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml deleted file mode 100644 index b35bee3c7d9..00000000000 --- a/.github/workflows/lint.yml +++ /dev/null @@ -1,24 +0,0 @@ -name: Lint - -on: - pull_request: - branches: [ main ] - -jobs: - build: - name: Lint - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v3 - with: - # Ensure full list of changed files within `super-linter` - fetch-depth: 0 - - name: Run linters - uses: github/super-linter@v4 - env: - DEFAULT_BRANCH: ${{ github.base_ref }} - EDITORCONFIG_FILE_NAME: .editorconfig - LINTER_RULES_PATH: /src/ - VALIDATE_ALL_CODEBASE: false - VALIDATE_CSHARP: true diff --git a/src/Runner.Worker/ExecutionContext.cs b/src/Runner.Worker/ExecutionContext.cs index 31a333b7c8b..dfe92523089 100644 --- a/src/Runner.Worker/ExecutionContext.cs +++ b/src/Runner.Worker/ExecutionContext.cs @@ -508,6 +508,7 @@ public TaskResult Complete(TaskResult? result = null, string currentOperation = Status = _record.State, Number = _record.Order, Name = _record.Name, + ActionName = StepTelemetry?.Action, Ref = StepTelemetry?.Ref, Type = StepTelemetry?.Type, StartedAt = _record.StartTime, diff --git a/src/Sdk/RSWebApi/Contracts/StepResult.cs b/src/Sdk/RSWebApi/Contracts/StepResult.cs index 85886f31f2b..300fb7741a7 100644 --- a/src/Sdk/RSWebApi/Contracts/StepResult.cs +++ b/src/Sdk/RSWebApi/Contracts/StepResult.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Runtime.Serialization; using System.Threading.Tasks; @@ -16,9 +16,14 @@ public class StepResult [DataMember(Name = "number", EmitDefaultValue = false)] public int? Number { get; set; } + // Example: "Run actions/checkout@v3" [DataMember(Name = "name", EmitDefaultValue = false)] public string Name { get; set; } + // Example: "actions/checkout" + [DataMember(Name = "action_name", EmitDefaultValue = false)] + public string ActionName { get; set; } + [DataMember(Name = "ref", EmitDefaultValue = false)] public string Ref { get; set; }