Skip to content

Commit

Permalink
Merge branch 'main' into mbaruh/channel-activity
Browse files Browse the repository at this point in the history
  • Loading branch information
mbaruh committed Mar 15, 2021
2 parents bc66963 + 49c7afa commit d213474
Show file tree
Hide file tree
Showing 9 changed files with 23 additions and 27 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
workflow_run:
workflows: ["Lint & Test"]
branches:
- master
- main
types:
- completed

Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
workflow_run:
workflows: ["Build"]
branches:
- master
- main
types:
- completed

Expand All @@ -13,6 +13,7 @@ jobs:
if: github.event.workflow_run.conclusion == 'success'
name: Deploy to Kubernetes Cluster
runs-on: ubuntu-latest
environment: production

steps:
- name: Create SHA Container Tag
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Lint & Test
on:
push:
branches:
- master
- main
pull_request:


Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/sentry-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ name: Create Sentry release
on:
push:
branches:
- master
- main

jobs:
createSentryRelease:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@master
uses: actions/checkout@main
- name: Create a Sentry.io release
uses: tclindner/sentry-releases-action@v1.2.0
env:
Expand Down
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
# Contributing to one of Our Projects

Our projects are open-source and are automatically deployed whenever commits are pushed to the `master` branch on each repository, so we've created a set of guidelines in order to keep everything clean and in working order.
Our projects are open-source and are automatically deployed whenever commits are pushed to the `main` branch on each repository, so we've created a set of guidelines in order to keep everything clean and in working order.

Note that contributions may be rejected on the basis of a contributor failing to follow these guidelines.

## Rules

