Skip to content

Commit 645d3e9

Browse files
authored
Initial commit
0 parents  commit 645d3e9

Some content is hidden

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

49 files changed

+6727
-0
lines changed

.codeclimate.yml

Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
version: "2"
2+
checks:
3+
argument-count:
4+
enabled: false
5+
method-complexity:
6+
config:
7+
threshold: 10
8+
method-lines:
9+
config:
10+
threshold: 40
11+
method-count:
12+
config:
13+
threshold: 25
14+
15+
plugins:
16+
# https://docs.codeclimate.com/docs/eslint
17+
# ES Linting requires an .eslintrc file to tweak checks.
18+
eslint:
19+
enabled: true
20+
markdownlint:
21+
enabled: false
22+
# CSS is generated and shouldn't be linted.
23+
csslint:
24+
enabled: false
25+
# We don't lint our coffee. Eew.
26+
coffeelint:
27+
enabled: false
28+
# SASS Lint requires a .sass-lint.yml file in the repo in order to tweak settings.
29+
# Withouth the .sass-lint.yml file it will run with the defaults.
30+
# Defaults file: https://github.com/sasstools/sass-lint/blob/master/lib/config/sass-lint.yml
31+
sass-lint:
32+
enabled: true
33+
# SCSS Lint requires a .scss-lint.yml file in the repo in order to tweak settings.
34+
# Withouth the .scss-lint.yml file it will run with the defaults.
35+
# Defaults file: https://github.com/brigade/scss-lint/blob/master/config/default.yml
36+
scss-lint:
37+
enabled: false
38+
phpcodesniffer:
39+
enabled: true
40+
checks:
41+
Drupal Commenting FunctionComment TypeHintMissing:
42+
enabled: true
43+
Drupal Commenting FunctionComment IncorrectTypeHint:
44+
enabled: true
45+
DrupalPractice Commenting CommentEmptyLine SpacingAfter:
46+
enabled: true
47+
Drupal NamingConventions ValidFunctionName ScopeNotCamelCaps:
48+
enabled: true
49+
Drupal NamingConventions ValidClassName StartWithCaptial:
50+
enabled: false
51+
Drupal NamingConventions ValidFunctionName NotCamelCaps:
52+
enabled: false
53+
DrupalPractice General ClassName ClassPrefix:
54+
enabled: false
55+
Drupal NamingConventions ValidClassName NoUnderscores:
56+
enabled: true
57+
config:
58+
file_extensions: "php,inc,install,module,profile"
59+
standard: "Drupal,DrupalPractice"
60+
phpmd:
61+
enabled: true
62+
checks:
63+
Design/WeightedMethodCount:
64+
enabled: false
65+
CleanCode/StaticAccess:
66+
enabled: false
67+
CleanCode/ElseExpression:
68+
enabled: false
69+
CleanCode/BooleanArgumentFlag:
70+
enabled: false
71+
UnusedFormalParameter:
72+
enabled: false
73+
Naming/ShortVariable:
74+
enabled: false
75+
config:
76+
# https://phpmd.org/rules/index.html
77+
# The following sets include everything except the controversial set.
78+
# We can configure these further through .xml files. See docs.
79+
rulesets: "cleancode,codesize,design,naming,unusedcode"
80+
# Include special Drupal file extensions.
81+
file_extensions: "inc,module,profile,php,install"
82+
# https://docs.codeclimate.com/docs/phan
83+
phan:
84+
enabled: true
85+
config:
86+
file_extensions: "php,module,profile,inc"
87+
# minimum-severity: 1
88+
ignore-undeclared: true
89+
# quick: true
90+
# backward-compatiility-checks: true
91+
# dead-code-detection: true
92+
# https://docs.codeclimate.com/docs/duplication
93+
duplication:
94+
enabled: true
95+
# exclude_paths:
96+
# - examples/
97+
config:
98+
languages:
99+
javascript:
100+
mass_threshold: 50
101+
# count_threshold: 3
102+
fixme:
103+
enabled: true
104+
config:
105+
strings:
106+
- FIXME
107+
- BUG
108+
- TODO
109+
- todo
110+
- dpm
111+
- dsm
112+
# exclude these files/paths
113+
exclude_patterns:
114+
- "test"
115+
- "tests"
116+
- "**/tests/**/*"
117+
- "vendor"
118+
- "vendors"
119+
- "node_modules"
120+
- "composer.json"
121+
- "package.json"
122+
- "webpack.config.js"
123+
- "**.min.*"
124+
- "spec/"
125+
- "dist/"
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
5+
---
6+
7+
**Describe the bug**
8+
A clear and concise description of what the bug is.
9+
10+
**To Reproduce**
11+
Steps to reproduce the behavior:
12+
1. Go to '...'
13+
2. Click on '....'
14+
3. Scroll down to '....'
15+
4. See error
16+
17+
**Expected behavior**
18+
A clear and concise description of what you expected to happen.
19+
20+
**Screenshots**
21+
If applicable, add screenshots to help explain your problem.
22+
23+
**Desktop (please complete the following information):**
24+
- OS: [e.g. iOS]
25+
- Browser [e.g. chrome, safari]
26+
- Version [e.g. 22]
27+
28+
**Smartphone (please complete the following information):**
29+
- Device: [e.g. iPhone6]
30+
- OS: [e.g. iOS8.1]
31+
- Browser [e.g. stock browser, safari]
32+
- Version [e.g. 22]
33+
34+
**Additional context**
35+
Add any other context about the problem here.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
5+
---
6+
7+
**Is your feature request related to a problem? Please describe.**
8+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
9+
10+
**Describe the solution you'd like**
11+
A clear and concise description of what you want to happen.
12+
13+
**Describe alternatives you've considered**
14+
A clear and concise description of any alternative solutions or features you've considered.
15+
16+
**Additional context**
17+
Add any other context or screenshots about the feature request here.

