Skip to content

Commit 08dcc47

Browse files
committed
Merge branch 'develop'
2 parents e8bb263 + 77bcb69 commit 08dcc47

Some content is hidden

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

63 files changed

+7153
-6941
lines changed

.github/workflows/build-and-publish-adhoc.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,13 @@ jobs:
1818

1919
steps:
2020
- uses: actions/checkout@v2
21+
-
22+
uses: actions/setup-node@v2
23+
with:
24+
node-version: '16.14.0'
25+
cache: 'npm'
26+
-
27+
run: npm install
2128

2229
- name: Build and tag app
2330
run: docker build -t ${{ env.IMAGE }}:${{ github.event.inputs.tag }} -f docker/app/Dockerfile .

.github/workflows/build-and-publish-npm-cache.yml

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

.github/workflows/integrate-and-deploy.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,13 @@ jobs:
4242
run: |
4343
echo ::set-output name=NAMESPACE::sillsdev/web-languageforge
4444
echo ::set-output name=TAG::${{ inputs.image-tag }}
45+
-
46+
uses: actions/setup-node@v2
47+
with:
48+
node-version: '16.14.0'
49+
cache: 'npm'
50+
-
51+
run: npm install
4552
-
4653
name: Build app
4754
run: docker-compose build --build-arg ENVIRONMENT=production --build-arg BUILD_VERSION=${{ steps.image.outputs.TAG }} app

.github/workflows/tests.yml renamed to .github/workflows/pull-request.yml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Tests
1+
name: Build and Test
22

33
# https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#on
44
on:
@@ -31,6 +31,22 @@ jobs:
3131
github_token: ${{ github.token }}
3232
files: docker/PhpUnitTests.xml
3333

