Skip to content

Commit

Permalink
Merge branch 'main/develop' into main/master
Browse files Browse the repository at this point in the history
# Conflicts:
#	package-lock.json
  • Loading branch information
meteyou committed Sep 9, 2022
2 parents 6b6ca69 + 4e8b6de commit 1e9120e
Show file tree
Hide file tree
Showing 107 changed files with 5,846 additions and 3,053 deletions.
4 changes: 2 additions & 2 deletions .env.development.local.example
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ VUE_APP_PORT=7125
# reconnect interval in ms
VUE_APP_RECONNECT_INTERVAL=5000

# remote mode
VUE_APP_REMOTE_MODE=false
# where should mainsail read the instances from (moonraker, browser or json)
VUE_APP_INSTANCES_DB="moonraker"

# defaults for multi language tests
VUE_APP_I18N_LOCALE=en
Expand Down
36 changes: 36 additions & 0 deletions .github/DEVELOPER_CERTIFICATE_OF_ORIGIN.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
Developer Certificate of Origin
Version 1.1

Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
1 Letterman Drive
Suite D4700
San Francisco, CA, 94129

Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.

Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I
have the right to submit it under the open source license
indicated in the file; or

(b) The contribution is based upon previous work that, to the best
of my knowledge, is covered under an appropriate open source
license and I have the right under that license to submit that
work with modifications, whether created in whole or in part
by me, under the same open source license (unless I am
permitted to submit under a different license), as indicated
in the file; or

(c) The contribution was provided directly to me by some other
person who certified (a), (b) or (c) and I have not modified
it.

(d) I understand and agree that this project and the contribution
are public and that a record of the contribution (including all
personal information I submit with it, including my sign-off) is
maintained indefinitely and may be redistributed consistent with
this project or the open source license(s) involved.
23 changes: 23 additions & 0 deletions .github/label-actions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Configuration for Label Actions - https://github.com/dessant/label-actions

not on Github:
issues:
comment: |
Ahoi!
It looks like this ticket is a request for help (or similar).
Many helpful people will not see your message here and you are
unlikely to get a useful response.
We use github to handle bugreports, feature requests and
planning new releases.
Please use our Discord-Server for help: [discord.gg/mainsail](https://discord.gg/mainsail)
This ticket will be automatically closed.
Fair wind and a following sea!
~ Your friendly MainsailGithubBot
*PS: I'm just an automated script, not a real sailor.*
close: true
38 changes: 38 additions & 0 deletions .github/workflows/auto-analyze.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: 'Auto analyze if package.json was edited'

on:
pull_request:
branches:
- develop

permissions:
pull-requests: write

jobs:
auto-analyze:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}

- name: Check package.json was changed
id: changed-file-package-json
uses: tj-actions/changed-files@v23
with:
sha: ${{ github.event.pull_request.head.sha }}

- name: Install node
uses: actions/setup-node@v3
if: contains(steps.changed-file-package-json.outputs.modified_files, 'package.json')
with:
node-version: '16'
cache: 'npm'

- uses: preactjs/compressed-size-action@v2
if: contains(steps.changed-file-package-json.outputs.modified_files, 'package.json')
with:
strip-hash: "\\b\\w{8}\\."
pattern: './dist/**/*.{js,css,html,json,woff2,svg,png}'
exclude: '{./dist/manifest.json,./dist/build.zip,**/*.map,**/node_modules/**}'
19 changes: 0 additions & 19 deletions .github/workflows/issues-no-response.yml

This file was deleted.

19 changes: 19 additions & 0 deletions .github/workflows/label-actions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: 'Label Actions'

on:
issues:
types: [labeled, unlabeled]
pull_request:
types: [labeled, unlabeled]

permissions:
contents: read
issues: write
pull-requests: write
discussions: write

jobs:
action:
runs-on: ubuntu-latest
steps:
- uses: dessant/label-actions@v2
18 changes: 18 additions & 0 deletions .github/workflows/lgtm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Send LGTM reaction
on:
issue_comment:
types: [created]
pull_request_review:
types: [submitted]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
- uses: micnncim/action-lgtm-reaction@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GIPHY_API_KEY: ${{ secrets.GIPHY_API_KEY }}
with:
trigger: '["^(?i)lgtm!*$"]'
source: 'giphy'
8 changes: 5 additions & 3 deletions .github/workflows/publish_docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ on:
branches: ['master', 'develop']
tags:
- '*'
pull_request:
branches:
- '*'

