Skip to content

Commit 16fa8b6

Browse files
committed
Merged in dspacecris-7-DSC-1362-alignment-7.6.1 (pull request DSpace#1059)
alignment 7.6.1
2 parents ca43885 + c34c3cf commit 16fa8b6

348 files changed

Lines changed: 15966 additions & 13018 deletions

File tree

Some content is hidden

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

.github/disabled-workflows/pull_request_opened.yml

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

.github/workflows/codescan.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,16 @@
55
# because CodeQL requires a fresh build with all tests *disabled*.
66
name: "Code Scanning"
77

8-
# Run this code scan for all pushes / PRs to main branch. Also run once a week.
8+
# Run this code scan for all pushes / PRs to main or maintenance branches. Also run once a week.
99
on:
1010
push:
11-
branches: [ main ]
11+
branches:
12+
- main
13+
- 'dspace-**'
1214
pull_request:
13-
branches: [ main ]
15+
branches:
16+
- main
17+
- 'dspace-**'
1418
# Don't run if PR is only updating static documentation
1519
paths-ignore:
1620
- '**/*.md'

.github/workflows/docker.yml

Lines changed: 57 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -15,29 +15,35 @@ on:
1515
permissions:
1616
contents: read # to fetch code (actions/checkout)
1717

18+
19+
env:
20+
# Define tags to use for Docker images based on Git tags/branches (for docker/metadata-action)
21+
# For a new commit on default branch (main), use the literal tag 'latest' on Docker image.
22+
# For a new commit on other branches, use the branch name as the tag for Docker image.
23+
# For a new tag, copy that tag name as the tag for Docker image.
24+
IMAGE_TAGS: |
25+
type=raw,value=latest,enable=${{ endsWith(github.ref, github.event.repository.default_branch) }}
26+
type=ref,event=branch,enable=${{ !endsWith(github.ref, github.event.repository.default_branch) }}
27+
type=ref,event=tag
28+
# Define default tag "flavor" for docker/metadata-action per
29+
# https://github.com/docker/metadata-action#flavor-input
30+
# We manage the 'latest' tag ourselves to the 'main' branch (see settings above)
31+
TAGS_FLAVOR: |
32+
latest=false
33+
# Architectures / Platforms for which we will build Docker images
34+
# If this is a PR, we ONLY build for AMD64. For PRs we only do a sanity check test to ensure Docker builds work.
35+
# If this is NOT a PR (e.g. a tag or merge commit), also build for ARM64.
36+
PLATFORMS: linux/amd64${{ github.event_name != 'pull_request' && ', linux/arm64' || '' }}
37+
38+
1839
jobs:
19-
docker:
40+
###############################################
41+
# Build/Push the 'dspace/dspace-angular' image
42+
###############################################
43+
dspace-angular:
2044
# Ensure this job never runs on forked repos. It's only executed for 'dspace/dspace-angular'
2145
if: github.repository == 'dspace/dspace-angular'
2246
runs-on: ubuntu-latest
23-
env:
24-
# Define tags to use for Docker images based on Git tags/branches (for docker/metadata-action)
25-
# For a new commit on default branch (main), use the literal tag 'dspace-7_x' on Docker image.
26-
# For a new commit on other branches, use the branch name as the tag for Docker image.
27-
# For a new tag, copy that tag name as the tag for Docker image.
28-
IMAGE_TAGS: |
29-
type=raw,value=dspace-7_x,enable=${{ endsWith(github.ref, github.event.repository.default_branch) }}
30-
type=ref,event=branch,enable=${{ !endsWith(github.ref, github.event.repository.default_branch) }}
31-
type=ref,event=tag
32-
# Define default tag "flavor" for docker/metadata-action per
33-
# https://github.com/docker/metadata-action#flavor-input
34-
# We turn off 'latest' tag by default.
35-
TAGS_FLAVOR: |
36-
latest=false
37-
# Architectures / Platforms for which we will build Docker images
38-
# If this is a PR, we ONLY build for AMD64. For PRs we only do a sanity check test to ensure Docker builds work.
39-
# If this is NOT a PR (e.g. a tag or merge commit), also build for ARM64.
40-
PLATFORMS: linux/amd64${{ github.event_name != 'pull_request' && ', linux/arm64' || '' }}
4147

4248
steps:
4349
# https://github.com/actions/checkout
@@ -61,9 +67,6 @@ jobs:
6167
username: ${{ secrets.DOCKER_USERNAME }}
6268
password: ${{ secrets.DOCKER_ACCESS_TOKEN }}
6369

64-
###############################################
65-
# Build/Push the 'dspace/dspace-angular' image
66-
###############################################
6770
# https://github.com/docker/metadata-action
6871
# Get Metadata for docker_build step below
6972
- name: Sync metadata (tags, labels) from GitHub to Docker for 'dspace-angular' image
@@ -77,7 +80,7 @@ jobs:
7780
# https://github.com/docker/build-push-action
7881
- name: Build and push 'dspace-angular' image
7982
id: docker_build
80-
uses: docker/build-push-action@v3
83+
uses: docker/build-push-action@v4
8184
with:
8285
context: .
8386
file: ./Dockerfile
@@ -89,9 +92,36 @@ jobs:
8992
tags: ${{ steps.meta_build.outputs.tags }}
9093
labels: ${{ steps.meta_build.outputs.labels }}
9194

92-
#####################################################
93-
# Build/Push the 'dspace/dspace-angular' image ('-dist' tag)
94-
#####################################################
95+
#############################################################
96+
# Build/Push the 'dspace/dspace-angular' image ('-dist' tag)
97+
#############################################################
98+
dspace-angular-dist:
99+
# Ensure this job never runs on forked repos. It's only executed for 'dspace/dspace-angular'
100+
if: github.repository == 'dspace/dspace-angular'
101+
runs-on: ubuntu-latest
102+
103+
steps:
104+
# https://github.com/actions/checkout
105+
- name: Checkout codebase
106+
uses: actions/checkout@v3
107+
108+
# https://github.com/docker/setup-buildx-action
109+
- name: Setup Docker Buildx
110+
uses: docker/setup-buildx-action@v2
111+
112+
# https://github.com/docker/setup-qemu-action
113+
- name: Set up QEMU emulation to build for multiple architectures
114+
uses: docker/setup-qemu-action@v2
115+
116+
# https://github.com/docker/login-action
117+
- name: Login to DockerHub
118+
# Only login if not a PR, as PRs only trigger a Docker build and not a push
119+
if: github.event_name != 'pull_request'
120+
uses: docker/login-action@v2
121+
with:
122+
username: ${{ secrets.DOCKER_USERNAME }}
123+
password: ${{ secrets.DOCKER_ACCESS_TOKEN }}
124+
95125
# https://github.com/docker/metadata-action
96126
# Get Metadata for docker_build_dist step below
97127
- name: Sync metadata (tags, labels) from GitHub to Docker for 'dspace-angular-dist' image
@@ -107,7 +137,7 @@ jobs:
107137

108138
- name: Build and push 'dspace-angular-dist' image
109139
id: docker_build_dist
110-
uses: docker/build-push-action@v3
140+
uses: docker/build-push-action@v4
111141
with:
112142
context: .
113143
file: ./Dockerfile.dist

.github/workflows/label_merge_conflicts.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
# This workflow checks open PRs for merge conflicts and labels them when conflicts are found
22
name: Check for merge conflicts
33

4-
# Run whenever the "main" branch is updated
5-
# NOTE: This means merge conflicts are only checked for when a PR is merged to main.
4+
# Run this for all pushes (i.e. merges) to 'main' or maintenance branches
65
on:
76
push:
8-
branches: [ main ]
7+
branches:
8+
- main
9+
- 'dspace-**'
910
# So that the `conflict_label_name` is removed if conflicts are resolved,
1011
# we allow this to run for `pull_request_target` so that github secrets are available.
1112
pull_request_target:
@@ -24,6 +25,8 @@ jobs:
2425
# See: https://github.com/prince-chrismc/label-merge-conflicts-action
2526
- name: Auto-label PRs with merge conflicts
2627
uses: prince-chrismc/label-merge-conflicts-action@v3
28+
# Ignore any failures -- may occur (randomly?) for older, outdated PRs.
29+
continue-on-error: true
2730
# Add "merge conflict" label if a merge conflict is detected. Remove it when resolved.
2831
# Note, the authentication token is created automatically
2932
# See: https://docs.github.com/en/actions/configuring-and-managing-workflows/authenticating-with-the-github_token
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# This workflow will attempt to port a merged pull request to
2+
# the branch specified in a "port to" label (if exists)
3+
name: Port merged Pull Request
4+
5+
# Only run for merged PRs against the "main" or maintenance branches
6+
# We allow this to run for `pull_request_target` so that github secrets are available
7+
# (This is required when the PR comes from a forked repo)
8+
on:
9+
pull_request_target:
10+
types: [ closed ]
11+
branches:
12+
- main
13+
- 'dspace-**'
14+
15+
permissions:
16+
contents: write # so action can add comments
17+
pull-requests: write # so action can create pull requests
18+
19+
jobs:
20+
port_pr:
21+
runs-on: ubuntu-latest
22+
# Don't run on closed *unmerged* pull requests
23+
if: github.event.pull_request.merged
24+
steps:
25+
# Checkout code
26+
- uses: actions/checkout@v3
27+
# Port PR to other branch (ONLY if labeled with "port to")
28+
# See https://github.com/korthout/backport-action
29+
- name: Create backport pull requests
30+
uses: korthout/backport-action@v1
31+
with:
32+
# Trigger based on a "port to [branch]" label on PR
33+
# (This label must specify the branch name to port to)
34+
label_pattern: '^port to ([^ ]+)$'
35+
# Title to add to the (newly created) port PR
36+
pull_title: '[Port ${target_branch}] ${pull_title}'
37+
# Description to add to the (newly created) port PR
38+
pull_description: 'Port of #${pull_number} by @${pull_author} to `${target_branch}`.'
39+
# Copy all labels from original PR to (newly created) port PR
40+
# NOTE: The labels matching 'label_pattern' are automatically excluded
41+
copy_labels_pattern: '.*'
42+
# Skip any merge commits in the ported PR. This means only non-merge commits are cherry-picked to the new PR
43+
merge_commits: 'skip'
44+
# Use a personal access token (PAT) to create PR as 'dspace-bot' user.
45+
# A PAT is required in order for the new PR to trigger its own actions (for CI checks)
46+
github_token: ${{ secrets.PR_PORT_TOKEN }}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# This workflow runs whenever a new pull request is created
2+
name: Pull Request opened
3+
4+
# Only run for newly opened PRs against the "main" or maintenance branches
5+
# We allow this to run for `pull_request_target` so that github secrets are available
6+
# (This is required to assign a PR back to the creator when the PR comes from a forked repo)
7+
on:
8+
pull_request_target:
9+
types: [ opened ]
10+
branches:
11+
- main
12+
- 'dspace-**'
13+
14+
permissions:
15+
pull-requests: write
16+
17+
jobs:
18+
automation:
19+
runs-on: ubuntu-latest
20+
steps:
21+
# Assign the PR to whomever created it. This is useful for visualizing assignments on project boards
22+
# See https://github.com/toshimaru/auto-author-assign
23+
- name: Assign PR to creator
24+
uses: toshimaru/auto-author-assign@v1.6.2

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,8 @@ DSPACE_UI_SSL => DSPACE_SSL
135135

136136
The same settings can also be overwritten by setting system environment variables instead, E.g.:
137137
```bash
138-
export DSPACE_HOST=api7.dspace.org
139-
export DSPACE_UI_PORT=4200
138+
export DSPACE_HOST=demo.dspace.org
139+
export DSPACE_UI_PORT=4000
140140
```
141141

142142
The priority works as follows: **environment variable** overrides **variable in `.env` file** overrides external config set by `DSPACE_APP_CONFIG_PATH` overrides **`config.(prod or dev).yml`**
@@ -266,7 +266,7 @@ E2E tests (aka integration tests) use [Cypress.io](https://www.cypress.io/). Con
266266
The test files can be found in the `./cypress/integration/` folder.
267267

268268
Before you can run e2e tests, two things are REQUIRED:
269-
1. You MUST be running the DSpace backend (i.e. REST API) locally. The e2e tests will *NOT* succeed if run against our demo REST API (https://api7.dspace.org/server/), as that server is uncontrolled and may have content added/removed at any time.
269+
1. You MUST be running the DSpace backend (i.e. REST API) locally. The e2e tests will *NOT* succeed if run against our demo/sandbox REST API (https://demo.dspace.org/server/ or https://sandbox.dspace.org/server/), as those sites may have content added/removed at any time.
270270
* After starting up your backend on localhost, make sure either your `config.prod.yml` or `config.dev.yml` has its `rest` settings defined to use that localhost backend.
271271
* If you'd prefer, you may instead use environment variables as described at [Configuring](#configuring). For example:
272272
```

config/config.example.yml

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,9 @@ languages:
232232
- code: pt-BR
233233
label: Português do Brasil
234234
active: true
235+
- code: sr-lat
236+
label: Srpski (lat)
237+
active: true
235238
- code: fi
236239
label: Suomi
237240
active: true
@@ -256,6 +259,9 @@ languages:
256259
- code: el
257260
label: Ελληνικά
258261
active: true
262+
- code: sr-cyr
263+
label: Српски
264+
active: true
259265
- code: uk
260266
label: Yкраї́нська
261267
active: true
@@ -325,33 +331,33 @@ themes:
325331
#
326332
# # A theme with a handle property will match the community, collection or item with the given
327333
# # handle, and all collections and/or items within it
328-
# - name: 'custom',
329-
# handle: '10673/1233'
334+
# - name: custom
335+
# handle: 10673/1233
330336
#
331337
# # A theme with a regex property will match the route using a regular expression. If it
332338
# # matches the route for a community or collection it will also apply to all collections
333339
# # and/or items within it
334-
# - name: 'custom',
335-
# regex: 'collections\/e8043bc2.*'
340+
# - name: custom
341+
# regex: collections\/e8043bc2.*
336342
#
337343
# # A theme with a uuid property will match the community, collection or item with the given
338344
# # ID, and all collections and/or items within it
339-
# - name: 'custom',
340-
# uuid: '0958c910-2037-42a9-81c7-dca80e3892b4'
345+
# - name: custom
346+
# uuid: 0958c910-2037-42a9-81c7-dca80e3892b4
341347
#
342348
# # The extends property specifies an ancestor theme (by name). Whenever a themed component is not found
343349
# # in the current theme, its ancestor theme(s) will be checked recursively before falling back to default.
344-
# - name: 'custom-A',
345-
# extends: 'custom-B',
350+
# - name: custom-A
351+
# extends: custom-B
346352
# # Any of the matching properties above can be used
347-
# handle: '10673/34'
353+
# handle: 10673/34
348354
#
349-
# - name: 'custom-B',
350-
# extends: 'custom',
351-
# handle: '10673/12'
355+
# - name: custom-B
356+
# extends: custom
357+
# handle: 10673/12
352358
#
353359
# # A theme with only a name will match every route
354-
# name: 'custom'
360+
# name: custom
355361
#
356362
# # This theme will use the default bootstrap styling for DSpace components
357363
# - name: BASE_THEME_NAME

cypress/e2e/collection-statistics.cy.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { REGEX_MATCH_NON_EMPTY_TEXT, TEST_COLLECTION } from 'cypress/support/e2e';
22
import { testA11y } from 'cypress/support/utils';
33

4-
describe('Collection Statistics Page', () => {
4+
xdescribe('Collection Statistics Page', () => {
55
const COLLECTIONSTATISTICSPAGE = '/statistics/collections/'.concat(TEST_COLLECTION);
66

77
it('should load if you click on "Statistics" from a Collection page', () => {

cypress/e2e/community-list.cy.ts

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { Options } from 'cypress-axe';
21
import { testA11y } from 'cypress/support/utils';
32

43
describe('Community List Page', () => {
@@ -13,14 +12,6 @@ describe('Community List Page', () => {
1312
cy.get('[data-test="expand-button"]').click({ multiple: true });
1413

1514
// Analyze <ds-community-list-page> for accessibility issues
16-
// Disable heading-order checks until it is fixed
17-
testA11y('ds-community-list-page',
18-
{
19-
rules: {
20-
'heading-order': { enabled: false },
21-
'button-name': { enabled: false },
22-
}
23-
} as Options
24-
);
15+
testA11y('ds-community-list-page');
2516
});
2617
});

0 commit comments

Comments
 (0)