Skip to content

Commit

Permalink
Merge branch 'master' into pr/14793
Browse files Browse the repository at this point in the history
  • Loading branch information
pinzart90 committed Feb 7, 2024
2 parents e822933 + d01e057 commit 9598a4f
Show file tree
Hide file tree
Showing 950 changed files with 281,378 additions and 20,312 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/Issues_workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
#Remove the " character in the issue title and replaced with -
- name: Remove conflicting chars
uses: frabert/replace-string-action@v2.4
uses: frabert/replace-string-action@v2.5
id: remove_quotations
with:
pattern: "\""
Expand Down Expand Up @@ -113,7 +113,7 @@ jobs:
- name: Remove conflicting chars
env:
ISSUE_BODY: ${{github.event.issue.body}}
uses: frabert/replace-string-action@v2.4
uses: frabert/replace-string-action@v2.5
id: remove_quotations
with:
pattern: "\""
Expand Down
16 changes: 9 additions & 7 deletions .github/workflows/build_dynamo_all_net8.0.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,16 +46,18 @@ jobs:
path: ${{ github.workspace }}\Dynamo\bin\AnyCPU\Release
if-no-files-found: warn
retention-days: 3
- name: Save Pull Request Artifact
env:
PR_NUMBER: ${{ github.event.number }}
save_pr_data:
name: Save PR Data
runs-on: ubuntu-latest
steps:
- name: Save PR Data
run: |
New-Item -Path ${{ github.workspace }}\pr -ItemType Directory -Force
$env:PR_NUMBER | Out-File -FilePath ${{ github.workspace }}\pr\pr_number.txt
- name: Upload Pull Request Artifact
mkdir -p ${{ github.workspace }}/pr
echo ${{ github.event.number }} > ${{ github.workspace }}/pr/pr_number.txt
- name: Upload PR Data
uses: actions/upload-artifact@v4
with:
name: pr_data
path: ${{ github.workspace }}\pr
path: ${{ github.workspace }}/pr
if-no-files-found: warn
retention-days: 3
2 changes: 1 addition & 1 deletion .github/workflows/check_file_size.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
uses: actions/checkout@v4
- name: Get changed files
id: get_changed_files
uses: tj-actions/changed-files@v41
uses: tj-actions/changed-files@v42
with:
write_output_files: true
- name: List changed files
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/dynamo_bin_diff.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
Write-Error "DynamoCLI.exe was not found!"
}
- name: Cache Current Build
uses: actions/cache/save@v3
uses: actions/cache/save@v4
with:
path: |
${{ github.workspace }}\Dynamo\bin\AnyCPU\Release
Expand Down Expand Up @@ -81,7 +81,7 @@ jobs:
Write-Error "DynamoCLI.exe was not found!"
}
- name: Cache Master Build
uses: actions/cache/save@v3
uses: actions/cache/save@v4
with:
path: ${{ github.workspace }}\master\bin\AnyCPU\Release
key: ${{ github.run_id }}-${{ github.run_attempt }}-master
Expand All @@ -91,15 +91,15 @@ jobs:
runs-on: windows-latest
steps:
- name: Restore Current Build
uses: actions/cache/restore@v3
uses: actions/cache/restore@v4
with:
fail-on-cache-miss: true
path: |
${{ github.workspace }}\Dynamo\bin\AnyCPU\Release
${{ github.workspace }}\Dynamo\.github\scripts
key: ${{ github.run_id }}-${{ github.run_attempt }}-current
- name: Restore Master Build
uses: actions/cache/restore@v3
uses: actions/cache/restore@v4
with:
fail-on-cache-miss: true
path: ${{ github.workspace }}\master\bin\AnyCPU\Release
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/dynamo_post_bin_diff.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
echo "DIFF=$(cat ${{ github.workspace }}/bin_diff_result/result.txt)" >> $GITHUB_OUTPUT
echo "TIMESTAMP=$(date +%Y-%m-%d-%H:%M:%S)" >> $GITHUB_OUTPUT
- name: Find Comment
uses: peter-evans/find-comment@v2
uses: peter-evans/find-comment@v3
id: find_comment
with:
issue-number: ${{ steps.set_details.outputs.PR_NUMBER }}
Expand All @@ -44,14 +44,14 @@ jobs:
direction: last
- name: Create comment
if: steps.find_comment.outputs.comment-id == '' && steps.set_details.outputs.DIFF != ''
uses: peter-evans/create-or-update-comment@v3
uses: peter-evans/create-or-update-comment@v4
with:
issue-number: ${{ steps.set_details.outputs.PR_NUMBER }}
body: |
${{ steps.set_details.outputs.DIFF }}
- name: Update comment
if: steps.find_comment.outputs.comment-id != '' && steps.set_details.outputs.DIFF != ''
uses: peter-evans/create-or-update-comment@v3
uses: peter-evans/create-or-update-comment@v4
with:
comment-id: ${{ steps.find_comment.outputs.comment-id }}
edit-mode: replace
Expand All @@ -60,7 +60,7 @@ jobs:
(♻️ Updated: ${{ steps.set_details.outputs.TIMESTAMP }})
- name: Update comment as resolved
if: steps.find_comment.outputs.comment-id != '' && steps.set_details.outputs.DIFF == ''
uses: peter-evans/create-or-update-comment@v3
uses: peter-evans/create-or-update-comment@v4
with:
comment-id: ${{ steps.find_comment.outputs.comment-id }}
edit-mode: replace
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/generate_changelog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
uses: actions/checkout@v4
- name: Generate changelog
id: generate_changelog
uses: metcalfc/changelog-generator@v4.2.0
uses: metcalfc/changelog-generator@v4.3.0
with:
myToken: ${{ secrets.GITHUB_TOKEN }}
head-ref: ${{ github.event.inputs.head-ref }}
Expand Down
98 changes: 0 additions & 98 deletions .github/workflows/issue_type_predicter.yaml

