Skip to content

Commit

Permalink
fix: updating main branch name
Browse files Browse the repository at this point in the history
  • Loading branch information
whitdog47 committed Dec 20, 2024
1 parent 67842a5 commit d05ab42
Show file tree
Hide file tree
Showing 10 changed files with 87 additions and 88 deletions.
58 changes: 29 additions & 29 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ name: "CodeQL"

on:
push:
branches: [ master ]
branches: [main]
pull_request:
# The branches below must be a subset of the branches above
branches: [ master ]
branches: [main]
schedule:
- cron: '41 22 * * 3'
- cron: "41 22 * * 3"

jobs:
analyze:
Expand All @@ -28,40 +28,40 @@ jobs:
strategy:
fail-fast: false
matrix:
language: [ 'javascript', 'python' ]
language: ["javascript", "python"]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
# Learn more:
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed

steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Checkout repository
uses: actions/checkout@v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# 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.
# queries: ./path/to/local/query, your-org/your-repo/queries@main
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# 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.
# queries: ./path/to/local/query, your-org/your-repo/queries@main

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

#- run: |
# make bootstrap
# make release
#- run: |
# make bootstrap
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
2 changes: 1 addition & 1 deletion .github/workflows/deploy-docs-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Test documentation deployment
on:
pull_request:
branches:
- master
- main
# Review gh actions docs if you want to further define triggers, paths, etc
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#on

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Deploy to GitHub Pages
on:
push:
branches:
- master
- main
# Review gh actions docs if you want to further define triggers, paths, etc
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#on

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
- name: Coverage per file
# All modified files should meet the minimum code coverage requirement.
run: |
export MODIFIED_FILES=$(git diff master...HEAD --name-only | grep -E '\.py$')
export MODIFIED_FILES=$(git diff main...HEAD --name-only | grep -E '\.py$')
export FAILED_COVERAGE_PER_FILE=$(python -c "import json;files=json.load(open('coverage.json'))['files'];covs=map(lambda k, v: (k, v['summary']['percent_covered_display']),files.keys(),files.values()); f=filter(lambda cov:int(cov[1])<50,covs); print('\n'.join('{:<68}{:>3}%'.format(k,v) for k,v in f))")
export FAILED_COVERAGE_FILES=(); echo "$FAILED_COVERAGE_PER_FILE" | while read -r line; do FAILED_COVERAGE_FILES+=${line%%[[:space:]]*};done
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Dispatch helps us effectively manage security incidents by deeply integrating wi

This means you can let Dispatch focus on creating resources, assembling participants, sending out notifications, tracking tasks, and assisting with post-incident reviews; allowing you to focus on actually fixing the issue!

