Skip to content

Commit

Permalink
Merge branch 'master' into docs/issue-8464-update-preset-hosting-docs
Browse files Browse the repository at this point in the history
  • Loading branch information
HonkingGoose committed Apr 8, 2021
2 parents 2eb91b1 + 4262d40 commit 28d7a36
Show file tree
Hide file tree
Showing 323 changed files with 13,278 additions and 4,931 deletions.
7 changes: 6 additions & 1 deletion .devcontainer/Dockerfile
Expand Up @@ -2,6 +2,11 @@ FROM mcr.microsoft.com/vscode/devcontainers/typescript-node:0.157.0-14@sha256:98

# see https://mcr.microsoft.com/v2/vscode/devcontainers/typescript-node/tags/list for tags
# Add missing Renovate dev tools
RUN DEBIAN_FRONTEND=noninteractive apt-get update \

# Renovate requires Git version 2.22+, while Debian Buster only ships version 2.20.
# The backports repository contains newer versions of Git, which we'll use instead.
RUN echo 'deb http://deb.debian.org/debian buster-backports main' > /etc/apt/sources.list.d/backports.list \
&& DEBIAN_FRONTEND=noninteractive apt-get update \
&& apt-get -y install --no-install-recommends build-essential git/buster-backports \
&& apt-get -y install --no-install-recommends --no-upgrade build-essential \
&& rm -rf /var/lib/apt/lists/*
11 changes: 9 additions & 2 deletions .github/ISSUE_TEMPLATE/bug_report.md
Expand Up @@ -22,16 +22,23 @@ labels: 'type:bug, status:requirements, priority-5-triage'
<!--
Try not to raise a bug report unless you've looked at the logs first.
If you're running self-hosted, run with `--log-level=debug` or LOG_LEVEL=debug and search for whatever dependency/branch/PR that is causing the problem. If you are using the Renovate App, log into https://app.renovatebot.com/dashboard and locate the correct job log for when the problem occurred (e.g. when the PR was created).
If you're running self-hosted, run with `LOG_LEVEL=debug` in your environment variables and search for whatever dependency/branch/PR that is causing the problem. If you are using the Renovate App, log into https://app.renovatebot.com/dashboard and locate the correct job log for when the problem occurred (e.g. when the PR was created).
Paste the *relevant* logs here, not the entire thing and not just a link to the dashboard (others do not have permissions to view them).
-->

<details><summary>Click me to see logs</summary>

```
Copy/paste any log here, between the starting and ending backticks
```

</details>

**Have you created a minimal reproduction repository?**

Please read the [minimal reproductions documentation](https://github.com/renovatebot/renovate/blob/master/docs/development/minimal-reproductions.md) to learn how to make a good minimal reproduction repository.

- [ ] This is a really small bug, it does not need a reproduction (think small typo)
- [ ] I have provided a minimal reproduction repository
- [ ] I don't have time for that, but it happens in a public repository I have linked to
- [ ] I don't have time for that, and cannot share my private repository
Expand Down
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/config.yml
@@ -1,5 +1,5 @@
blank_issues_enabled: false
contact_links:
- name: Start a discussion
- name: Start a discussion (config, doubts, docs)
url: https://github.com/renovatebot/renovate/discussions/new
about: If you have any questions about bot configuration or doubts about whether you should create a feature request or bug report, please click here to create a Discussion instead of an Issue.
about: If you have any questions about bot configuration or doubts about whether you should create a feature request or bug report, or have problems with the documentation please click here to create a Discussion instead of an Issue.
76 changes: 74 additions & 2 deletions .github/label-actions.yml
Expand Up @@ -4,8 +4,8 @@
The Renovate team needs your help!
To fix the problem, we first need to know exactly what's causing the bug.
A minimal reproduction help us to pinpoint the exact cause of the bug.
Before we can start work on your issue we first need to know exactly what's causing the current behavior.
A minimal reproduction helps us with this.
To get started, please read our guide on [minimal reproductions](https://github.com/renovatebot/renovate/blob/master/docs/development/minimal-reproductions.md) to understand what is needed.
Expand All @@ -27,3 +27,75 @@
The Renovate team will take a look at the reproduction repository.
Once we confirm the provided repository reproduces the problem, the label will be changed to `reproduction:confirmed`.
'logs:problem':
comment: >
Hi there,
We have found that there's a problem with the logs.
Depending on which situation applies follow one, some or all of these instructions.
### No logs at all
If there's no log posted yet, we need you to find and copy/paste the log into the issue template.
#### Finding logs on hosted app
<details><summary>Click me to read instructions</summary>
If you use the Renovate app (GitHub):
1. Go to the affected PR, and search for "View repository job log here"
1. Click on the link to go to the "WhiteSource Renovate Dashboard" and log in
1. You are now in the correct repository log overview screen
1. Copy/paste the correct log
1. Follow the steps in the **formatting your logs** section
</details>
#### Finding logs when self-hosting
<details><summary>Click me to read instructions</summary>
If you're running self-hosted, run with `LOG_LEVEL=debug` in your environment variables and search for whatever dependency/branch/PR that is causing the problem.
</details>
### Insufficient logs
<details><summary>Click me to read instructions</summary>
If you already provided logs, and the Renovate team said they are not enough, follow the instructions from the **No logs at all** section.
</details>
### Formatting your logs
<details><summary>Click me to read instructions</summary>
Please put your logs in a `<details>` and `<summary>` element like this:
<details><summary>Click me to see logs</summary>
```
Copy/paste any log here, between the starting and ending backticks
```
</details>
</details>
2 changes: 1 addition & 1 deletion .github/workflows/build-pr.yml
Expand Up @@ -66,7 +66,7 @@ jobs:
run: yarn jest --logHeapUsage --maxWorkers=2 --ci

- name: Codecov
uses: codecov/codecov-action@v1.2.2
uses: codecov/codecov-action@v1.3.1
if: always()

# build after tests to exclude files
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Expand Up @@ -91,7 +91,7 @@ jobs:
run: yarn jest --logHeapUsage --maxWorkers=2 --ci --coverage ${{ env.coverage }}

- name: Codecov
uses: codecov/codecov-action@v1.2.2
uses: codecov/codecov-action@v1.3.1
if: always() && env.coverage == 'true'

# build after tests to exclude files
Expand Down
33 changes: 33 additions & 0 deletions .github/workflows/stale-action.yml
@@ -0,0 +1,33 @@
# Go to https://github.com/actions/stale for the full documentation of these options.

name: 'Close stale bug reports that lack reproduction'
on:
schedule:
- cron: '30 1 * * *'

jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v3.0.18
with:
# Rate limit per run, (defaults to 30, but we've increased it to 40 for now).
operations-per-run: 40

# Only issues with both `reproduction:needed` and `type:bug` will be touched by the stale bot.
only-issue-labels: 'reproduction:needed,type:bug'

# A issue that has any assignee is getting worked on, so is exempt from stale bot.
exempt-all-issue-assignees: true

# Remove stale label from issue/PR on updates or comments, defaults to true.
remove-stale-when-updated: true

# Wait 14 days until making issue stale and posting a message.
days-before-issue-stale: 14
stale-issue-message: 'When a bug has been marked as needing a reproduction, it means nobody can work on it until one is provided. In cases where no reproduction is possible, or the issue creator does not have the time to reproduce, we unfortunately need to close such issues as they are non-actionable and serve no benefit by remaining open. This issue will be closed after 7 days of inactivity.'
stale-issue-label: 'stale'

# Close out issue after 7 stale days.
days-before-issue-close: 7
close-issue-message: 'This bug report has been closed as we need a reproduction to work on this. If the original poster or anybody else with the same problem discovers that they can reproduce it, please create a new issue, and reference this issue.'
2 changes: 1 addition & 1 deletion docs/development/design-decisions.md
Expand Up @@ -66,7 +66,7 @@ Branches have names like `renovate/webpack-1.x` instead of `renovate/webpack-1.2
We do this because:

- Branches often receive updates (e.g. new patches) before they're merged
- Naming the branch like `1.x` means its name still names sense if a `1.2.1` release happens
- Naming the branch like `1.x` means its name still makes sense if a `1.2.1` release happens

Note: You can configure the branch names by using the string template `branchName` and/or its sub-templates `branchPrefix` and `branchTopic`.

Expand Down
7 changes: 7 additions & 0 deletions docs/development/issue-labeling.md
Expand Up @@ -138,6 +138,7 @@ Apply these labels when somebody opens a `feature` type issue requesting a new d

good first issue
help wanted
logs:problem
reproduction:needed
reproduction:provided
reproduction:confirmed
Expand All @@ -150,6 +151,12 @@ This label is sometimes picked up by tools or websites that try to encourage peo

Add the label `help wanted` to indicate that we need the original poster or someone else to do some work or it is unlikely to get done.

Add a label `logs:problem` to indicate that there's a problem with the logs, and the contributor needs to do one of these things:

1. Provide logs (if there are none yet)
1. Provide more logs (in case current logs are insufficient)
1. Format their logs properly

Add a label `reproduction:needed` if nobody's reproduced it in a public repo yet and such a reproduction is necessary before further work can be done.
Add the label `reproduction:provided` once there is a public reproduction.
A developer will add the `reproduction:confirmed` once they have checked and confirmed the reproduction.
Expand Down
31 changes: 20 additions & 11 deletions docs/usage/config-presets.md
Expand Up @@ -33,15 +33,20 @@ In order to achieve these goals, preset configs allow for a very modular approac
In general, GitHub, GitLab or Gitea-based preset hosting is easier than npm because you avoid the "publish" step - simply commit preset code to the default branch and it will be picked up by Renovate the next time it runs.
An additional benefit of using source code hosting is that the same token/authentication can be reused by Renovate in case you want to make your config private.

| name | example use | preset | resolves as | filename |
| ----------------------- | -------------------- | --------- | ------------------------------------ | --------------------------------- |
| GitHub default | `github>abc/foo` | `default` | `https://github.com/abc/foo` | `default.json` or `renovate.json` |
| GitHub with preset name | `github>abc/foo:xyz` | `xyz` | `https://github.com/abc/foo` | `xyz.json` |
| GitLab default | `gitlab>abc/foo` | `default` | `https://gitlab.com/abc/foo` | `default.json` or `renovate.json` |
| GitLab with preset name | `gitlab>abc/foo:xyz` | `xyz` | `https://gitlab.com/abc/foo` | `xyz.json` |
| Gitea default | `gitea>abc/foo` | `default` | `https://gitea.com/abc/foo` | `default.json` or `renovate.json` |
| Gitea with preset name | `gitea>abc/foo:xyz` | `xyz` | `https://gitea.com/abc/foo` | `xyz.json` |
| Local default | `local>abc/foo` | `default` | `https://github.company.com/abc/foo` | `default.json` or `renovate.json` |
| name | example use | preset | resolves as | filename |
| ----------------------- | -------------------------- | --------- | ------------------------------------ | --------------------------------- |
| GitHub default | `github>abc/foo` | `default` | `https://github.com/abc/foo` | `default.json` or `renovate.json` |
| GitHub with preset name | `github>abc/foo:xyz` | `xyz` | `https://github.com/abc/foo` | `xyz.json` |
| GitHub with preset path | `github>abc/foo//path/xyz` | `xyz` | `https://github.com/abc/foo` | `path/xyz.json` |
| GitLab default | `gitlab>abc/foo` | `default` | `https://gitlab.com/abc/foo` | `default.json` or `renovate.json` |
| GitLab with preset name | `gitlab>abc/foo:xyz` | `xyz` | `https://gitlab.com/abc/foo` | `xyz.json` |
| GitLab with preset path | `gitlab>abc/foo//path/xyz` | `xyz` | `https://gitlab.com/abc/foo` | `path/xyz.json` |
| Gitea default | `gitea>abc/foo` | `default` | `https://gitea.com/abc/foo` | `default.json` or `renovate.json` |
| Gitea with preset name | `gitea>abc/foo:xyz` | `xyz` | `https://gitea.com/abc/foo` | `xyz.json` |
| Local default | `local>abc/foo` | `default` | `https://github.company.com/abc/foo` | `default.json` or `renovate.json` |
| Local with preset path | `local>abc/foo//path/xyz` | `default` | `https://github.company.com/abc/foo` | `path/xyz.json` |

Note that you can't combine the path and sub-preset syntaxes (i.e. anything in the form `provider>owner/repo//path/to/file:subsubpreset`) is not supported. One workaround is to use distinct files instead of sub-presets.

## Example configs

Expand Down Expand Up @@ -129,7 +134,7 @@ To host your preset config on GitHub:
"extends": ["github>rarkins/renovate-config"]
```

From then on Renovate will use the renovate config from the preset repo's default branch.
From then on Renovate will use the Renovate config from the preset repo's default branch.
You do not need to add it as a devDependency or add any other files to the preset repo.

## GitLab-hosted Presets
Expand Down Expand Up @@ -158,7 +163,7 @@ To host your preset config on Gitea:

Renovate also supports local presets, e.g. presets that are hosted on the same platform as the target repository.
This is especially helpful in self-hosted scenarios where public presets cannot be used.
Local presets are only supported on GitHub, GitLab, Gitea and Bitbucket Server.
Local presets are only supported on GitHub, GitLab, Gitea, Bitbucket Cloud and Bitbucket Server.
Local presets are specified either by leaving out any prefix, e.g. `owner/name`, or explicitly by adding a `local>` prefix, e.g. `local>owner/name`.
Renovate will determine the current platform and look up the preset from there.

Expand Down Expand Up @@ -201,6 +206,10 @@ Using npm-hosted presets is deprecated, we recommend you do not follow these ins
If you manage multiple repositories using Renovate and want the same custom config across all or most of them, then you might want to consider publishing your own preset config so that you can "extend" it in every applicable repository.
That way when you want to change your Renovate configuration you can make the change in one location rather than having to copy/paste it to every repository individually.

Let's say that your username on npm and elsewhere is "fastcore".
In that case, you can choose between publishing your preset config package as `@fastcore/renovate-config` or `renovate-config-fastcore`.
Let's assume you choose `renovate-config-fastcore` as the package name.

You then need to publish the `renovate-config-fastcore` package where the `package.json` contains the field `renovate-config` and then put your config under the field `default`.
For example:

Expand Down

0 comments on commit 28d7a36

Please sign in to comment.