Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bump TCE-899 #443

Merged
merged 8 commits into from
Jun 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
version: 2.1

orbs:
codacy: codacy/base@10.8.0
codacy_plugins_test: codacy/plugins-test@1.1.1
codacy: codacy/base@12.1.1
codacy_plugins_test: codacy/plugins-test@2.0.11

workflows:
version: 2
compile_test_deploy:
jobs:
- codacy/checkout_and_version:
write_sbt_version: true
- codacy/sbt:
name: publish_docker_local
openjdk_version: "11"
install_sbt_version: "1.10.0"
cmd: |
sbt "scalafmtCheckAll;
scalafmtSbtCheck;
Expand Down
26 changes: 13 additions & 13 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# Ignore everything
**

# Allow files and directories
!/src
!/package.json
!/package-lock.json
!/docs
!/target/universal/stage

# Ignore unnecessary files inside allowed directories
# This should go after the allowed directories
**/.DS_Store
# Ignore everything
**
# Allow files and directories
!/src
!/package.json
!/package-lock.json
!/docs
!/target/universal/stage
# Ignore unnecessary files inside allowed directories
# This should go after the allowed directories
**/.DS_Store
6 changes: 5 additions & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
* @codacy/toss
# This is a CODEOWNERS file.
# The lines below specify the code owners responsible for various parts of the repository.
# Each line is a file pattern followed by one or more owners.

* @codacy/macgyvers
23 changes: 8 additions & 15 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,8 @@
version: 2
updates:
- package-ecosystem: npm
directory: "/"
schedule:
interval: daily
timezone: Europe/Lisbon
open-pull-requests-limit: 10
ignore:
- dependency-name: stylelint-config-standard
versions:
- 21.0.0
- dependency-name: stylelint-config-recommended
versions:
- 4.0.0
version: 2
updates:
- package-ecosystem: npm
directory: "/"
schedule:
interval: daily
timezone: Europe/Lisbon
open-pull-requests-limit: 10
194 changes: 97 additions & 97 deletions .github/workflows/comment_issue.yml
Original file line number Diff line number Diff line change
@@ -1,97 +1,97 @@
name: Comment issue on Jira

on:
issue_comment:
types: [created]

jobs:
jira:
env:
JIRA_CREATE_COMMENT_AUTO: ${{ secrets.JIRA_CREATE_COMMENT_AUTO }}
runs-on: ubuntu-latest
steps:

- name: Start workflow if JIRA_CREATE_COMMENT_AUTO is enabled
if: env.JIRA_CREATE_COMMENT_AUTO == 'true'
run: echo "Starting workflow"

- name: Check GitHub Issue type
if: env.JIRA_CREATE_COMMENT_AUTO == 'true'
id: github_issue_type
uses: actions/[email protected]
with:
result-encoding: string
script: |
// An Issue can be a pull request, you can identify pull requests by the pull_request key
const pullRequest = ${{ toJson(github.event.issue.pull_request) }}
if(pullRequest) {
return "pull-request"
} else {
return "issue"
}

- name: Check if GitHub Issue has JIRA_ISSUE_LABEL
if: env.JIRA_CREATE_COMMENT_AUTO == 'true'
id: github_issue_has_jira_issue_label
uses: actions/[email protected]
env:
JIRA_ISSUE_LABEL: ${{ secrets.JIRA_ISSUE_LABEL }}
with:
result-encoding: string
script: |
const labels = ${{ toJson(github.event.issue.labels) }}
if(labels.find(label => label.name == process.env.JIRA_ISSUE_LABEL)) {
return "true"
} else {
return "false"
}

- name: Continue workflow only for Issues (not Pull Requests) tagged with JIRA_ISSUE_LABEL
if: env.JIRA_CREATE_COMMENT_AUTO == 'true' && env.GITHUB_ISSUE_TYPE == 'issue' && env.GITHUB_ISSUE_HAS_JIRA_ISSUE_LABEL == 'true'
env:
GITHUB_ISSUE_TYPE: ${{ steps.github_issue_type.outputs.result }}
GITHUB_ISSUE_HAS_JIRA_ISSUE_LABEL: ${{ steps.github_issue_has_jira_issue_label.outputs.result }}
run: echo "GitHub Issue is tracked on Jira, eligilbe to be commented"

