Skip to content

Commit 48a8862

Browse files
authored
Merge branch 'master' into adzuci/ruby-code-scanning
2 parents 3375406 + 0def92c commit 48a8862

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+2567
-1067
lines changed

.github/docker-compose-ci.yml

Lines changed: 0 additions & 40 deletions
This file was deleted.

.github/elasticsearch.yml

Lines changed: 0 additions & 4 deletions
This file was deleted.

.github/run_tests.sh

Lines changed: 0 additions & 16 deletions
This file was deleted.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Run the workflow that adds new tickets that are either:
2+
# - labelled "DEPR"
3+
# - title starts with "[DEPR]"
4+
# - body starts with "Proposal Date" (this is the first template field)
5+
# to the org-wide DEPR project board
6+
7+
name: Add newly created DEPR issues to the DEPR project board
8+
9+
on:
10+
issues:
11+
types: [opened]
12+
13+
jobs:
14+
routeissue:
15+
uses: openedx/.github/.github/workflows/add-depr-ticket-to-depr-board.yml@master
16+
secrets:
17+
GITHUB_APP_ID: ${{ secrets.GRAPHQL_AUTH_APP_ID }}
18+
GITHUB_APP_PRIVATE_KEY: ${{ secrets.GRAPHQL_AUTH_APP_PEM }}
19+
SLACK_BOT_TOKEN: ${{ secrets.SLACK_ISSUE_BOT_TOKEN }}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# This workflow runs when a comment is made on the ticket
2+
# If the comment starts with "label: " it tries to apply
3+
# the label indicated in rest of comment.
4+
# If the comment starts with "remove label: ", it tries
5+
# to remove the indicated label.
6+
# Note: Labels are allowed to have spaces and this script does
7+
# not parse spaces (as often a space is legitimate), so the command
8+
# "label: really long lots of words label" will apply the
9+
# label "really long lots of words label"
10+
11+
name: Allows for the adding and removing of labels via comment
12+
13+
on:
14+
issue_comment:
15+
types: [created]
16+
17+
jobs:
18+
add_remove_labels:
19+
uses: openedx/.github/.github/workflows/add-remove-label-on-comment.yml@master
20+

.github/workflows/ci.yml

Lines changed: 45 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,54 @@ on:
1111
jobs:
1212
build:
1313
runs-on: ubuntu-20.04
14+
strategy:
15+
matrix:
16+
ruby-version: ['3.0.4']
17+
mongodb-version: ['4.2.14']
18+
include:
19+
- ruby-version: 3.0.4
20+
gemfile: Gemfile3
21+
allow-failure: false
22+
env:
23+
SEARCH_SERVER_ES7: http://localhost:9200
24+
MONGOHQ_URL: mongodb://localhost:27017/cs_comments_service_test
25+
MONGOID_AUTH_MECH: ""
26+
NEW_RELIC_ENABLE: false
27+
RACK_ENV: staging
28+
SINATRA_ENV: staging
29+
API_KEY: password
30+
BUNDLE_GEMFILE: ${{ github.workspace }}/${{ matrix.gemfile }}
31+
RACK_TIMEOUT_SERVICE_TIMEOUT: 20
32+
services:
33+
elasticsearch:
34+
image: elasticsearch:7.8.0
35+
env:
36+
discovery.type: single-node
37+
bootstrap.memory_lock: true
38+
ES_JAVA_OPTS: -Xms512m -Xmx512m
39+
network.host: 0.0.0.0
40+
cluster.routing.allocation.disk.watermark.low: 150mb
41+
cluster.routing.allocation.disk.watermark.high: 100mb
42+
cluster.routing.allocation.disk.watermark.flood_stage: 50mb
43+
ports:
44+
- 9200:9200
45+
mongodb:
46+
image: mongo:${{ matrix.mongodb-version }}
47+
ports:
48+
- 27017:27017
1449
steps:
1550
- name: Checkout
16-
uses: actions/checkout@v2
51+
uses: actions/checkout@v3
1752

18-
- name: Install Ruby
19-
uses: ruby/setup-ruby@477b21f02be01bcb8030d50f37cfec92bfa615b6
53+
- name: Set up Ruby ${{ matrix.ruby-version }}
54+
uses: ruby/setup-ruby@v1
2055
with:
21-
ruby-version: 2.5
56+
ruby-version: ${{ matrix.ruby-version }}
57+
bundler-cache: true
2258

