Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
SergeevDmitry committed Oct 29, 2024
2 parents 80332b6 + e0f9044 commit 3cfb1bb
Show file tree
Hide file tree
Showing 424 changed files with 18,012 additions and 6,681 deletions.
41 changes: 41 additions & 0 deletions .github/ISSUE_TEMPLATE/automated_testing.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: 🤖 Automated Testing Improvement
description: Suggest an enhancement or report an issue related to automated testing.
title: "[Automated Testing]: "
labels: ["automated testing"]

body:
- type: textarea
id: description
attributes:
label: "Issue/Improvement Description"
description: "Briefly describe the issue or improvement related to automated testing."
placeholder: "Provide a short summary of the testing issue or enhancement."
validations:
required: true

- type: input
id: scope
attributes:
label: "Testing Scope"
description: "Specify the type of tests affected (e.g., unit, integration, e2e)."
placeholder: "e.g., Unit tests, Integration tests"
validations:
required: true

- type: textarea
id: solution
attributes:
label: "Suggested Solution"
description: "Provide a brief suggestion for improving the testing process."
placeholder: "Describe the proposed solution."
validations:
required: false

- type: textarea
id: context
attributes:
label: "Additional Context"
description: "Add any extra information or related issues."
placeholder: "e.g., Related issues, screenshots."
validations:
required: false
10 changes: 6 additions & 4 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,14 @@ body:
value: |
Thank you for taking the time to fill out this bug report for Stereum!
- type: input
- type: dropdown
id: environment
attributes:
label: Environment
description: In which environment did you encounter the bug (e.g., development, staging, production)?
placeholder: Enter the environment here
label: "Environment"
description: "Select the environment where the issue occurs"
options:
- "Development"
- "Release"
validations:
required: true

Expand Down
14 changes: 11 additions & 3 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,21 @@ contact_links:
issue_templates:
- name: 🪳 Bug Report
about: Report a bug to help us improve. Describe the issue in detail, including steps to reproduce if possible.
template: bug_report.md
file: "bug_report.yml"
labels: ["bug"]
- name: 🍄 Enhancement Request
about: Suggest a new feature or improvement. Describe the enhancement and its potential benefits.
template: enhancement_request.md
file: "enhancement_request.yml"
labels: ["enhancement"]
- name: 🔌 Service Integration
about: Propose a new service integration. Describe the service, how it integrates, and the value it adds to the project.
template: service_integration.md
file: "service_integration.yml"
labels: ["integration"]
- name: "🛠️ Refactor"
description: "Propose a refactor to the existing codebase."
labels: ["refactor"]
file: "refactor.yml"
- name: 🤖 Automated Testing Improvement
about: Suggest an enhancement or report an issue related to automated testing.
file: "automated_testing.yml"
labels: ["enhancement", "automated testing"]
33 changes: 33 additions & 0 deletions .github/ISSUE_TEMPLATE/refactor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: 🛠️ Refactor
description: Suggest a code refactoring task aimed at improving code without altering functionality
title: "[Refactor]: "
labels: ["refactor"]
body:
- type: textarea
id: description
attributes:
label: "Refactor Description"
description: "Describe the refactoring task and its benefits"
placeholder: "Provide a detailed description of the refactor"
validations:
required: true

- type: textarea
id: reason
attributes:
label: "Reason for Refactor"
description: "Explain why this refactor is necessary"
placeholder: "State the reason for refactoring (e.g., code readability, performance)"
validations:
required: true

- type: textarea
id: potential_risks
attributes:
label: "Potential Risks"
description: "Describe any potential risks associated with this refactor"
validations:
required: false

labels:
- refactor
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/service_integration.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: 🔌 Service Integration
description: Make a suggestion for a new service integration
title: "[FR]: "
title: "[Service Integration]: "
labels: ["service integration"]
body:
- type: markdown
Expand Down
175 changes: 175 additions & 0 deletions .github/workflows/add_issue_to_project_task_board.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,175 @@
name: 💼 Add Issue to Project Task Board

on:
issues:
types:
- opened