![](https://github.com/Netflix/dispatch/raw/master/docs/images/screenshots/thumb-1.png) ![](https://github.com/Netflix/dispatch/raw/master/docs/images/screenshots/thumb-2.png) ![](https://github.com/Netflix/dispatch/raw/master/docs/images/screenshots/thumb-3.png) ![](https://github.com/Netflix/dispatch/raw/master/docs/images/screenshots/thumb-4.png)
![](https://github.com/Netflix/dispatch/raw/main/docs/images/screenshots/thumb-1.png) ![](https://github.com/Netflix/dispatch/raw/main/docs/images/screenshots/thumb-2.png) ![](https://github.com/Netflix/dispatch/raw/main/docs/images/screenshots/thumb-3.png) ![](https://github.com/Netflix/dispatch/raw/main/docs/images/screenshots/thumb-4.png)

## Project resources

Expand Down
96 changes: 48 additions & 48 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,18 @@ SHELL ["/bin/bash", "-o", "pipefail", "-o", "errexit", "-c"]

# Get and set up Node for front-end asset building
RUN apt-get update && apt-get install -y --no-install-recommends \
# Needed for fetching stuff
ca-certificates \
wget \
&& rm -rf /var/lib/apt/lists/*
# Needed for fetching stuff
ca-certificates \
wget \
&& rm -rf /var/lib/apt/lists/*

RUN wget --quiet -O - https://deb.nodesource.com/setup_20.x | bash - \
&& apt-get install -y nodejs --no-install-recommends
&& apt-get install -y nodejs --no-install-recommends

ARG SOURCE_COMMIT
ENV DISPATCH_BUILD=${SOURCE_COMMIT:-unknown}
LABEL org.opencontainers.image.revision=$SOURCE_COMMIT
LABEL org.opencontainers.image.licenses="https://github.com/netflix/dispatch/blob/${SOURCE_COMMIT:-master}/LICENSE"
LABEL org.opencontainers.image.licenses="https://github.com/netflix/dispatch/blob/${SOURCE_COMMIT:-main}/LICENSE"

ARG DISPATCH_LIGHT_BUILD
ENV DISPATCH_LIGHT_BUILD=${DISPATCH_LIGHT_BUILD}
Expand All @@ -49,11 +49,11 @@ ENV VITE_DISPATCH_COMMIT_MESSAGE="Unknown"

COPY . /usr/src/dispatch/
RUN YARN_CACHE_FOLDER="$(mktemp -d)" \
&& export YARN_CACHE_FOLDER \
&& pushd /usr/src/dispatch \
&& python setup.py bdist_wheel \
&& rm -r "$YARN_CACHE_FOLDER" \
&& mv /usr/src/dispatch/dist /dist
&& export YARN_CACHE_FOLDER \
&& pushd /usr/src/dispatch \
&& python setup.py bdist_wheel \
&& rm -r "$YARN_CACHE_FOLDER" \
&& mv /usr/src/dispatch/dist /dist

# This is the image to be run
FROM python:3.11.10-slim-bullseye
Expand All @@ -74,51 +74,51 @@ RUN groupadd -r dispatch && useradd -r -m -g dispatch dispatch

# Sane defaults for pip
ENV PIP_NO_CACHE_DIR=off \
PIP_DISABLE_PIP_VERSION_CHECK=1 \
# Dispatch config params
DISPATCH_CONF=/etc/dispatch
PIP_DISABLE_PIP_VERSION_CHECK=1 \
# Dispatch config params
DISPATCH_CONF=/etc/dispatch

RUN apt-get update && apt-get install -y --no-install-recommends \
# Needed for fetching stuff
ca-certificates \
wget gnupg \
&& rm -rf /var/lib/apt/lists/*
# Needed for fetching stuff
ca-certificates \
wget gnupg \
&& rm -rf /var/lib/apt/lists/*

RUN echo "deb http://apt.postgresql.org/pub/repos/apt bullseye-pgdg main" > /etc/apt/sources.list.d/pgdg.list \
&& wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add -
&& wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add -

RUN wget --quiet -O - https://deb.nodesource.com/setup_20.x | bash -

COPY --from=sdist /dist/*.whl /tmp/dist/
RUN buildDeps="" \
&& apt-get update \
&& apt-get install -y --no-install-recommends "$buildDeps" \
# remove internal index when internal plugins are separated
&& pip install -U /tmp/dist/*.whl \
&& apt-get purge -y --auto-remove "$buildDeps" \
# We install run-time dependencies strictly after
# build dependencies to prevent accidental collusion.
# These are also installed last as they are needed
# during container run and can have the same deps w/
&& apt-get install -y --no-install-recommends \
pkg-config postgresql-client-14 nodejs \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* \
# mjml has to be installed differently here because
# after node 14, docker will install npm files at the
# root directoy and fail, so we have to create a new
# directory and use it for the install then copy the
# files to the root directory to maintain backwards
# compatibility for email generation
&& mkdir -p /mjml_install \
# if our workdir is /, then pushd/popd doesn't work
# for the npm install. It still tries to install in /,
# which npm can't do
&& cd /mjml_install \
&& npm install --no-cache-dir mjml \
&& mv node_modules / \
&& cd / \
&& rm -rf /mjml_install
&& apt-get update \
&& apt-get install -y --no-install-recommends "$buildDeps" \
# remove internal index when internal plugins are separated
&& pip install -U /tmp/dist/*.whl \
&& apt-get purge -y --auto-remove "$buildDeps" \
# We install run-time dependencies strictly after
# build dependencies to prevent accidental collusion.
# These are also installed last as they are needed
# during container run and can have the same deps w/
&& apt-get install -y --no-install-recommends \
pkg-config postgresql-client-14 nodejs \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* \
# mjml has to be installed differently here because
# after node 14, docker will install npm files at the
# root directoy and fail, so we have to create a new
# directory and use it for the install then copy the
# files to the root directory to maintain backwards
# compatibility for email generation
&& mkdir -p /mjml_install \
# if our workdir is /, then pushd/popd doesn't work
# for the npm install. It still tries to install in /,
# which npm can't do
&& cd /mjml_install \
&& npm install --no-cache-dir mjml \
&& mv node_modules / \
&& cd / \
&& rm -rf /mjml_install

EXPOSE 8000
VOLUME /var/lib/dispatch/files
Expand All @@ -128,4 +128,4 @@ CMD ["server", "start", "dispatch.main:app", "--host=0.0.0.0"]

ARG SOURCE_COMMIT
LABEL org.opencontainers.image.revision=$SOURCE_COMMIT
LABEL org.opencontainers.image.licenses="https://github.com/netflix/dispatch/blob/${SOURCE_COMMIT:-master}/LICENSE"
LABEL org.opencontainers.image.licenses="https://github.com/netflix/dispatch/blob/${SOURCE_COMMIT:-main}/LICENSE"
2 changes: 1 addition & 1 deletion docs/docs/administration/installation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Note: Dispatch will not start without at least a few required configuration vari
:::

:::info
Note: Dispatch does not contain any data by default. For evaluation purposes, we do provide an example data set located [here](https://github.com/Netflix/dispatch/blob/master/data/dispatch-sample-data.dump). For instructions on how to restore this data, see [here](cli.mdx).
Note: Dispatch does not contain any data by default. For evaluation purposes, we do provide an example data set located [here](https://github.com/Netflix/dispatch/blob/main/data/dispatch-sample-data.dump). For instructions on how to restore this data, see [here](cli.mdx).
:::

To start, run the install script:
Expand Down
7 changes: 3 additions & 4 deletions docs/docs/administration/settings/messaging.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Dispatch supports sending email notifications to participants of, for example, a

## Notification templates

Templates for emails are [part](https://github.com/Netflix/dispatch/tree/master/src/dispatch/messaging/email/templates) of Dispatch
Templates for emails are [part](https://github.com/Netflix/dispatch/tree/main/src/dispatch/messaging/email/templates) of Dispatch
and are [Jinja](https://jinja.palletsprojects.com/) templates that during runtime are compiled into [MJML](https://mjml.io/) format.

There is a way to customize these templates. To do this, if you run Dispatch with [Docker Compose](https://github.com/Netflix/dispatch-docker/),
Expand All @@ -18,9 +18,9 @@ mount a volume with a customized templates dir as part of the docker compose:
- "../dispatch-templates/messaging-email-templates:/usr/local/lib/python3.11/site-packages/dispatch/messaging/email/templates"
```

Such approach allows you to customize the common template for *all projects*.
Such approach allows you to customize the common template for _all projects_.

You can also "patch" the templates *per project*. Create a folder per project (identified by project id):
You can also "patch" the templates _per project_. Create a folder per project (identified by project id):

```
dispatch/messaging/email/templates/project_id/<project_id>/base.mjml
Expand All @@ -33,7 +33,6 @@ otherwise the resolution process will gracefully fall back to the default templa
dispatch/messaging/email/templates/base.mjml
```


## Markdown in the notifications

:::warning
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/support.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Once you've submitted the issue, it will be handled by our triage team, typicall
## Support Versions

At any given time, we will provide security support for the `master` branch and the two most recent releases.
At any given time, we will provide security support for the `main` branch and the two most recent releases.

## Disclosure Process

Expand Down
2 changes: 1 addition & 1 deletion docs/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ const config = {
docs: {
sidebarPath: require.resolve("./sidebars.js"),
editUrl: ({ docPath }) =>
`https://github.com/netflix/dispatch/edit/master/docs/docs/${docPath}`,
`https://github.com/netflix/dispatch/edit/main/docs/docs/${docPath}`,
},
theme: {
customCss: require.resolve("./src/css/custom.css"),
Expand Down

0 comments on commit d05ab42

Please sign in to comment.