env:
REGISTRY: ghcr.io
Expand Down Expand Up @@ -37,7 +40,6 @@ jobs:
type=raw,value=latest,enable=${{ github.ref == 'refs/heads/master' }}
type=edge,branch=develop
type=ref,event=tag
- name: Set up QEMU
uses: docker/setup-qemu-action@v2

Expand All @@ -47,7 +49,7 @@ jobs:
- name: Build and push Docker image
uses: docker/build-push-action@v2
with:
platforms: linux/amd64,linux/arm64
push: true
platforms: linux/amd64,linux/arm64,linux/arm/v7
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
56 changes: 56 additions & 0 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: 'Close stale issues and PRs'

# Both `issue_comment` and `scheduled` event types are required for this Action
# to work properly.
on:
issue_comment:
types: [created]
schedule:
- cron: '30 1 * * *'

permissions:
issues: write
pull-requests: write

jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v5
with:
days-before-stale: 14
days-before-close: 7
exempt-all-milestones: true
close-issue-reason: not_planned
only-labels: '❔ User Input'
labels-to-remove-when-unstale: '❔ User Input,💤 Stale'
stale-issue-label: '💤 Stale'
stale-pr-label: '💤 Stale'
stale-issue-message: |
Ahoi!
It looks like there hasn't been any recent updates on
this issue. If you created this issue and no longer
consider it to get merged, then please login to github
and close it. Otherwise, if there is no further activity
on this issue, it will be automatically closedwithin the
next 7 days.
Fair wind and a following sea!
~ Your friendly MainsailGithubBot
*PS: I'm just an automated script, not a real sailor.*
stale-pr-message: |
Ahoi!
It looks like there hasn't been any recent updates on
this pull request. If you created this pull request and
no longer consider it to get merged, then please login
to github and close it. Otherwise, if there is no further
activity on this pull request, it will be automatically
closed within the next 7 days.
Fair wind and a following sea!
~ Your friendly MainsailGithubBot
*PS: I'm just an automated script, not a real sailor.*
94 changes: 69 additions & 25 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,43 +1,87 @@
# Mainsail Contributing Guide
# Contributing to Mainsail

Hi! I'm really excited that you are interested in contributing to Mainsail. Before submitting your contribution, please make sure to take a moment and read through the following guidelines:
If you are reading this document right now, you are probably considering contributing to Mainsail and making it better
than it is today. Thank you for taking that initiative! Before submitting your contribution, please take a moment and
make sure to read through our contribution guidelines:

- [Code of Conduct](https://github.com/meteyou/mainsail/.github/CODE_OF_CONDUCT.md)
- [Issue Reporting Guidelines](#issue-reporting-guidelines)
- [Pull Request Guidelines](#pull-request-guidelines)
- [Code of Conduct](https://github.com/mainsail-crew/mainsail/blob/develop/.github/CODE_OF_CONDUCT.md)
- [Question or Problem?](#question)
- [Issues and Bugs](#issue)
- [Feature Requests](#feature)
- [Submission Guidelines](#submit)
- [Submit an Issue](#submit-issue)
- [Submit a Pull Request](#submit-pr)
- [Financial Contributions](#financial)
- [Credits](https://docs.mainsail.xyz/credits)

## Issue Reporting Guidelines
## <a name="question"></a> Got a Question or Problem?

- Use [https://github.com/meteyou/mainsail/issues](https://github.com/meteyou/mainsail/issues) to create new issues.
Please do not open issues for general support questions. We want to keep GitHub issues for bug reports and feature
requests. Instead, please visit us on [Discord](https://discord.gg/mainsail) to ask support-related questions.

## Pull Request Guidelines
Our Discord server is a much better place to ask general support questions. We take a right to close issues that are
requests for generic support and redirect people to Discord.

- The `master` branch is just a snapshot of the latest stable release. All development should be done in dedicated branches. **Do not submit PRs against the `master` branch.**
## <a name="issue"></a> Found a Bug?

- Checkout a topic branch from the relevant branch, e.g. `develop`, and merge back against that branch.
If you find a bug in the source code or think that Mainsail is behaving odd in specific situations, you can help us fix
that issue by [submitting an issue](https://github.com/mainsail-crew/mainsail/issues/new?assignees=&labels=%E2%9A%A1+Type%3A+Bug&template=bug_report.yml).
If you have already fixed that issue, you can [submit a Pull Request](#submit-pr) with that fix.

- It's OK to have multiple small commits as you work on the PR - GitHub will automatically squash it before merging.
## <a name="feature"></a> Missing a Feature?

- If adding a new feature:
You can request a new feature by [submitting a feature request](https://github.com/mainsail-crew/mainsail/issues/new?assignees=&labels=%F0%9F%92%A1+Type%3A+FR&template=feature_request.yml).
If you would like to implement a new feature, please consider the scope of the change. For changes requiring a lot of
work, it's best to outline a proposal first so it can be discussed. This allows us to prevent wasted time and effort and
discuss how to bring your proposed feature into the project.

- Provide a convincing reason to add this feature. Ideally, you should open a suggestion issue first and have it approved before working on it.
## <a name="submit"></a> Submission Guidelines

- If fixing bug:
- If you are resolving a special issue, add `(fix #xxxx[,#xxxx])` (#xxxx is the issue id) in your PR title for a better release log, e.g. `update entities encoding/decoding (fix #3899)`.
- Provide a detailed description of the bug in the PR. Live demo preferred.
- Add appropriate test coverage if applicable.
### <a name="submit-issue"></a> Submitting an Issue

## Committing Changes
Before you submit an issue, please search the issue tracker if your problem may already exist. If a ticket already
covers your case, please refrain from opening a new ticket and instead contribute to the existing ticket. If you submit
an issue, please provide the required information and reproduction steps. We need those to be able to try and reproduce
the bug ourselves. Without proper instructions on how to reproduce the issue you are encountering, we might be unable to
fix a possible bug.

Commit messages should follow the [commit message convention](https://www.conventionalcommits.org/en/v1.0.0/) so that changelogs can be automatically generated.
### <a name="submit-pr"></a> Submitting a Pull Request (PR)

## Financial Contribution
Before you work on a PR and submit it, please pay attention to the following guidelines:

As a pure community-driven project without major corporate backing, we also welcome financial contributions via Patreon and OpenCollective.
1. Search the [pull requests](https://github.com/mainsail-crew/mainsail/pulls) for an open or closed PR related to your submission.
- You don't want to duplicate existing efforts or work on something unlikely to be merged into the project.
2. Do not submit PRs against the `master` branch. PRs need to be submitted against the `develop` branch.
3. Follow our [Code Standards](https://docs.mainsail.xyz/development/code-standards)
4. If there is an issue describing the problem you're fixing or a discussion of a feature you are implementing, make sure to link it in the PRs body.

- [Become a supporter on Patreon](https://patreon.com/meteyou)
- [One-time donation via Ko-Fi](https://ko-fi.com/mainsail)
- You can also add `fix #<id>` or `fixes #<id>` in the PR body where `<id>` is the issue id.
- Example PR title, body and sign-off:

## Credits
```
fix: incorrect handling of click event
Thank you to all the people who have already contributed to Mainsail!
This PR will fix #123.
Fixes correct handling of click event when button [X] is clicked.
Signed-off-by: James Smith <[email protected]>
```

5. If there is no issue describing the problem, create an issue first or provide a sufficient description of the bug/feature.
- Screenshots of your changes are welcome if you worked on UI-related code.
6. The title of the PR should follow the [commit message convention](https://www.conventionalcommits.org/en/v1.0.0/).
- If the PR consists of multiple commits, it's good practice to follow the convention, although that is not necessarily required.
- Upon merging, we will squash all commits of the PR into a single commit for a clean history and release changelogs.
7. Please sign off each commit and your PR. It must contain your real name and a current email address (see example in item 4).
- The sign-off should follow this pattern: `Signed-off-by: My Name <[email protected]>`
- The sign-off certifies that you agree with the [developer certificate of origin](https://github.com/mainsail-crew/mainsail/.github/DEVELOPER_CERTIFICATE_OF_ORIGIN.md).
- If you provide a translation, a sign-off is not necessarily required.
8. When opening a pull request, keep `Allow edits and access to secrets by maintainers` **enabled**.

## <a name="financial"></a> Financial Contribution

As a community-driven project without primary corporate backing, we always welcome financial contributions. A list of
options we offer to support us financially can be seen below.

- [Become a supporter on Patreon](https://patreon.com/meteyou) (monthly recurring)
- [Donation via Ko-Fi](https://ko-fi.com/mainsail) (one time / monthly recurring)
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#
# Builder stage, builds the application in node
#
FROM node:16-alpine as builder
FROM --platform=$BUILDPLATFORM node:16-alpine as builder

RUN apk add zip

Expand Down
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

<script type="module" src="/src/main.ts"></script>
</head>
<body>
<body style="background-color: #121212">
<noscript>
<strong>
We're sorry but Mainsail doesn't work properly without JavaScript enabled. Please enable it to continue.
Expand Down
Loading

0 comments on commit 1e9120e

Please sign in to comment.