jobs:
track_issue:
runs-on: ubuntu-latest
steps:
- name: Get project data
env:
GH_TOKEN: ${{ secrets.PUSH_TO_PROJECT }}
run: |
gh api graphql -f query='
query($owner: String!, $repo: String!) {
repository(owner: $owner, name: $repo) {
projectV2(number: 24) {
id
fields(first: 20) {
nodes {
... on ProjectV2Field {
id
name
}
... on ProjectV2SingleSelectField {
id
name
options {
id
name
}
}
}
}
}
}
}' -f owner=${{ github.repository_owner }} -f repo=${{ github.event.repository.name }} > project_data.json
PROJECT_ID=$(jq -r '.data.repository.projectV2.id' project_data.json)
STATUS_FIELD_ID=$(jq -r '.data.repository.projectV2.fields.nodes[] | select(.name == "Status") | .id' project_data.json)
BACKLOG_OPTION_ID=$(jq -r '.data.repository.projectV2.fields.nodes[] | select(.name == "Status") | .options[] | select(.name == "BackLog") | .id' project_data.json)
DEPARTMENT_FIELD_ID=$(jq -r '.data.repository.projectV2.fields.nodes[] | select(.name == "Department") | .id' project_data.json)
MAIN_TASK_FIELD_ID=$(jq -r '.data.repository.projectV2.fields.nodes[] | select(.name == "Main Task ID") | .id' project_data.json)
SUB_TASK_FIELD_ID=$(jq -r '.data.repository.projectV2.fields.nodes[] | select(.name == "Sub Task ID") | .id' project_data.json)
CREATION_DATE_FIELD_ID=$(jq -r '.data.repository.projectV2.fields.nodes[] | select(.name == "Creation Date") | .id' project_data.json)
PRIORITY_FIELD_ID=$(jq -r '.data.repository.projectV2.fields.nodes[] | select(.name == "Priority") | .id' project_data.json)
SET_PRIORITY_OPTION_ID=$(jq -r '.data.repository.projectV2.fields.nodes[] | select(.name == "Priority") | .options[] | select(.name == "Set A Priority!") | .id' project_data.json)
DEPARTMENT_OPTION_ID=$(jq -r '.data.repository.projectV2.fields.nodes[] | select(.name == "Department") | .options[] | select(.name == "Development") | .id' project_data.json)
echo "PROJECT_ID=$PROJECT_ID" >> $GITHUB_ENV
echo "STATUS_FIELD_ID=$STATUS_FIELD_ID" >> $GITHUB_ENV
echo "BACKLOG_OPTION_ID=$BACKLOG_OPTION_ID" >> $GITHUB_ENV
echo "DEPARTMENT_FIELD_ID=$DEPARTMENT_FIELD_ID" >> $GITHUB_ENV
echo "MAIN_TASK_FIELD_ID=$MAIN_TASK_FIELD_ID" >> $GITHUB_ENV
echo "SUB_TASK_FIELD_ID=$SUB_TASK_FIELD_ID" >> $GITHUB_ENV
echo "CREATION_DATE_FIELD_ID=$CREATION_DATE_FIELD_ID" >> $GITHUB_ENV
echo "PRIORITY_FIELD_ID=$PRIORITY_FIELD_ID" >> $GITHUB_ENV
echo "SET_PRIORITY_OPTION_ID=$SET_PRIORITY_OPTION_ID" >> $GITHUB_ENV
echo "DEPARTMENT_OPTION_ID=$DEPARTMENT_OPTION_ID" >> $GITHUB_ENV
- name: Add issue to project
env:
GH_TOKEN: ${{ secrets.PUSH_TO_PROJECT }}
ISSUE_ID: ${{ github.event.issue.node_id }}
PROJECT_ID: ${{ env.PROJECT_ID }}
run: |
project_item_id=$(gh api graphql -f query='
mutation($project: ID!, $issue: ID!) {
addProjectV2ItemById(input: {projectId: $project, contentId: $issue}) {
item {
id
}
}
}' -f project=$PROJECT_ID -f issue=$ISSUE_ID --jq '.data.addProjectV2ItemById.item.id')
echo "PROJECT_ITEM_ID=$project_item_id" >> $GITHUB_ENV
- name: Update project item fields
env:
GH_TOKEN: ${{ secrets.PUSH_TO_PROJECT }}
PROJECT_ID: ${{ env.PROJECT_ID }}
PROJECT_ITEM_ID: ${{ env.PROJECT_ITEM_ID }}
DEPARTMENT_FIELD_ID: ${{ env.DEPARTMENT_FIELD_ID }}
DEPARTMENT_OPTION_ID: ${{ env.DEPARTMENT_OPTION_ID }}
MAIN_TASK_FIELD_ID: ${{ env.MAIN_TASK_FIELD_ID }}
SUB_TASK_FIELD_ID: ${{ env.SUB_TASK_FIELD_ID }}
BACKLOG_OPTION_ID: ${{ env.BACKLOG_OPTION_ID }}
STATUS_FIELD_ID: ${{ env.STATUS_FIELD_ID }}
CREATION_DATE_FIELD_ID: ${{ env.CREATION_DATE_FIELD_ID }}
PRIORITY_FIELD_ID: ${{ env.PRIORITY_FIELD_ID }}
SET_PRIORITY_OPTION_ID: ${{ env.SET_PRIORITY_OPTION_ID }}
run: |
if [ -n "$DEPARTMENT_FIELD_ID" ] && [ -n "$DEPARTMENT_OPTION_ID" ]; then
gh api graphql -f query='
mutation($projectId: ID!, $projectItemId: ID!, $fieldId: ID!, $value: String!) {
updateProjectV2ItemFieldValue(input: {projectId: $projectId, itemId: $projectItemId, fieldId: $fieldId, value: {singleSelectOptionId: $value}}) {
projectV2Item {
id
}
}
}' -f projectId=$PROJECT_ID -f projectItemId=$PROJECT_ITEM_ID -f fieldId=$DEPARTMENT_FIELD_ID -f value=$DEPARTMENT_OPTION_ID
fi
if [ -n "$MAIN_TASK_FIELD_ID" ]; then
gh api graphql -f query='
mutation($projectId: ID!, $projectItemId: ID!, $fieldId: ID!, $value: String!) {
updateProjectV2ItemFieldValue(input: {projectId: $projectId, itemId: $projectItemId, fieldId: $fieldId, value: {text: $value}}) {
projectV2Item {
id
}
}
}' -f projectId=$PROJECT_ID -f projectItemId=$PROJECT_ITEM_ID -f fieldId=$MAIN_TASK_FIELD_ID -f value="Development - Stereum"
fi
if [ -n "$SUB_TASK_FIELD_ID" ]; then
LABEL_NAME="${{ github.event.issue.labels[0].name }}"
if [[ "$LABEL_NAME" == "bug" ]]; then
SUB_TASK_NAME="Stereum | Bug"
elif [[ "$LABEL_NAME" == "enhancement" ]]; then
SUB_TASK_NAME="Stereum | Enhancement"
elif [[ "$LABEL_NAME" == "refactor" ]]; then
SUB_TASK_NAME="Stereum | Refactor"
elif [[ "$LABEL_NAME" == "service integration" ]]; then
SUB_TASK_NAME="Stereum | Integration"
elif [[ "$LABEL_NAME" == "automated testing" ]]; then
SUB_TASK_NAME="Stereum | Testing"
else
SUB_TASK_NAME="Stereum | General"
fi
gh api graphql -f query='
mutation($projectId: ID!, $projectItemId: ID!, $fieldId: ID!, $value: String!) {
updateProjectV2ItemFieldValue(input: {projectId: $projectId, itemId: $projectItemId, fieldId: $fieldId, value: {text: $value}}) {
projectV2Item {
id
}
}
}' -f projectId=$PROJECT_ID -f projectItemId=$PROJECT_ITEM_ID -f fieldId=$SUB_TASK_FIELD_ID -f value="$SUB_TASK_NAME"
fi
if [ -n "$STATUS_FIELD_ID" ] && [ -n "$BACKLOG_OPTION_ID" ]; then
gh api graphql -f query='
mutation($projectId: ID!, $projectItemId: ID!, $fieldId: ID!, $value: String!) {
updateProjectV2ItemFieldValue(input: {projectId: $projectId, itemId: $projectItemId, fieldId: $fieldId, value: {singleSelectOptionId: $value}}) {
projectV2Item {
id
}
}
}' -f projectId=$PROJECT_ID -f projectItemId=$PROJECT_ITEM_ID -f fieldId=$STATUS_FIELD_ID -f value=$BACKLOG_OPTION_ID
fi
current_date=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
if [ -n "$CREATION_DATE_FIELD_ID" ]; then
gh api graphql -f query='
mutation($projectId: ID!, $projectItemId: ID!, $fieldId: ID!, $value: Date!) {
updateProjectV2ItemFieldValue(input: {projectId: $projectId, itemId: $projectItemId, fieldId: $fieldId, value: {date: $value}}) {
projectV2Item {
id
}
}
}' -f projectId=$PROJECT_ID -f projectItemId=$PROJECT_ITEM_ID -f fieldId=$CREATION_DATE_FIELD_ID -f value=$current_date
fi
if [ -n "$PRIORITY_FIELD_ID" ] && [ -n "$SET_PRIORITY_OPTION_ID" ]; then
gh api graphql -f query='
mutation($projectId: ID!, $projectItemId: ID!, $fieldId: ID!, $value: String!) {
updateProjectV2ItemFieldValue(input: {projectId: $projectId, itemId: $projectItemId, fieldId: $fieldId, value: {singleSelectOptionId: $value}}) {
projectV2Item {
id
}
}
}' -f projectId=$PROJECT_ID -f projectItemId=$PROJECT_ITEM_ID -f fieldId=$PRIORITY_FIELD_ID -f value=$SET_PRIORITY_OPTION_ID
fi
21 changes: 21 additions & 0 deletions .github/workflows/code_quality_check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Code Quality Check

on:
pull_request:
branches: [main]

workflow_dispatch:

jobs:
prettier:
name: Prettier
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "20"
- run: npm install
working-directory: ./launcher
- run: npm run format:check
working-directory: ./launcher
15 changes: 8 additions & 7 deletions .github/workflows/electron.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
smctl.exe keypair ls
C:\Windows\System32\certutil.exe -csp "DigiCert Signing Manager KSP" -key -user
smctl healthcheck --all
smctl windows certsync --keypair-alias=key_520088982
smctl windows certsync --keypair-alias=${{ secrets.KEYPAIR_ALIAS }}
shell: cmd
if: matrix.os == 'windows-latest'

Expand All @@ -74,6 +74,7 @@ jobs:
TEAM_SHORT_NAME: ${{ secrets.team_short_name }}
APP_ID: "com.stereum.launcher"
TEAM_ID: ${{ secrets.team_id }}
KEYPAIR_ALIAS: ${{ secrets.KEYPAIR_ALIAS }}
if: ${{ !contains(github.event.head_commit.message, '[NOCI]') }}

- name: Verify Signing using Signtool on windows-latest
Expand All @@ -89,7 +90,7 @@ jobs:
shell: bash
if: ${{ !contains(github.event.head_commit.message, '[NOCI]') && matrix.os == 'ubuntu-latest' }}
- name: Upload artifacts for ubuntu-latest
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: app-${{ matrix.os }}
path: |
Expand All @@ -104,7 +105,7 @@ jobs:
shell: bash
if: ${{ !contains(github.event.head_commit.message, '[NOCI]') && matrix.os == 'windows-latest' }}
- name: Upload artifacts for windows-latest
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: app-${{ matrix.os }}
path: |
Expand All @@ -122,7 +123,7 @@ jobs:
shell: bash
if: ${{ !contains(github.event.head_commit.message, '[NOCI]') && matrix.os == 'macos-latest' }}
- name: Upload artifacts for macos-latest
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: app-${{ matrix.os }}
path: |
Expand Down Expand Up @@ -161,19 +162,19 @@ jobs:
shell: bash

- name: Download ubuntu binary from build into dist
uses: actions/download-artifact@e9ef242655d12993efdcda9058dee2db83a2cb9b
uses: actions/download-artifact@v4
with:
name: app-ubuntu-latest
path: dist
if: ${{ !contains(github.event.head_commit.message, '[NOCI]') }}
- name: Download windows binary from build into dist
uses: actions/download-artifact@e9ef242655d12993efdcda9058dee2db83a2cb9b
uses: actions/download-artifact@v4
with:
name: app-windows-latest
path: dist
if: ${{ !contains(github.event.head_commit.message, '[NOCI]') }}
- name: Download macos binary from build into dist
uses: actions/download-artifact@e9ef242655d12993efdcda9058dee2db83a2cb9b
uses: actions/download-artifact@v4
with:
name: app-macos-latest
path: dist
Expand Down
Loading

0 comments on commit 3cfb1bb

Please sign in to comment.