This file was deleted.

108 changes: 108 additions & 0 deletions .github/workflows/issue_type_predicter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
name: Issue Type Predicter
# This workflow uses https://github.com/DynamoDS/IssuesTypePredicter to predict the type of a github issue

on:
issues:
types: [opened, edited]

jobs:
issue_type_Predicter:
name: Issue Type Predicter
runs-on: ubuntu-latest
env:
# The 'analysis_response' variable is used to store the response returned by issue_analyzer.ps1
# The initial 'undefined' value will be overridden when the script runs
analysis_response: undefined
# The 'parsed_issue_body' variable is used to store the parsed issue body (after removing some sections of the body like Stack Trace)
parsed_issue_body: undefined
# The 'issue_json_string' variable is used to store parsed info of the issue body as a json string
issue_json_string: undefined
# The 'is_wish_list' variable is used to store the value returned by the IssuesTypePredicter project
is_wish_list: undefined
# issue template file name
template: "ISSUE_TEMPLATE.md"
# amount of sections from the template that can be missing information for the issue to still be considered valid
acceptable_missing_info: 1

steps:
# Checkout Dynamo repo
- name: Checkout Dynamo Repo
uses: actions/checkout@v4

# Removes quotes before using the issue content as a script parameter
- name: Remove Quotes
id: remove_quotes
uses: frabert/replace-string-action@v2.5
env:
ISSUE_BODY: ${{ github.event.issue.body }}
with:
pattern: "\""
string: ${{ env.ISSUE_BODY }}
replace-with: '-'

# Analyze for missing information inside the issue content
- name: Analyze Issue Body
env:
ISSUE_BODY: ${{ steps.remove_quotes.outputs.replaced }}
run: |
echo "analysis_response=$(pwsh .\\.github\\scripts\\issue_analyzer.ps1 "${{ env.template }}" "${{ env.acceptable_missing_info }}")" >> $GITHUB_ENV
# Remove sections in the issue body like "Dynamo version", "Stack Trace" because won't be used to predict the issue type
- name: Clean Issue Body
if: env.analysis_response == 'Valid'
env:
ISSUE_BODY_PARSED: ${{ steps.remove_quotes.outputs.replaced }}
run: |
echo "parsed_issue_body="$(pwsh .\\.github\\scripts\\issue_body_cleaner.ps1 )"" >> $GITHUB_ENV
# Create json string from the issue body
- name: Create Issue JSON String
if: env.analysis_response == 'Valid'
env:
ISSUE_NUMBER: ${{ github.event.issue.number }}
ISSUE_TITLE: ${{ github.event.issue.title }}
run: |
echo "issue_json_string="$(pwsh .\\.github\\scripts\\get_issue_json_body.ps1 "$ISSUE_NUMBER")"" >> $GITHUB_ENV
# Checkout the IssuesTypePredicter repo (https://github.com/DynamoDS/IssuesTypePredicter)
- name: Checkout IssuesTypePredicter Repo
if: env.analysis_response == 'Valid'
uses: actions/checkout@v4
with:
repository: DynamoDS/IssuesTypePredicter
path: IssuesTypePredicter