23-
- name: Build the stack
24-
run: docker-compose -f ./.github/docker-compose-ci.yml build test-forum
59+
- name: Install dependencies
60+
run: bundle install
2561

26-
- name: Test
27-
run: docker-compose -f ./.github/docker-compose-ci.yml run --rm test-forum
62+
- name: Run tests
63+
run: bin/rspec -fd
64+
continue-on-error: ${{ matrix.allow-failure }}

.github/workflows/commitlint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ on:
77

88
jobs:
99
commitlint:
10-
uses: edx/.github/.github/workflows/commitlint.yml@master
10+
uses: openedx/.github/.github/workflows/commitlint.yml@master
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# This workflow runs when a comment is made on the ticket
2+
# If the comment starts with "assign me" it assigns the author to the
3+
# ticket (case insensitive)
4+
5+
name: Assign comment author to ticket if they say "assign me"
6+
on:
7+
issue_comment:
8+
types: [created]
9+
10+
jobs:
11+
self_assign_by_comment:
12+
uses: openedx/.github/.github/workflows/self-assign-issue.yml@master

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,7 @@ log/
3232
/nbproject
3333
.idea/
3434

35-
.ruby-version
35+
.ruby-version
36+
37+
# Store status of tests to allow reruning failures
38+
.rspec-test-status

.tx/config

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
[main]
22
host = https://www.transifex.com
33

