Skip to content

Commit

Permalink
feat: 📝 initial template files
Browse files Browse the repository at this point in the history
The goal of this initial setup is to create a template that is
extendable.  It is not the goal to create a template that contains
everything, but files specific to all templates created from it.

Files included (with reasoning):

1. README (requires edits) - the bare bones required to get up and
   running
2. LICENSE - GPL license for open source
3. .alexignore - for verifying inclusive grammar for all writing
4. .editorconfig - puts the spaces/tabs to bed
5. .gitattributes - sets end of line settings on all git tracked files
6. .gitignore - ignore all of the unnecessary files on the system
7. .github/ - create the basic workflow actions to be used, including
   greetings for first time contributors, adds labels to PRs, runs
security checks and sets stale PRs
  • Loading branch information
iamnewton committed Oct 11, 2024
0 parents commit 53d0a2c
Show file tree
Hide file tree
Showing 12 changed files with 992 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .alexignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.github/*
CHANGELOG.md
LICENSE
24 changes: 24 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
root = true

[*]
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
indent_style = tab
indent_size = 4

[.gitattributes]
indent_style = space
indent_size = 2

[*.{json,yml}]
indent_style = space
indent_size = 2

[*.md]
trim_trailing_whitespace = false

[.*{rc,ignore}]
indent_style = space
indent_size = 2
12 changes: 12 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Enforce Unix newlines
*.css text eol=lf
*.html text eol=lf
*.js text eol=lf
*.json text eol=lf
*.scss text eol=lf
*.md text eol=lf
*.svg text eol=lf
*.yml text eol=lf

# Don't diff or textually merge source maps
*.map binary
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @theholocron/gatekeepers
15 changes: 15 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Add 'docs' label to any changes within 'docs' folder or any subfolders
# Add 'docs' label to any change to .md files within the entire repository
documentation:
- changed-files:
- any-glob-to-any-file:
- docs/**
- '**/*.md'

# Add 'bug' label to any PR where the head branch name starts with `fix` or has a `fix` section in the name
bug:
- head-branch: ['^fix', 'fix']

# Add 'enhancement' label to any PR where the head branch name starts with `feature` or has a `feature` section in the name
enhancement:
- head-branch: ['^feat', 'feature']
29 changes: 29 additions & 0 deletions .github/workflows/greetings.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Greetings

on: [pull_request, issues]

jobs:
greeting:
runs-on: ubuntu-latest
steps:
- uses: actions/first-interaction@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
issue-message: >
Hey @${{ github.event.issue.user.login }}!
We really appreciate you taking the time to report an issue. The
collaborators on this project attempt to help as many people as
possible, but we are a limited number of volunteers, so it is
possible that this will not be addressed as swiftly.
Your patience is much appreciated and we will get back to you as
quickly as possible.
pr-message: >
Hey @${{ github.event.issue.user.login }}!
We really appreciate you taking the time to help out with this PR.
The collaborators on this project attempt to help as many people as
possible, but we are a limited number of volunteers, so it is
possible that this will not be addressed as swiftly.
Your patience is much appreciated and we will get back to you as
quickly as possible.
15 changes: 15 additions & 0 deletions .github/workflows/label.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Labeler

on: [pull_request_target]

jobs:
label:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
- uses: actions/labeler@v4
with:
sync-labels: true
repo-token: "${{ secrets.GITHUB_TOKEN }}"
90 changes: 90 additions & 0 deletions .github/workflows/security.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "Security checks"

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
schedule:
- cron: '25 1 * * 2'

jobs:
analyze:
name: Analyze (${{ matrix.language }})
# Runner size impacts CodeQL analysis time. To learn more, please see:
# - https://gh.io/recommended-hardware-resources-for-running-codeql
# - https://gh.io/supported-runners-and-hardware-resources
# - https://gh.io/using-larger-runners (GitHub.com only)
# Consider using larger runners or machines with greater resources for possible analysis time improvements.
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
permissions:
# required for all workflows
security-events: write

# required to fetch internal or private CodeQL packs
packages: read

# only required for workflows in private repositories
actions: read
contents: read

strategy:
fail-fast: false
matrix:
include:
# CodeQL supports the following values keywords for 'language': 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift'
# Use `c-cpp` to analyze code written in C, C++ or both
# Use 'java-kotlin' to analyze code written in Java, Kotlin or both
# Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
# To learn more about changing the languages that are analyzed or customizing the build mode for your analysis,
# see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning.
# If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how
# your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
steps:
- name: Checkout repository
uses: actions/checkout@v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.

# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality

# If the analyze step fails for one of the languages you are analyzing with
# "We were unable to automatically build your code", modify the matrix above
# to set the build mode to "manual" for that language. Then modify this step
# to build your code.
# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
- if: matrix.build-mode == 'manual'
shell: bash
run: |
echo 'If you are using a "manual" build mode for one or more of the' \
'languages you are analyzing, replace this with the commands to build' \
'your code, for example:'
echo ' make bootstrap'
echo ' make release'
exit 1
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"
24 changes: 24 additions & 0 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Mark stale issues and pull requests

on:
schedule:
- cron: "30 1 * * *"

jobs:
stale:
permissions:
contents: write # only for delete-branch option
issues: write
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v9
with:
days-before-close: 5
days-before-stale: 30
exempt-all-pr-milestones: true
close-issue-message: 'This issue was closed because it has been stalled for 5 days with no activity.'
stale-issue-label: 'wontfix'
stale-issue-message: 'This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.'
stale-pr-label: 'wontfix'
stale-pr-message: 'This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days.'
88 changes: 88 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
# OS or Editor files
._*
.DS_Store
Thumbs.db
.vim-bookmarks
.cache
.settings
.idea
.project
.tmproj
*.esproj
*.sublime-project
*.sublime-workspace
nbproject
.vscode

# Files that might appear on external disks
.Spotlight-V100
.Trashes

# Folder config file
Desktop.ini

# NPM
.npmignore

# Ignore these files if present
.yo-rc.json

# Always-ignore extensions
*~
*.diff
*.err
*.lock
*.orig
*.pyc
*.rej
*.sass-cache
*.sw?
*.vi
*.viminfo
*.netrwhist

# Compiled source
*.com
*.class
*.dll
*.exe
*.o
*.so

# Packages
# It's better to unpack these files and commit the raw source because
# git has its own built in compression methods.
*.7z
*.jar
*.rar
*.zip
*.gz
*.bzip
*.xz
*.lzma

# Packing-only formats
*.iso
*.tar

# Package management formats
*.dmg
*.xpi
*.gem
*.egg
*.deb
*.rpm

# Logs and databases
*.log
*.sql
*.sqlite

# Dependency Managers
node_modules
.turbo

# Locally Built Stuff
coverage
reports
dist
Loading

0 comments on commit 53d0a2c

Please sign in to comment.