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

CI / CD files for React branch. #568

Merged
merged 14 commits into from
Jan 11, 2022
Merged
38 changes: 38 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
name: Bug Report
about: Create a report to help us fix a bug.w
title: 'BUG: '
labels: ''
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

**Additional context**
Add any other context about the problem here.
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature Request
about: Suggest a new feature for CIPP.
title: 'FEATURE REQUEST: '
labels: ''
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
11 changes: 11 additions & 0 deletions .github/workflows/Assign_Issue_Volunteer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: "Assign Issue to Volunteer"

on: [issue_comment]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: bhermann/issue-volunteer@v0.1.12
with:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
27 changes: 27 additions & 0 deletions .github/workflows/Check_for_Version_Update.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Check for Version Update

on:
pull_request:
branches: [ master ]

workflow_dispatch:

jobs:
build:
name: "Check for Version Update"
runs-on: ubuntu-latest

steps:

- name: Check for Changed Files
uses: brettcannon/check-for-changed-files@v1.1.0
with:
file-pattern: version_latest.txt
failure-message: "You have not updated version_latest.txt. This is a required file to update at each PR. Please sync your latest changes and update the version number."

- name: Prevent changes to workflow files
uses: DovnarAlexander/github-action-file-detection@v0.3.0
with:
wildcard: ".github/workflows/*.yml"
exit_code_found: 1
exit_code_not_found: 0
17 changes: 17 additions & 0 deletions .github/workflows/Close_Stale_Issues_and_PRs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: 'Close stale issues and PRs'
on:
schedule:
- cron: '30 1 * * *'

jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v4
with:
stale-issue-message: 'This issue is stale because it has been open 10 days with no activity. We will close this issue soon. If you want this feature implemented you can contribute it. See: https://cipp.app/GettingStarted/Contributions/ . Please notify the team if you are working on this yourself.'
close-issue-message: 'This issue was closed because it has been stalled for 14 days with no activity.'
stale-issue-label: 'no-activity'
exempt-issue-labels: 'planned'
days-before-stale: 9
days-before-close: 14
38 changes: 38 additions & 0 deletions .github/workflows/CodeQL_Analyser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: "CodeQL"

on:
push:
branches: [ master, dev, react ]
pull_request:
branches: [ master, dev, react ]
schedule:
- cron: '26 17 * * 0'

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [ 'javascript' ]

steps:
- name: Checkout Repository
uses: actions/checkout@v2

- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}

- name: Autobuild
uses: github/codeql-action/autobuild@v1

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
38 changes: 38 additions & 0 deletions .github/workflows/Comment_on_Issues.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Add Comment
on:
issues:
types:
- labeled
jobs:
add-comment_bug:
if: github.event.label.name == 'unconfirmed-by-user'
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- name: Add Comment
uses: peter-evans/create-or-update-comment@a35cf36e5301d70b76f316e867e7788a55a31dae
with:
issue-number: ${{ github.event.issue.number }}
body: |
Thank you for creating a bug. Please make sure your bug is indeed a unique case by checking current and past issues, and reading the complete documentation at https://kelvintegelaar.github.io/CIPP
If your bug is a known documentation issue, it will be closed without notice by a contributor. To confirm that this is not a bug found in the documentation, please copy and paste the following comment: "I confirm that I have checked the documentation thoroughly and believe this to be an actual bug.".

Without confirming, your report will be closed in 24 hours. If you'd like this bug to be assigned to you, please comment "I would like to work on this please!".

add-comment_fr:
if: github.event.label.name == 'enhancement'
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- name: Add Comment
uses: peter-evans/create-or-update-comment@a35cf36e5301d70b76f316e867e7788a55a31dae
with:
issue-number: ${{ github.event.issue.number }}
body: |
Thank you for creating a feature request! feature requests are prioritized by our direct contributors. Your current priority is set to "No Priority". If you are a sponsor you can request an upgrade of priority, If you want this feature to be integrated you can always do this yourself by checking out our contributions guide at https://kelvintegelaar.github.io/CIPP/GettingStarted/Contributions.html. Contributors to the CIPP project reserve the right to close feature requests at will.

If your feature request is not picked up in 2 week by a contributor it will be closed.