34+
build-app:
35+
runs-on: ubuntu-latest
36+
37+
steps:
38+
-
39+
uses: actions/checkout@v2
40+
-
41+
uses: actions/setup-node@v2
42+
with:
43+
node-version: '16.14.0'
44+
cache: 'npm'
45+
-
46+
run: npm install
47+
-
48+
run: docker-compose build app
49+
3450
# e2e-tests:
3551
# runs-on: ubuntu-latest
3652

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
name: Add Issue to Project
2+
3+
on:
4+
issues:
5+
types: [ opened ]
6+
7+
jobs:
8+
steve:
9+
if: ${{ !github.event.issue.pull_request }}
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Generate token
13+
id: generate_token
14+
uses: tibdex/github-app-token@7ce9ffdcdeb2ba82b01b51d6584a6a85872336d4
15+
with:
16+
app_id: ${{ secrets.LFPROJECTBOARDAUTOMATION_APP_ID }}
17+
private_key: ${{ secrets.LFPROJECTBOARDAUTOMATION_PRIVATE_KEY }}
18+
19+
- name: determine if issue is already on a project
20+
env:
21+
GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }}
22+
ISSUE_NUMBER: ${{ github.event.issue.number }}
23+
REPO: ${{ toJson(github.event.repository.name) }}
24+
ORGANIZATION: sillsdev
25+
run: |
26+
echo issue $ISSUE_NUMBER added to $REPO
27+
28+
gh api graphql -f query='
29+
query($issue_number:Int!, $org:ID!) {
30+
repository(name:"web-languageforge", owner:$org) {
31+
issue(number: $issue_number) {
32+
id
33+
projectNextItems(first:100) {
34+
nodes {
35+
id
36+
}
37+
}
38+
}
39+
}
40+
}' -F issue_number=$ISSUE_NUMBER -f org=$ORGANIZATION > project_data.json
41+
42+
echo 'IN_PROJECT='$(jq '.data.repository.issue.projectNextItems[] | length' project_data.json) >> $GITHUB_ENV
43+
44+
- name: get required info for set operations
45+
run: |
46+
gh api graphql -f query='
47+
query($org: String!) {
48+
organization(login: $org){
49+
projectNext(number: 1) {
50+
id
51+
fields(first:100) {
52+
nodes {
53+
id
54+
name
55+
settings
56+
}
57+
}
58+
}
59+
}
60+
}' -f org=$ORGANIZATION > project_data.json
61+
62+
echo 'PROJECT_ID='$(jq '.data.organization.projectNext.id' project_data.json) >> $GITHUB_ENV
63+
echo 'FIELD_ID='$(jq '.data.organization.projectNext.fields.nodes[] | select(.name== "Backlog") | .id' project_data.json) >> $GITHUB_ENV
64+
echo 'TRIAGE_ID='$(jq '.data.organization.projectNext.fields.nodes[] | select(.name== "Backlog") | .settings | fromjson.options[] | select(.name=="Triage") | .id' project_data.json) >> $GITHUB_ENV
65+
66+
- name: Add issue to project
67+
if: env.IN_PROJECT == 0
68+
env:
69+
ISSUE_ID: ${{ github.event.issue.node_id }} #use ITEM_ID instead for finding on projects
70+
run: |
71+
item_id="$( gh api graphql -f query='
72+
mutation($project:ID!, $item:ID!) {
73+
addProjectNextItem(input: {projectId: $project, contentId: $item}) {
74+
projectNextItem {
75+
id
76+
}
77+
}
78+
}' -f project=$PROJECT_ID -f item=$ISSUE_ID --jq '.data.addProjectNextItem.projectNextItem.id')"
79+
80+
echo 'ITEM_ID='$item_id >> $GITHUB_ENV
81+
82+
- name: set Backlog field
83+
if: env.IN_PROJECT == 0
84+
run: |
85+
gh api graphql -f query='
86+
mutation(
87+
$project:ID!
88+
$item:ID!
89+
$field: ID!
90+
$field_value: String!)
91+
{
92+
updateProjectNextItemField(input: {
93+
projectId: $project
94+
itemId: $item
95+
fieldId: $field
96+
value: $field_value})
97+
{
98+
projectNextItem {
99+
id
100+
}
101+
}
102+
}' -f project=$PROJECT_ID -f item=$ITEM_ID -f field=$FIELD_ID -f field_value=${{ env.TRIAGE_ID }}
103+

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
PhpUnitTests.xml
22
docker/e2e-results.xml
33
src/assets/*
4+
src/dist/*
45
!src/assets/.gitkeep
56
src/cache/*
67
!src/cache/.gitkeep
78
test/php/\.phpunit\.result\.cache
89
node_modules
910
.DS_Store
1011
docker-scan-results.txt
12+
test-results/
13+
playwright-report/
14+
*storageState.json

.vscode/launch.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"request": "launch",
88
"port": 9003,
99
"pathMappings": {
10+
"/var/www/html/Api/Service/TestControl.php": "${workspaceRoot}/test/e2e/TestControl.php",
1011
"/var/www/html/": "${workspaceRoot}/src/",
1112
"/var/www/test/": "${workspaceRoot}/test/"
1213
}

CONTRIBUTING.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
2+
## Ways to Contribute ##
3+
1. Look for issues in our issue tracker marked with *good first issue*
4+
2. If you are a Language Forge user, stay up to date with posts in our software community forum, and answer user's questions to the extent that you are able
5+
3. Help localize the Language Forge UI into a language that you are familiar with
6+
7+
8+
9+
## Contributing Code ##
10+
### Typical Workflow ###
11+
1. Create a branch off of `develop`
12+
1. Create a PR back into `develop`
13+
1. Once approved and merged, test those changes on [qa.languageforge.org](https://qa.languageforge.org)
14+
1. Once you are satisfied with the changes, coordinate with the team to deliver those changes to the production environment
15+
1. Team leads will determine when the right time to cut a release, i.e., tag and deploy, typically this should be within a day or two
16+
17+
### Production Bugfix Workflow ###
18+
1. There may be times when it's necessary to create a branch off of `master` (e.g. a hotfix for the production environment)
19+
1. Coordinate with the team to deliver those changes to the production environment
20+
1. Team leads will determine when the right time to cut a release, i.e., tag and deploy, this would likely be right away under these exceptional circumstances

0 commit comments

Comments
 (0)