4-
[edx-platform.comments-service]
4+
[o:open-edx:p:edx-platform:r:comments-service]
55
file_filter = locale/<lang>.yml
66
source_file = locale/en-US.yml
77
source_lang = en-US
8-
lang_map = af_ZA: af-ZA, am_ET: am-ET, ar_AE: ar-AE, ar_BH: ar-BH, ar_DZ: ar-DZ, ar_EG: ar-EG, ar_IQ: ar-IQ, ar_JO: ar-JO, ar_KW: ar-KW, ar_LB: ar-LB, ar_LY: ar-LY, ar_MA: ar-MA, ar_OM: ar-OM, ar_QA: ar-QA, ar_SA: ar-SA, ar_SY: ar-SY, ar_TN: ar-TN, ar_YE: ar-YE, arn_CL: arn-CL, as_IN: as-IN, az_AZ: az-AZ, ba_RU: ba-RU, be_BY: be-BY, bg_BG: bg-BG, bn_BD: bn-BD, bn_IN: bn-IN, bo_CN: bo-CN, br_FR: br-FR, bs_BA: bs-BA, ca_ES: ca-ES, co_FR: co-FR, cs_CZ: cs-CZ, cy_GB: cy-GB, da_DK: da-DK, de_AT: de-AT, de_CH: de-CH, de_DE: de-DE, de_LI: de-LI, de_LU: de-LU, dsb_DE: dsb-DE, dv_MV: dv-MV, el_GR: el-GR, en_AU: en-AU, en_BZ: en-BZ, en_CA: en-CA, en_GB: en-GB, en_IE: en-IE, en_IN: en-IN, en_JM: en-JM, en_MY: en-MY, en_NZ: en-NZ, en_PH: en-PH, en_SG: en-SG, en_TT: en-TT, en_US: en-US, en_ZA: en-ZA, en_ZW: en-ZW, es_AR: es-AR, es_BO: es-BO, es_CL: es-CL, es_CO: es-CO, es_CR: es-CR, es_DO: es-DO, es_EC: es-EC, es_ES: es-ES, es_GT: es-GT, es_HN: es-HN, es_MX: es-MX, es_NI: es-NI, es_PA: es-PA, es_PE: es-PE, es_PR: es-PR, es_PY: es-PY, es_SV: es-SV, es_US: es-US, es_UY: es-UY, es_VE: es-VE, et_EE: et-EE, eu_ES: eu-ES, fa_IR: fa-IR, fi_FI: fi-FI, fil_PH: fil-PH, fo_FO: fo-FO, fr_BE: fr-BE, fr_CA: fr-CA, fr_CH: fr-CH, fr_FR: fr-FR, fr_LU: fr-LU, fr_MC: fr-MC, fy_NL: fy-NL, ga_IE: ga-IE, gd_GB: gd-GB, gl_ES: gl-ES, gsw_FR: gsw-FR, gu_IN: gu-IN, ha_NG: ha-NG, he_IL: he-IL, hi_IN: hi-IN, hr_BA: hr-BA, hr_HR: hr-HR, hsb_DE: hsb-DE, hu_HU: hu-HU, hy_AM: hy-AM, id_ID: id-ID, ig_NG: ig-NG, ii_CN: ii-CN, is_IS: is-IS, it_CH: it-CH, it_IT: it-IT, iu_CA: iu-CA, ja_JP: ja-JP, ka_GE: ka-GE, kk_KZ: kk-KZ, kl_GL: kl-GL, km_KH: km-KH, kn_IN: kn-IN, ko_KR: ko-KR, kok_IN: kok-IN, ky_KG: ky-KG, lb_LU: lb-LU, lo_LA: lo-LA, lt_LT: lt-LT, lv_LV: lv-LV, mi_NZ: mi-NZ, mk_MK: mk-MK, ml_IN: ml-IN, mn_CN: mn-CN, mn_MN: mn-MN, moh_CA: moh-CA, mr_IN: mr-IN, ms_BN: ms-BN, ms_MY: ms-MY, mt_MT: mt-MT, nb_NO: nb-NO, ne_NP: ne-NP, nl_BE: nl-BE, nl_NL: nl-NL, nn_NO: nn-NO, nso_ZA: nso-ZA, oc_FR: oc-FR, or_IN: or-IN, pa_IN: pa-IN, pl_PL: pl-PL, prs_AF: prs-AF, ps_AF: ps-AF, pt_BR: pt-BR, pt_PT: pt-PT, qut_GT: qut-GT, quz_BO: quz-BO, quz_EC: quz-EC, quz_PE: quz-PE, rm_CH: rm-CH, ro_RO: ro-RO, ru_RU: ru-RU, rw_RW: rw-RW, sa_IN: sa-IN, sah_RU: sah-RU, se_FI: se-FI, se_NO: se-NO, se_SE: se-SE, si_LK: si-LK, sk_SK: sk-SK, sl_SI: sl-SI, sma_NO: sma-NO, sma_SE: sma-SE, smj_NO: smj-NO, smj_SE: smj-SE, smn_FI: smn-FI, sms_FI: sms-FI, sq_AL: sq-AL, sr_BA: sr-BA, sr_CS: sr-CS, sr_ME: sr-ME, sr_RS: sr-RS, sv_FI: sv-FI, sv_SE: sv-SE, sw_KE: sw-KE, syr_SY: syr-SY, ta_IN: ta-IN, te_IN: te-IN, tg_TJ: tg-TJ, th_TH: th-TH, tk_TM: tk-TM, tn_ZA: tn-ZA, tr_TR: tr-TR, tt_RU: tt-RU, tzm_DZ: tzm-DZ, ug_CN: ug-CN, uk_UA: uk-UA, ur_PK: ur-PK, uz_UZ: uz-UZ, vi_VN: vi-VN, wo_SN: wo-SN, xh_ZA: xh-ZA, yo_NG: yo-NG, zh_CN: zh-CN, zh_HK: zh-HK, zh_MO: zh-MO, zh_SG: zh-SG, zh_TW: zh-TW, zu_ZA: zu-ZA
8+
lang_map = en_CA: en-CA, is_IS: is-IS, ml_IN: ml-IN, ar_BH: ar-BH, ar_OM: ar-OM, ar_TN: ar-TN, fr_CH: fr-CH, vi_VN: vi-VN, zh_HK: zh-HK, am_ET: am-ET, en_BZ: en-BZ, es_GT: es-GT, es_DO: es-DO, et_EE: et-EE, lt_LT: lt-LT, pt_PT: pt-PT, qut_GT: qut-GT, de_DE: de-DE, en_AU: en-AU, en_PH: en-PH, sa_IN: sa-IN, tr_TR: tr-TR, se_FI: se-FI, sms_FI: sms-FI, sv_SE: sv-SE, es_PA: es-PA, fi_FI: fi-FI, gl_ES: gl-ES, ko_KR: ko-KR, lv_LV: lv-LV, mi_NZ: mi-NZ, pt_BR: pt-BR, quz_PE: quz-PE, en_TT: en-TT, gd_GB: gd-GB, hy_AM: hy-AM, zh_TW: zh-TW, hu_HU: hu-HU, it_IT: it-IT, mn_CN: mn-CN, ru_RU: ru-RU, sw_KE: sw-KE, be_BY: be-BY, en_ZA: en-ZA, gsw_FR: gsw-FR, tzm_DZ: tzm-DZ, tt_RU: tt-RU, es_EC: es-EC, kl_GL: kl-GL, ta_IN: ta-IN, fy_NL: fy-NL, sah_RU: sah-RU, sl_SI: sl-SI, ar_IQ: ar-IQ, ar_QA: ar-QA, es_PE: es-PE, mt_MT: mt-MT, oc_FR: oc-FR, prs_AF: prs-AF, se_SE: se-SE, sma_NO: sma-NO, ar_MA: ar-MA, bs_BA: bs-BA, ca_ES: ca-ES, smn_FI: smn-FI, zh_SG: zh-SG, en_JM: en-JM, es_NI: es-NI, mr_IN: mr-IN, nb_NO: nb-NO, ro_RO: ro-RO, ar_LY: ar-LY, cs_CZ: cs-CZ, de_AT: de-AT, syr_SY: syr-SY, uz_UZ: uz-UZ, sq_AL: sq-AL, sv_FI: sv-FI, hr_BA: hr-BA, kn_IN: kn-IN, sk_SK: sk-SK, en_MY: en-MY, en_SG: en-SG, fo_FO: fo-FO, iu_CA: iu-CA, nn_NO: nn-NO, ar_SY: ar-SY, bn_IN: bn-IN, cy_GB: cy-GB, ug_CN: ug-CN, es_CO: es-CO, hsb_DE: hsb-DE, quz_BO: quz-BO, ar_JO: ar-JO, ii_CN: ii-CN, rm_CH: rm-CH, lb_LU: lb-LU, rw_RW: rw-RW, sr_BA: sr-BA, tg_TJ: tg-TJ, af_ZA: af-ZA, co_FR: co-FR, fa_IR: fa-IR, es_CL: es-CL, id_ID: id-ID, ky_KG: ky-KG, pa_IN: pa-IN, si_LK: si-LK, ar_DZ: ar-DZ, ar_KW: ar-KW, dv_MV: dv-MV, zh_MO: zh-MO, zu_ZA: zu-ZA, es_PY: es-PY, ig_NG: ig-NG, it_CH: it-CH, lo_LA: lo-LA, tk_TM: tk-TM, as_IN: as-IN, es_MX: es-MX, es_PR: es-PR, ja_JP: ja-JP, nso_ZA: nso-ZA, th_TH: th-TH, ur_PK: ur-PK, bn_BD: bn-BD, dsb_DE: dsb-DE, es_US: es-US, or_IN: or-IN, ar_YE: ar-YE, da_DK: da-DK, fr_CA: fr-CA, es_HN: es-HN, fr_MC: fr-MC, kk_KZ: kk-KZ, mn_MN: mn-MN, ne_NP: ne-NP, ar_LB: ar-LB, bo_CN: bo-CN, en_ZW: en-ZW, sr_ME: sr-ME, zh_CN: zh-CN, fr_LU: fr-LU, ms_MY: ms-MY, pl_PL: pl-PL, smj_NO: smj-NO, yo_NG: yo-NG, en_IE: en-IE, es_BO: es-BO, es_UY: es-UY, ha_NG: ha-NG, nl_BE: nl-BE, quz_EC: quz-EC, br_FR: br-FR, en_GB: en-GB, eu_ES: eu-ES, hi_IN: hi-IN, xh_ZA: xh-ZA, sr_CS: sr-CS, sr_RS: sr-RS, tn_ZA: tn-ZA, ar_SA: ar-SA, fr_BE: fr-BE, ms_BN: ms-BN, en_IN: en-IN, es_AR: es-AR, es_CR: es-CR, es_VE: es-VE, km_KH: km-KH, arn_CL: arn-CL, ba_RU: ba-RU, de_LI: de-LI, se_NO: se-NO, ar_EG: ar-EG, fil_PH: fil-PH, moh_CA: moh-CA, az_AZ: az-AZ, es_ES: es-ES, ka_GE: ka-GE, hr_HR: hr-HR, mk_MK: mk-MK, nl_NL: nl-NL, sma_SE: sma-SE, smj_SE: smj-SE, ar_AE: ar-AE, el_GR: el-GR, gu_IN: gu-IN, uk_UA: uk-UA, kok_IN: kok-IN, te_IN: te-IN, de_LU: de-LU, en_NZ: en-NZ, fr_FR: fr-FR, es_SV: es-SV, he_IL: he-IL, ps_AF: ps-AF, ga_IE: ga-IE, wo_SN: wo-SN, bg_BG: bg-BG, de_CH: de-CH, en_US: en-US
9+

0 commit comments

Comments
 (0)