.github/auto-label.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"rules": {
3+
"patch": ["*.info.yml"],
4+
"frontend": ["*.js", "*.scss", "*.css", "*.twig", ".theme"],
5+
"backend": ["*.php", "*.module"],
6+
"ci": [".circleci", "blt", ".github"]
7+
}
8+
}

.github/pull_request_template.md

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# NOT READY FOR REVIEW
2+
- (Edit the above to reflect status)
3+
4+
# Summary
5+
- TL;DR - what's this PR for?
6+
7+
# Review By (Date)
8+
- When does this need to be reviewed by?
9+
10+
# Criticality
11+
- How critical is this PR on a 1-10 scale? Also see [Severity Assessment](https://stanfordits.atlassian.net/browse/D8CORE-1705).
12+
- E.g., it affects one site, or every site and product?
13+
14+
# Urgency
15+
- How urgent is this? (Normal, High)
16+
17+
# Review Tasks
18+
19+
## Setup tasks and/or behavior to test
20+
21+
1. Check out this branch
22+
2. Rebuild Cache and import config `drush cr ; drush ci`
23+
3. Navigate to...
24+
4. Verify...
25+
26+
### Site Configuration Sync
27+
28+
- Is there a config:export in this PR that changes the config sync directory?
29+
30+
## Front End Validation
31+
- [ ] Design is approved by @ user?
32+
- [ ] HTML validation: Is the markup using the appropriate semantic tags and [passes validation](https://validator.w3.org/nu/)? Or, [QA request ticket created](https://github.com/SU-SWS/template_warehouse/blob/master/jira_templates/QA_request_template.txt)?
33+
- [ ] Cross-browser testing: Has been performed? Or, [QA request ticket created](https://github.com/SU-SWS/template_warehouse/blob/master/jira_templates/QA_request_template.txt)?
34+
- [ ] Automated accessibility: Scans performed? Or, [QA request ticket created](https://github.com/SU-SWS/template_warehouse/blob/master/jira_templates/QA_request_template.txt)?
35+
- [ ] Manual accessibility: Manually tested? Or, [QA request ticket created](https://github.com/SU-SWS/template_warehouse/blob/master/jira_templates/QA_request_template.txt)?
36+
37+
## Backend / Functional Validation
38+
### Code
39+
- [ ] Are the naming conventions following our standards?
40+
- [ ] Does the code have sufficient inline comments?
41+
- [ ] Is there anything in this code that would be hidden or hard to discover through the UI?
42+
- [ ] Are there any [code smells](https://blog.codinghorror.com/code-smells/)?
43+
- [ ] Are tests provided? eg (unit, behat, or codeception)
44+
45+
### Code security
46+
- [ ] Are all [forms properly sanitized](https://www.drupal.org/docs/8/security/drupal-8-sanitizing-output)?
47+
- [ ] Any obvious [security flaws or new areas for attack](https://www.drupal.org/docs/8/security)?
48+
49+
## General
50+
- [ ] Is there anything included in this PR that is not related to the problem it is trying to solve?
51+
- [ ] Is the approach to the problem appropriate?
52+
53+
# Affected Projects or Products
54+
- Does this PR impact any particular projects, products, or modules?
55+
56+
# Associated Issues and/or People
57+
- JIRA ticket(s)
58+
- Other PRs
59+
- Any other contextual information that might be helpful (e.g., description of a bug that this PR fixes, new functionality that it adds, etc.)
60+
- Anyone who should be notified? (`@mention` them here)
61+
62+
# Resources
63+
- [AMP Tool](https://stanford.levelaccess.net/index.php)
64+
- [Accessibility Manual Test Script](https://docs.google.com/document/d/1ZXJ9RIUNXsS674ow9j3qJ2g1OAkCjmqMXl0Gs8XHEPQ/edit?usp=sharing)
65+
- [HTML Validator](https://validator.w3.org/)
66+
- [Browserstack](https://live.browserstack.com/dashboard) and link to [Browserstack Credentials](https://asconfluence.stanford.edu/confluence/display/SWS/External+Account+Credentials)

.github/workflows/label.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# This workflow will triage pull requests and apply a label based on the
2+
# paths that are modified in the pull request.
3+
#
4+
# To use this workflow, you will need to set up a .github/labeler.yml
5+
# file with configuration. For more information, see:
6+
# https://github.com/actions/labeler/blob/master/README.md
7+
8+
name: PR Labeler
9+
on:
10+
pull_request:
11+
types: [opened, synchronize]
12+
jobs:
13+
pr-labeler:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v2
17+
- uses: codelytv/pr-size-labeler@v1
18+
with:
19+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
20+
xs_max_size: '100'
21+
s_max_size: '500'
22+
m_max_size: '1000'
23+
l_max_size: '3000'
24+
fail_if_xl: 'false'
25+
message_if_xl: ''
26+
- uses: banyan/auto-label@1.2
27+
env:
28+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/release.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# .github/workflows/release.yml
2+
name: Release
3+
4+
on:
5+
pull_request:
6+
types: closed
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Tag
13+
uses: K-Phoen/semver-release-action@master
14+
with:
15+
release_branch: master
16+
tag_format: "%major%.%minor%.%patch%"
17+
env:
18+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
*.scssc
2+
*.sassc
3+
.sass-cache
4+
*.map
5+
node_modules
6+
.DS_Store
7+
*.log
8+
*.sql

.gitpod.yml

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
github:
2+
prebuilds:
3+
master: true
4+
branches: true
5+
pullRequests: true
6+
pullRequestsFromForks: false
7+
addCheck: false
8+
addComment: false
9+
addBadge: false
10+
additionalRepositories:
11+
- url: https://github.com/SU-SWS/acsf-cardinalsites-public/
12+
checkoutLocation: stack
13+
ports:
14+
- port: 3306
15+
onOpen: ignore
16+
visibility: private
17+
- port: 33060
18+
onOpen: ignore
19+
visibility: private
20+
- port: 8001
21+
onOpen: open-browser
22+
visibility: public
23+
image: pookmish/drupal8ci:gitpod
24+
tasks:
25+
- before: >
26+
eval $(command gp env -e) &&
27+
mkdir -p ~/.ssh &&
28+
[[ ! -z $SSH_PUBLIC_KEY ]] &&
29+
echo $SSH_PUBLIC_KEY | base64 -d > ~/.ssh/id_rsa.pub &&
30+
chmod 644 ~/.ssh/id_rsa.pub &&
31+
[[ ! -z $SSH_PRIVATE_KEY ]] &&
32+
echo $SSH_PRIVATE_KEY | base64 -d > ~/.ssh/id_rsa &&
33+
chmod 600 ~/.ssh/id_rsa &&
34+
[[ ! -z $GITCONFIG ]] &&
35+
echo $GITCONFIG | base64 -d > ~/.gitconfig &&
36+
chmod 644 ~/.gitconfig
37+
init: >
38+
export THEME_NAME=${PWD##*/} &&
39+
export PREVIEW_FULL_URL=`gp url 8001` &&
40+
export PREVIEW_URL=${PREVIEW_FULL_URL#"https://"} &&
41+
cd /workspace &&
42+
mkdir theme &&
43+
rsync -r $GITPOD_REPO_ROOT/ theme &&
44+
find $GITPOD_REPO_ROOT -name . -o -prune -exec rm -rf -- {} + &&
45+
rsync -r stack/ $GITPOD_REPO_ROOT/ &&
46+
mkdir -p $GITPOD_REPO_ROOT/docroot/themes/custom &&
47+
mv theme $GITPOD_REPO_ROOT/docroot/themes/custom/$THEME_NAME &&
48+
cd $GITPOD_REPO_ROOT &&
49+
export PREVIEW_FULL_URL=`gp url 8001` &&
50+
export PREVIEW_URL=${PREVIEW_FULL_URL#"https://"} &&
51+
composer install --no-interaction &&
52+
cp .gitpod/blt.yml blt/local.blt.yml &&
53+
mkdir -p docroot/sites/settings &&
54+
find docroot/sites/ -name 'local*' | xargs rm &&
55+
cp .gitpod/global.settings.php docroot/sites/settings/global.settings.php &&
56+
cp .gitpod/default.local.services.yml docroot/sites/local.services.yml &&
57+
blt blt:telemetry:disable --no-interaction &&
58+
blt settings &&
59+
drush si stanford_profile -v -y &&
60+
drush cr &&
61+
drush cim -y &&
62+
drush then $THEME_NAME &&
63+
drush cset system.theme default $THEME_NAME -y
64+
command: |
65+
export THEME_NAME=${PWD##*/} &&
66+
export PREVIEW_FULL_URL=`gp url 8001` &&
67+
export PREVIEW_URL=${PREVIEW_FULL_URL#"https://"} &&
68+
apache2ctl restart
69+
drush uli
70+
drush uli | xargs gp preview --external
71+
git config core.fileMode false
72+
blt blt:telemetry:disable --no-interaction
73+
cd docroot/themes/custom/$THEME_NAME &&
74+
git remote set-url origin git@github.com:SU-SWS/$THEME_NAME.git &&
75+
nvm install &&
76+
nvm use &&
77+
yarn &&
78+
yarn watch

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
20

0 commit comments

Comments
 (0)