- name: Jira Login
if: env.JIRA_CREATE_COMMENT_AUTO == 'true' && env.GITHUB_ISSUE_TYPE == 'issue' && env.GITHUB_ISSUE_HAS_JIRA_ISSUE_LABEL == 'true'
id: login
uses: atlassian/[email protected]
env:
GITHUB_ISSUE_TYPE: ${{ steps.github_issue_type.outputs.result }}
GITHUB_ISSUE_HAS_JIRA_ISSUE_LABEL: ${{ steps.github_issue_has_jira_issue_label.outputs.result }}
JIRA_BASE_URL: ${{ secrets.JIRA_BASE_URL }}
JIRA_USER_EMAIL: ${{ secrets.JIRA_USER_EMAIL }}
JIRA_API_TOKEN: ${{ secrets.JIRA_API_TOKEN }}

- name: Extract Jira number
if: env.JIRA_CREATE_COMMENT_AUTO == 'true' && env.GITHUB_ISSUE_TYPE == 'issue' && env.GITHUB_ISSUE_HAS_JIRA_ISSUE_LABEL == 'true'
id: extract_jira_number
uses: actions/[email protected]
env:
GITHUB_ISSUE_TYPE: ${{ steps.github_issue_type.outputs.result }}
GITHUB_ISSUE_HAS_JIRA_ISSUE_LABEL: ${{ steps.github_issue_has_jira_issue_label.outputs.result }}
JIRA_PROJECT: ${{ secrets.JIRA_PROJECT }}
GITHUB_TITLE: ${{ github.event.issue.title }}
with:
script: |
const jiraTaskRegex = new RegExp(`\\\[(${process.env.JIRA_PROJECT}-[0-9]+?)\\\]`)
return process.env.GITHUB_TITLE.match(jiraTaskRegex)[1]
result-encoding: string

