chore: update ci and formatting

This commit is contained in:
Mythie
2023-12-08 13:01:08 +11:00
parent 520522bef7
commit 7feba02e08
15 changed files with 90 additions and 102 deletions

View File

@ -1,11 +1,10 @@
name: "Bug Report" name: 'Bug Report'
labels: ["bug"] labels: ['bug']
description: Create a bug report to help us improve description: Create a bug report to help us improve
body: body:
- type: markdown - type: markdown
attributes: attributes:
value: value: Thank you for reporting an issue.
Thank you for reporting an issue.
Please fill in as much of the form below as you're able to. Please fill in as much of the form below as you're able to.
- type: textarea - type: textarea
attributes: attributes:

View File

@ -1,9 +1,9 @@
name: "Feature Request" name: 'Feature Request'
description: Suggest a new idea or enhancement for this project description: Suggest a new idea or enhancement for this project
body: body:
- type: markdown - type: markdown
attributes: attributes:
value: Please provide a clear and concise title for your feature request value: Please provide a clear and concise title for your feature request
- type: textarea - type: textarea
attributes: attributes:
label: Feature Description label: Feature Description
@ -32,4 +32,4 @@ body:
- label: I have provided a detailed description of the requested feature. - label: I have provided a detailed description of the requested feature.
- label: I have explained the use case or scenario for this feature. - label: I have explained the use case or scenario for this feature.
- label: I have included any relevant technical details or design suggestions. - label: I have included any relevant technical details or design suggestions.
- label: I understand that this is a suggestion and that there is no guarantee of implementation. - label: I understand that this is a suggestion and that there is no guarantee of implementation.

View File

@ -1,4 +1,4 @@
name: "General Improvement" name: 'General Improvement'
description: Suggest a minor enhancement or improvement for this project description: Suggest a minor enhancement or improvement for this project
body: body:
- type: markdown - type: markdown
@ -32,4 +32,4 @@ body:
- label: I have provided a clear description of the improvement being suggested. - label: I have provided a clear description of the improvement being suggested.
- label: I have explained the rationale behind this improvement. - label: I have explained the rationale behind this improvement.
- label: I have included any relevant technical details or design suggestions. - label: I have included any relevant technical details or design suggestions.
- label: I understand that this is a suggestion and that there is no guarantee of implementation. - label: I understand that this is a suggestion and that there is no guarantee of implementation.

View File

@ -4,29 +4,29 @@ updates:
- package-ecosystem: 'github-actions' - package-ecosystem: 'github-actions'
directory: '/' directory: '/'
schedule: schedule:
interval: "weekly" interval: 'weekly'
target-branch: "main" target-branch: 'main'
labels: labels:
- "ci dependencies" - 'ci dependencies'
- "ci" - 'ci'
open-pull-requests-limit: 0 open-pull-requests-limit: 0
- package-ecosystem: "npm" - package-ecosystem: 'npm'
directory: "/apps/marketing" directory: '/apps/marketing'
schedule: schedule:
interval: "weekly" interval: 'weekly'
target-branch: "main" target-branch: 'main'
labels: labels:
- "npm dependencies" - 'npm dependencies'
- "frontend" - 'frontend'
open-pull-requests-limit: 0 open-pull-requests-limit: 0
- package-ecosystem: "npm" - package-ecosystem: 'npm'
directory: "/apps/web" directory: '/apps/web'
schedule: schedule:
interval: "weekly" interval: 'weekly'
target-branch: "main" target-branch: 'main'
labels: labels:
- "npm dependencies" - 'npm dependencies'
- "frontend" - 'frontend'
open-pull-requests-limit: 0 open-pull-requests-limit: 0

View File