1. **No force-pushes** or modifying the Git history in any way.
2. If you have direct access to the repository, **create a branch for your changes** and create a pull request for that branch. If not, create a branch on a fork of the repository and create a pull request from there.
* It's common practice for a repository to reject direct pushes to `master`, so make branching a habit!
* It's common practice for a repository to reject direct pushes to `main`, so make branching a habit!
* If PRing from your own fork, **ensure that "Allow edits from maintainers" is checked**. This gives permission for maintainers to commit changes directly to your fork, speeding up the review process.
3. **Adhere to the prevailing code style**, which we enforce using [`flake8`](http://flake8.pycqa.org/en/latest/index.html) and [`pre-commit`](https://pre-commit.com/).
* Run `flake8` and `pre-commit` against your code [**before** you push it](https://soundcloud.com/lemonsaurusrex/lint-before-you-push). Your commit will be rejected by the build server if it fails to lint.
Expand All @@ -18,7 +18,7 @@ Note that contributions may be rejected on the basis of a contributor failing to
* Avoid making minor commits for fixing typos or linting errors. Since you've already set up a `pre-commit` hook to run the linting pipeline before a commit, you shouldn't be committing linting issues anyway.
* A more in-depth guide to writing great commit messages can be found in Chris Beam's [*How to Write a Git Commit Message*](https://chris.beams.io/posts/git-commit/)
5. **Avoid frequent pushes to the main repository**. This goes for PRs opened against your fork as well. Our test build pipelines are triggered every time a push to the repository (or PR) is made. Try to batch your commits until you've finished working for that session, or you've reached a point where collaborators need your commits to continue their own work. This also provides you the opportunity to amend commits for minor changes rather than having to commit them on their own because you've already pushed.
* This includes merging master into your branch. Try to leave merging from master for after your PR passes review; a maintainer will bring your PR up to date before merging. Exceptions to this include: resolving merge conflicts, needing something that was pushed to master for your branch, or something was pushed to master that could potentionally affect the functionality of what you're writing.
* This includes merging main into your branch. Try to leave merging from main for after your PR passes review; a maintainer will bring your PR up to date before merging. Exceptions to this include: resolving merge conflicts, needing something that was pushed to main for your branch, or something was pushed to main that could potentionally affect the functionality of what you're writing.
6. **Don't fight the framework**. Every framework has its flaws, but the frameworks we've picked out have been carefully chosen for their particular merits. If you can avoid it, please resist reimplementing swathes of framework logic - the work has already been done for you!
7. If someone is working on an issue or pull request, **do not open your own pull request for the same task**. Instead, collaborate with the author(s) of the existing pull request. Duplicate PRs opened without communicating with the other author(s) and/or PyDis staff will be closed. Communication is key, and there's no point in two separate implementations of the same thing.
* One option is to fork the other contributor's repository and submit your changes to their branch with your own pull request. We suggest following these guidelines when interacting with their repository as well.
Expand Down
15 changes: 5 additions & 10 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,20 @@ ENV PIP_NO_CACHE_DIR=false \
PIPENV_HIDE_EMOJIS=1 \
PIPENV_NOSPIN=1

# Install git
RUN apt-get -y update \
&& apt-get install -y \
git \
&& rm -rf /var/lib/apt/lists/*

# Create non-root user.
RUN useradd --system --shell /bin/false --uid 1500 pysite

# Install pipenv
RUN pip install -U pipenv

# Copy the project files into working directory
WORKDIR /app
COPY . .

# Copy dependency files
COPY Pipfile Pipfile.lock ./

# Install project dependencies
RUN pipenv install --system --deploy

# Copy project code
COPY . .

# Set Git SHA environment variable
ARG git_sha="development"
Expand Down
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ If you happen to run into issues with setup, please don't hesitate to open an is

If you're looking to contribute or play around with the code, take a look at [the wiki][8] or the [`docs` directory](docs). If you're looking for things to do, check out [our issues][9].

[1]: https://github.com/python-discord/site/workflows/Lint%20&%20Test/badge.svg?branch=master
[2]: https://github.com/python-discord/site/actions?query=workflow%3A%22Lint+%26+Test%22+branch%3Amaster
[3]: https://github.com/python-discord/site/workflows/Build%20&%20Deploy/badge.svg?branch=master
[4]: https://github.com/python-discord/site/actions?query=workflow%3A%22Build+%26+Deploy%22+branch%3Amaster
[5]: https://coveralls.io/repos/github/python-discord/site/badge.svg?branch=master
[6]: https://coveralls.io/github/python-discord/site?branch=master
[1]: https://github.com/python-discord/site/workflows/Lint%20&%20Test/badge.svg?branch=main
[2]: https://github.com/python-discord/site/actions?query=workflow%3A%22Lint+%26+Test%22+branch%3Amain
[3]: https://github.com/python-discord/site/workflows/Build%20&%20Deploy/badge.svg?branch=main
[4]: https://github.com/python-discord/site/actions?query=workflow%3A%22Build+%26+Deploy%22+branch%3Amain
[5]: https://coveralls.io/repos/github/python-discord/site/badge.svg?branch=main
[6]: https://coveralls.io/github/python-discord/site?branch=main
[7]: https://pythondiscord.com
[8]: https://pythondiscord.com/pages/contributing/site/
[9]: https://github.com/python-discord/site/issues
[10]: https://raw.githubusercontent.com/python-discord/branding/master/logos/badge/badge_github.svg
[10]: https://raw.githubusercontent.com/python-discord/branding/main/logos/badge/badge_github.svg
[11]: https://discord.gg/python
2 changes: 1 addition & 1 deletion pydis_site/static/css/error_pages.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ html {

body {
background-color: #7289DA;
background-image: url("https://raw.githubusercontent.com/python-discord/branding/master/logos/banner_pattern/banner_pattern.svg");
background-image: url("https://raw.githubusercontent.com/python-discord/branding/main/logos/banner_pattern/banner_pattern.svg");
background-size: 128px;
font-family: "Hind", "Helvetica", "Arial", sans-serif;
display: flex;
Expand Down
2 changes: 1 addition & 1 deletion pydis_site/templates/home/timeline.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ <h2>Python Discord hits 1,000 members</h2>
<div class="cd-timeline__content text-component">
<h2>Our logo is born. Thanks @Aperture!</h2>
<p class="pydis-logo-banner"><img
src="https://raw.githubusercontent.com/python-discord/branding/master/logos/logo_banner/logo_site_banner.svg">
src="https://raw.githubusercontent.com/python-discord/branding/main/logos/logo_banner/logo_site_banner.svg">
</p>

<div class="flex justify-between items-center">
Expand Down

0 comments on commit d213474

Please sign in to comment.