- name: Jira Add comment on issue
if: env.JIRA_CREATE_COMMENT_AUTO == 'true' && env.GITHUB_ISSUE_TYPE == 'issue' && env.GITHUB_ISSUE_HAS_JIRA_ISSUE_LABEL == 'true'
id: add_comment_jira_issue
uses: atlassian/[email protected]
env:
GITHUB_ISSUE_TYPE: ${{ steps.github_issue_type.outputs.result }}
GITHUB_ISSUE_HAS_JIRA_ISSUE_LABEL: ${{ steps.github_issue_has_jira_issue_label.outputs.result }}
with:
issue: ${{ steps.extract_jira_number.outputs.result }}
comment: |
GitHub Comment : ${{ github.event.comment.user.login }}
{quote}${{ github.event.comment.body }}{quote}
----
{panel}
_[Github permalink |${{ github.event.comment.html_url }}]_
{panel}
name: Comment issue on Jira
on:
issue_comment:
types: [created]
jobs:
jira:
env:
JIRA_CREATE_COMMENT_AUTO: ${{ secrets.JIRA_CREATE_COMMENT_AUTO }}
runs-on: ubuntu-latest
steps:
- name: Start workflow if JIRA_CREATE_COMMENT_AUTO is enabled
if: env.JIRA_CREATE_COMMENT_AUTO == 'true'
run: echo "Starting workflow"
- name: Check GitHub Issue type
if: env.JIRA_CREATE_COMMENT_AUTO == 'true'
id: github_issue_type
uses: actions/[email protected]
with:
result-encoding: string
script: |
// An Issue can be a pull request, you can identify pull requests by the pull_request key
const pullRequest = ${{ toJson(github.event.issue.pull_request) }}
if(pullRequest) {
return "pull-request"
} else {
return "issue"
}
- name: Check if GitHub Issue has JIRA_ISSUE_LABEL
if: env.JIRA_CREATE_COMMENT_AUTO == 'true'
id: github_issue_has_jira_issue_label
uses: actions/[email protected]
env:
JIRA_ISSUE_LABEL: ${{ secrets.JIRA_ISSUE_LABEL }}
with:
result-encoding: string
script: |
const labels = ${{ toJson(github.event.issue.labels) }}
if(labels.find(label => label.name == process.env.JIRA_ISSUE_LABEL)) {
return "true"
} else {
return "false"
}
- name: Continue workflow only for Issues (not Pull Requests) tagged with JIRA_ISSUE_LABEL
if: env.JIRA_CREATE_COMMENT_AUTO == 'true' && env.GITHUB_ISSUE_TYPE == 'issue' && env.GITHUB_ISSUE_HAS_JIRA_ISSUE_LABEL == 'true'
env:
GITHUB_ISSUE_TYPE: ${{ steps.github_issue_type.outputs.result }}
GITHUB_ISSUE_HAS_JIRA_ISSUE_LABEL: ${{ steps.github_issue_has_jira_issue_label.outputs.result }}
run: echo "GitHub Issue is tracked on Jira, eligilbe to be commented"
- name: Jira Login
if: env.JIRA_CREATE_COMMENT_AUTO == 'true' && env.GITHUB_ISSUE_TYPE == 'issue' && env.GITHUB_ISSUE_HAS_JIRA_ISSUE_LABEL == 'true'
id: login
uses: atlassian/[email protected]
env:
GITHUB_ISSUE_TYPE: ${{ steps.github_issue_type.outputs.result }}
GITHUB_ISSUE_HAS_JIRA_ISSUE_LABEL: ${{ steps.github_issue_has_jira_issue_label.outputs.result }}
JIRA_BASE_URL: ${{ secrets.JIRA_BASE_URL }}
JIRA_USER_EMAIL: ${{ secrets.JIRA_USER_EMAIL }}
JIRA_API_TOKEN: ${{ secrets.JIRA_API_TOKEN }}
- name: Extract Jira number
if: env.JIRA_CREATE_COMMENT_AUTO == 'true' && env.GITHUB_ISSUE_TYPE == 'issue' && env.GITHUB_ISSUE_HAS_JIRA_ISSUE_LABEL == 'true'
id: extract_jira_number
uses: actions/[email protected]
env:
GITHUB_ISSUE_TYPE: ${{ steps.github_issue_type.outputs.result }}
GITHUB_ISSUE_HAS_JIRA_ISSUE_LABEL: ${{ steps.github_issue_has_jira_issue_label.outputs.result }}
JIRA_PROJECT: ${{ secrets.JIRA_PROJECT }}
GITHUB_TITLE: ${{ github.event.issue.title }}
with:
script: |
const jiraTaskRegex = new RegExp(`\\\[(${process.env.JIRA_PROJECT}-[0-9]+?)\\\]`)
return process.env.GITHUB_TITLE.match(jiraTaskRegex)[1]
result-encoding: string
- name: Jira Add comment on issue
if: env.JIRA_CREATE_COMMENT_AUTO == 'true' && env.GITHUB_ISSUE_TYPE == 'issue' && env.GITHUB_ISSUE_HAS_JIRA_ISSUE_LABEL == 'true'
id: add_comment_jira_issue
uses: atlassian/[email protected]
env:
GITHUB_ISSUE_TYPE: ${{ steps.github_issue_type.outputs.result }}
GITHUB_ISSUE_HAS_JIRA_ISSUE_LABEL: ${{ steps.github_issue_has_jira_issue_label.outputs.result }}
with:
issue: ${{ steps.extract_jira_number.outputs.result }}
comment: |
GitHub Comment : ${{ github.event.comment.user.login }}
{quote}${{ github.event.comment.body }}{quote}
----
{panel}
_[Github permalink |${{ github.event.comment.html_url }}]_
{panel}
Loading