@ -1,7 +1,7 @@
'apps: marketing': 'apps: marketing':
- apps/marketing/** - apps/marketing/**
'apps: web': 'apps: web':
- apps/web/** - apps/web/**
'version bump 👀': 'version bump 👀':
@ -14,7 +14,7 @@
'🚨 e2e changes 🚨': '🚨 e2e changes 🚨':
- packages/app-tests/e2e/** - packages/app-tests/e2e/**
"🚨 .env changes 🚨": '🚨 .env changes 🚨':
- .env.example - .env.example
'pkg: ee changes': 'pkg: ee changes':

View File

@ -1,10 +1,10 @@
name: "Continuous Integration" name: 'Continuous Integration'
on: on:
push: push:
branches: [ "main" ] branches: ['main']
pull_request: pull_request:
branches: [ "main" ] branches: ['main']
concurrency: concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
@ -16,7 +16,6 @@ env:
jobs: jobs:
build_app: build_app:
name: Build App name: Build App
if: github.repository == 'documenso/documenso'
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout - name: Checkout
@ -50,4 +49,3 @@ jobs:
- name: Build Docker Image - name: Build Docker Image
run: ./docker/build.sh run: ./docker/build.sh

View File

@ -1,11 +1,11 @@
name: "CodeQL" name: 'CodeQL'
on: on:
workflow_dispatch: workflow_dispatch:
push: push:
branches: [ "main" ] branches: ['main']
pull_request: pull_request:
branches: [ "main" ] branches: ['main']
jobs: jobs:
analyze: analyze:
@ -19,30 +19,30 @@ jobs:
strategy: strategy:
fail-fast: true fail-fast: true
matrix: matrix:
language: [ 'javascript' ] language: ['javascript']
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v4 uses: actions/checkout@v4
- uses: actions/setup-node@v4 - uses: actions/setup-node@v4
with: with:
node-version: 18 node-version: 18
cache: npm cache: npm
- name: Install Dependencies - name: Install Dependencies
run: npm ci run: npm ci
- name: Copy env - name: Copy env
run: cp .env.example .env run: cp .env.example .env
- name: Build Documenso - name: Build Documenso
run: npm run build run: npm run build
- name: Initialize CodeQL - name: Initialize CodeQL
uses: github/codeql-action/init@v2 uses: github/codeql-action/init@v2
with: with:
languages: ${{ matrix.language }} languages: ${{ matrix.language }}
- name: Perform CodeQL Analysis - name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2 uses: github/codeql-action/analyze@v2

View File

@ -1,9 +1,9 @@
name: Playwright Tests name: Playwright Tests
on: on:
push: push:
branches: [ "main" ] branches: ['main']
pull_request: pull_request:
branches: [ "main" ] branches: ['main']
jobs: jobs:
e2e_tests: e2e_tests:
timeout-minutes: 60 timeout-minutes: 60

View File

@ -1,10 +1,10 @@
name: "Welcome New Contributors" name: 'Welcome New Contributors'
on: on:
pull_request: pull_request:
types: opened types: ['opened']
issues: issues:
types: opened types: ['opened']
permissions: permissions:
pull-requests: write pull-requests: write
@ -13,7 +13,7 @@ permissions:
jobs: jobs:
welcome-message: welcome-message:
name: Welcome Contributors name: Welcome Contributors
if: github.repository == 'documenso/documenso' && github.event.action == 'opened' if: github.event.action == 'opened'
runs-on: ubuntu-latest runs-on: ubuntu-latest
timeout-minutes: 10 timeout-minutes: 10
steps: steps:
@ -24,6 +24,6 @@ jobs:
Thank you for creating your first Pull Request and for being a part of the open signing revolution! 💚🚀 Thank you for creating your first Pull Request and for being a part of the open signing revolution! 💚🚀
<br /> Feel free to hop into our community in [Discord](https://documen.so/discord) <br /> Feel free to hop into our community in [Discord](https://documen.so/discord)
issue-message: | issue-message: |
Thank you for opening your first issue and for being a part of the open signing revolution! Thank you for opening your first issue and for being a part of the open signing revolution!
<br /> One of our team members will review it and get back to you as soon as it possible 💚 <br /> One of our team members will review it and get back to you as soon as it possible 💚
<br /> Meanwhile, please feel free to hop into our community in [Discord](https://documen.so/discord) <br /> Meanwhile, please feel free to hop into our community in [Discord](https://documen.so/discord)

View File

@ -1,28 +1,26 @@
name: "Issue Assignee Check" name: 'Issue Assignee Check'
on: on:
issues: issues:
types: [assigned] types: ['assigned']
permissions: permissions:
issues: write issues: write
jobs: jobs:
countIssues: countIssues:
if: ${{ github.event.issue.assignee }} && github.repository == 'documenso/documenso' && github.event.action == 'assigned' && github.event.sender.type == 'User' if: ${{ github.event.issue.assignee }} && github.event.action == 'assigned' && github.event.sender.type == 'User'
runs-on: ubuntu-latest runs-on: ubuntu-latest
env:
MY_ENV_VARIABLE: ${{ secrets.GITHUB_TOKEN }}
steps: steps:
- name: Set up Node.js - name: Set up Node.js
uses: actions/setup-node@v4 uses: actions/setup-node@v4
with: with:
node-version: '18' node-version: '18'
cache: npm cache: npm
- name: Install Octokit - name: Install Octokit
run: npm install @octokit/rest@18 run: npm install @octokit/rest@18
- name: Check Assigned User's Issue Count - name: Check Assigned User's Issue Count
id: parse-comment id: parse-comment
uses: actions/github-script@v5 uses: actions/github-script@v5
@ -31,20 +29,20 @@ jobs:
script: | script: |
const { Octokit } = require("@octokit/rest"); const { Octokit } = require("@octokit/rest");
const octokit = new Octokit({ auth: process.env.GITHUB_TOKEN }); const octokit = new Octokit({ auth: process.env.GITHUB_TOKEN });
const username = context.payload.issue.assignee.login; const username = context.payload.issue.assignee.login;
console.log(`Username Extracted: ${username}`); console.log(`Username Extracted: ${username}`);
const { data: issues } = await octokit.issues.listForRepo({ const { data: issues } = await octokit.issues.listForRepo({
owner: context.repo.owner, owner: context.repo.owner,
repo: context.repo.repo, repo: context.repo.repo,
assignee: username, assignee: username,
state: 'open' state: 'open'
}); });
const issueCount = issues.length; const issueCount = issues.length;
console.log(`Issue Count For ${username}: ${issueCount}`); console.log(`Issue Count For ${username}: ${issueCount}`);
if (issueCount > 3) { if (issueCount > 3) {
let issueCountMessage = `### 🚨 Documenso Police 🚨`; let issueCountMessage = `### 🚨 Documenso Police 🚨`;
issueCountMessage += `\n@${username} has ${issueCount} open issues assigned already. Consider whether this issue should be assigned to them or left open for another contributor.`; issueCountMessage += `\n@${username} has ${issueCount} open issues assigned already. Consider whether this issue should be assigned to them or left open for another contributor.`;

View File

@ -1,15 +1,12 @@
name: "Label Issues" name: 'Label Issues'
on: on:
issues: issues:
types: types: ['opened', 'reopened']
- reopened
- opened
jobs: jobs:
label_issues: label_issues:
runs-on: ubuntu-latest runs-on: ubuntu-latest
if: github.repository == 'documenso/documenso'
permissions: permissions:
issues: write issues: write
steps: steps:

View File

@ -1,4 +1,4 @@
name: "PR Labeler" name: 'PR Labeler'
on: on:
- pull_request_target - pull_request_target
@ -9,7 +9,6 @@ concurrency:
jobs: jobs:
labeler: labeler:
if: github.repository == 'documenso/documenso'
permissions: permissions:
contents: read contents: read
pull-requests: write pull-requests: write
@ -18,4 +17,4 @@ jobs:
- uses: actions/labeler@v4 - uses: actions/labeler@v4
with: with:
repo-token: ${{ secrets.GITHUB_TOKEN }} repo-token: ${{ secrets.GITHUB_TOKEN }}
sync-labels: "" sync-labels: ''

View File

@ -1,28 +1,26 @@
name: "PR Review Reminder" name: 'PR Review Reminder'
on: on:
pull_request: pull_request:
types: [opened, reopened, ready_for_review, review_requested] types: ['opened', 'reopened', 'ready_for_review', 'review_requested']
permissions: permissions:
pull-requests: write pull-requests: write
jobs: jobs:
checkPRs: checkPRs:
if: ${{ github.event.pull_request.user.login }} && github.repository == 'documenso/documenso' && github.event.action == ('opened' || 'reopened' || 'ready_for_review' || 'review_requested') if: ${{ github.event.pull_request.user.login }} && github.event.action == ('opened' || 'reopened' || 'ready_for_review' || 'review_requested')
runs-on: ubuntu-latest runs-on: ubuntu-latest
env:
MY_ENV_VARIABLE: ${{ secrets.GITHUB_TOKEN }}
steps: steps:
- name: Set up Node.js - name: Set up Node.js
uses: actions/setup-node@v4 uses: actions/setup-node@v4
with: with:
node-version: '18' node-version: '18'
cache: npm cache: npm
- name: Install Octokit - name: Install Octokit
run: npm install @octokit/rest@18 run: npm install @octokit/rest@18
- name: Check user's PRs awaiting review - name: Check user's PRs awaiting review
id: parse-prs id: parse-prs
uses: actions/github-script@v5 uses: actions/github-script@v5
@ -31,10 +29,10 @@ jobs:
script: | script: |
const { Octokit } = require("@octokit/rest"); const { Octokit } = require("@octokit/rest");
const octokit = new Octokit({ auth: process.env.GITHUB_TOKEN }); const octokit = new Octokit({ auth: process.env.GITHUB_TOKEN });
const username = context.payload.pull_request.user.login; const username = context.payload.pull_request.user.login;
console.log(`Username Extracted: ${username}`); console.log(`Username Extracted: ${username}`);
const { data: pullRequests } = await octokit.pulls.list({ const { data: pullRequests } = await octokit.pulls.list({
owner: context.repo.owner, owner: context.repo.owner,
repo: context.repo.repo, repo: context.repo.repo,

View File

@ -13,7 +13,6 @@ permissions:
jobs: jobs:
validate-pr: validate-pr:
if: github.repository == 'documenso/documenso'
name: Validate PR title name: Validate PR title
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:

View File

@ -1,4 +1,4 @@
name: "Mark Stale Issues and PRs" name: 'Mark Stale Issues and PRs'
on: on:
schedule: schedule:
@ -6,20 +6,20 @@ on:
jobs: jobs:
stale: stale:
if: github.repository == 'documenso/documenso'
runs-on: ubuntu-latest runs-on: ubuntu-latest
permissions: permissions:
issues: write issues: write
pull-requests: write pull-requests: write
steps: steps:
- uses: actions/stale@v4 - uses: actions/stale@v4
with: with:
repo-token: ${{ secrets.GITHUB_TOKEN }} repo-token: ${{ secrets.GITHUB_TOKEN }}
days-before-pr-stale: 30 days-before-pr-stale: 30
days-before-issue-stale: 30 days-before-issue-stale: 30
stale-issue-message: 'This issue has not seen activity for a while. It will be closed in 30 days unless further activity is detected' stale-issue-message: 'This issue has not seen activity for a while. It will be closed in 30 days unless further activity is detected'
stale-pr-message: 'This PR has not seen activitiy for a while. It will be closed in 30 days unless further activity is detected.' stale-pr-message: 'This PR has not seen activitiy for a while. It will be closed in 30 days unless further activity is detected.'
close-issue-message: 'This issue has been closed because of inactivity.' close-issue-message: 'This issue has been closed because of inactivity.'
close-pr-message: 'This PR has been closed because of inactivity.' close-pr-message: 'This PR has been closed because of inactivity.'
exempt-pr-labels: 'WIP, on-hold, needs review' exempt-pr-labels: 'WIP,on-hold,needs review'
exempt-issue-labels: 'WIP,on-hold,needs review,roadmap'