# Setup dotnet
- name: Setup dotnet
uses: actions/setup-dotnet@v4
with:
dotnet-version: '3.1.0'

# Build the solution IssuesTypePredicter.sln (this contains two VS2019 ML.NET projects)
- name: Build Issues Type Predicter
if: env.analysis_response == 'Valid'
run: |
dotnet build ./IssuesTypePredicter/IssuesTypePredicter.sln --configuration Release
cp ./IssuesTypePredicter/IssuesTypePredicterML.ConsoleApp/bin/Release/netcoreapp3.1/MLModel.zip .
# Execute the IssuesTypePredicter program and pass 'issue_json_string' as a parameter
- name: Run Issues Type Predicter
if: env.analysis_response == 'Valid'
run: |
echo "is_wish_list="$(dotnet run -p ./IssuesTypePredicter/IssuesTypePredicterML.ConsoleApp/IssuesTypePredicterML.ConsoleApp.csproj -v q "${{ env.issue_json_string }}")"" >> $GITHUB_ENV
# If the is_wish_list variable contains 1, label the issue as "Wishlist"
- name: Label issue as 'Wishlist'
if: env.analysis_response == 'Valid' && contains(env.is_wish_list, 'IsWishlist:1')
env:
GH_TOKEN: ${{ secrets.DYNAMO_ISSUES_TOKEN }}
run: |
gh issue edit ${{ github.event.issue.number }} --add-label "Wishlist" --repo ${{ github.repository }}
# If the issue is missing important information (don't follow the template structure), label the issue as "NotMLEvaluated"
- name: Label issue as 'NotMLEvaluated'
if: env.analysis_response != 'Valid' || env.issue_json_string == ''
env:
GH_TOKEN: ${{ secrets.DYNAMO_ISSUES_TOKEN }}
run: |
gh issue edit ${{ github.event.issue.number }} --add-label "NotMLEvaluated" --repo ${{ github.repository }}
31 changes: 26 additions & 5 deletions .github/workflows/ui_smoke_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
- name: Publish Test Report
id: test_report
if: always()
uses: dorny/test-reporter@v1.7.0
uses: dorny/test-reporter@v1.8.0
with:
name: ${{ env.CHECK_NAME }}
path: reports/report.xml
Expand All @@ -79,8 +79,9 @@ jobs:
})
"@
$run_summary | Out-File -FilePath $env:GITHUB_STEP_SUMMARY -Append
- name: Add Pull Request Comment
- name: Create Pull Request Comment
if: always()
id: create_comment
env:
GH_TOKEN: ${{ github.token }}
run: |
Expand All @@ -91,6 +92,26 @@ jobs:
Workflow Run: [${{ github.workflow }}](${{ format('{0}/{1}/actions/runs/{2}', github.server_url, github.repository, github.run_id) }})
Check: [$env:CHECK_NAME](${{ steps.test_report.outputs.url_html }})
"@
if ($env:PR_NUMBER) {
gh pr comment $env:PR_NUMBER --body $pr_comment --repo ${{ github.repository }}
}
$pr_comment | Out-File -FilePath pr_comment.md
- name: Find Comment
if: env.PR_NUMBER != ''
uses: peter-evans/find-comment@v3
id: find_comment
with:
issue-number: ${{ env.PR_NUMBER }}
comment-author: github-actions[bot]
body-includes: UI Smoke Tests
direction: last
- name: Create comment
if: env.PR_NUMBER != '' && steps.find_comment.outputs.comment-id == ''
uses: peter-evans/create-or-update-comment@v4
with:
issue-number: ${{ env.PR_NUMBER }}
body-path: pr_comment.md
- name: Update comment
if: env.PR_NUMBER != '' && steps.find_comment.outputs.comment-id != ''
uses: peter-evans/create-or-update-comment@v4
with:
comment-id: ${{ steps.find_comment.outputs.comment-id }}
edit-mode: replace
body-path: pr_comment.md
Loading

0 comments on commit 9598a4f

Please sign in to comment.