If you'd like this feature request to be assigned to you, please comment "I would like to work on this please!".
28 changes: 28 additions & 0 deletions .github/workflows/Label_Issues.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Label Issues
on:
issues:
types:
- opened
jobs:
label_issues_bugs:
if: contains(github.event.issue.title,'Bug')
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- name: Label Issues
uses: andymckay/labeler@5c59dabdfd4dd5bd9c6e6d255b01b9d764af4414
with:
add-labels: "unconfirmed-by-user"
repo-token: ${{ secrets.GITHUB_TOKEN }}
label_issues_frs:
if: contains(github.event.issue.title,'Feature')
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- name: Label Issues
uses: andymckay/labeler@5c59dabdfd4dd5bd9c6e6d255b01b9d764af4414
with:
add-labels: "enhancement, no-priority"
repo-token: ${{ secrets.GITHUB_TOKEN }}
40 changes: 40 additions & 0 deletions .github/workflows/Node_Project_Check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: NodeJS Project Check

on:
push:
branches:
- master
- react
pull_request:
branches:
- master
- react

concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.ref }}
cancel-in-progress: true

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [16.x, 17.x]
os: [ubuntu-latest, windows-latest, macOS-latest]

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: Install Test
run: npm i --legacy-peer-deps
env:
CI: true
- name: Build Test
run: npm run build
env:
CI: true
32 changes: 32 additions & 0 deletions .github/workflows/Run_Linters.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Run Linters
on:
push:
branches:
- master
- react
pull_request:
branches:
- master
- react

concurrency:
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.ref }}
cancel-in-progress: true

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: 16.x
- name: Install Linters
run: npm i --legacy-peer-deps -D eslint prettier
- uses: wearerequired/lint-action@v1
name: Lint
with:
eslint: true
eslint_args: "--max-warnings 0"
prettier: true
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,5 +82,8 @@
"engines": {
"node": "16",
"npm": ">=7"
}
},
"eslintIgnore": [
"node_modules/"
]
}
2 changes: 0 additions & 2 deletions src/components/Wizard.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ import React from 'react'
import PropTypes from 'prop-types'
import { Form } from 'react-final-form'
import { CButton, CCardHeader, CNav, CNavItem, CNavLink, CRow, CCol } from '@coreui/react'
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import { faCircleNotch } from '@fortawesome/free-solid-svg-icons'
import { CippPage } from 'src/components'

export default class Wizard extends React.Component {
Expand Down
12 changes: 0 additions & 12 deletions src/components/cipp/CippOffcanvasListGroup.js

This file was deleted.

12 changes: 7 additions & 5 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,13 @@ import { PersistGate } from 'redux-persist/integration/react'
import { FullScreenLoading } from './components'

ReactDOM.render(
<Provider store={store}>
<PersistGate loading={<FullScreenLoading />} persistor={persistor}>
<App />
</PersistGate>
</Provider>,
<React.StrictMode>
<Provider store={store}>
<PersistGate loading={<FullScreenLoading />} persistor={persistor}>
<App />
</PersistGate>
</Provider>
</React.StrictMode>,
document.getElementById('root'),
)

Expand Down
1 change: 0 additions & 1 deletion src/views/email-exchange/administration/ContactsList.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { CippPageList } from 'src/components'
import { cellBooleanFormatter } from 'src/components/cipp'
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import { faEdit } from '@fortawesome/free-solid-svg-icons'
import { Link } from 'react-router-dom'
const Dropdown = (row, rowIndex, formatExtraData) => {
const tenant = useSelector((state) => state.app.currentTenant)

Expand Down
2 changes: 1 addition & 1 deletion src/views/identity/administration/Users.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, { useState } from 'react'
import { CButton } from '@coreui/react'
import { Link } from 'react-router-dom'
import { useSelector } from 'react-redux'
import { faPlus, faEdit, faTrash, faEllipsisV, faEye } from '@fortawesome/free-solid-svg-icons'
import { faEdit, faTrash, faEllipsisV, faEye } from '@fortawesome/free-solid-svg-icons'
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import { cellBooleanFormatter } from 'src/components/cipp'
import { CippPageList } from 'src/components'
Expand Down
11 changes: 1 addition & 10 deletions src/views/tenant/standards/ListAppliedStandards.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,6 @@
import React from 'react'
import { useSelector } from 'react-redux'
import { CippDatatable } from '../../../components/cipp'
import {
CCard,
CCardBody,
CCardTitle,
CCardHeader,
CSpinner,
CButton,
CCallout,
} from '@coreui/react'
import { CSpinner, CButton, CCallout } from '@coreui/react'
import { faTrash } from '@fortawesome/free-solid-svg-icons'
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import { CippPageList, ModalService } from '../../../components'
Expand Down