Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump eslint from 7.22.0 to 7.29.0 #18

Open
wants to merge 116 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
116 commits
Select commit Hold shift + click to select a range
cec9072
Make the generated schema compliant with draft04
PierreBtz Jul 22, 2020
d472269
Merge pull request #611 from Happypig375/patch-1
jetersen Aug 27, 2020
5907cbd
test: test
Sep 16, 2020
f22eb18
Bump @actions/core from 1.2.4 to 1.2.6
dependabot-preview[bot] Sep 25, 2020
7d76402
filter releases only for the relevant branch
fujifish Oct 2, 2020
8cc6d94
Merge pull request #600 from PierreBtz/pbeitz/dev
jetersen Oct 17, 2020
1e7ae20
Annotated tags support
timja Oct 17, 2020
6af2c4d
Bump node from 14.4.0-alpine to 14.14.0-alpine
dependabot-preview[bot] Oct 19, 2020
2debed0
Merge pull request #676 from timja/support-annotated-tags
jetersen Oct 19, 2020
90cb61d
Merge pull request #657 from fujifish/master
jetersen Oct 19, 2020
6c54bae
Merge pull request #653 from release-drafter/dependabot/npm_and_yarn/…
jetersen Oct 19, 2020
408e81f
Merge pull request #677 from release-drafter/dependabot/docker/node-1…
jetersen Oct 19, 2020
b9f2371
5.12.0
jetersen Oct 19, 2020
660486c
Revert "filter releases to consider only the target branch "
jetersen Oct 20, 2020
a3b34cc
Merge pull request #682 from release-drafter/revert-657-master
jetersen Oct 20, 2020
3782ccd
5.12.1
jetersen Oct 20, 2020
ad363f8
Improve example to use default branch
ssbarnea Nov 17, 2020
45371f0
Merge pull request #711 from ssbarnea/patch-1
jetersen Nov 17, 2020
1210553
add "filter-by-commitish" configuration option with default false (#683)
fujifish Dec 26, 2020
9e78e42
fix(readme): replace version resolution by version resolver with the …
abarghoud Dec 26, 2020
c366977
Bump regex-parser from 2.2.10 to 2.2.11
dependabot-preview[bot] Aug 10, 2020
00dd2c4
Bump smee-client from 1.1.0 to 1.2.2
dependabot-preview[bot] Aug 19, 2020
ce538be
Bump node-fetch from 2.6.0 to 2.6.1
dependabot[bot] Dec 26, 2020
6f17a3a
Merge pull request #644 from release-drafter/dependabot/npm_and_yarn/…
dependabot[bot] Dec 26, 2020
b32b01f
Bump lodash from 4.17.19 to 4.17.20
dependabot-preview[bot] Dec 26, 2020
eb487fb
Bump nodemon from 2.0.4 to 2.0.6
dependabot-preview[bot] Dec 26, 2020
c77dead
Bump jest from 26.0.1 to 26.6.3
dependabot-preview[bot] Nov 4, 2020
9e8c602
Bump nock from 12.0.3 to 13.0.5
dependabot-preview[bot] Dec 26, 2020
c785433
Bump prettier from 2.0.5 to 2.2.1
dependabot-preview[bot] Dec 26, 2020
0ac4ac0
Bump lint-staged from 10.2.11 to 10.5.3
dependabot-preview[bot] Dec 26, 2020
15a5e0f
[Security] Bump ini from 1.3.5 to 1.3.8
dependabot-preview[bot] Dec 26, 2020
58b8f87
Bump node-notifier from 8.0.0 to 8.0.1
dependabot[bot] Dec 26, 2020
07cd8b0
Bump eslint from 7.2.0 to 7.16.0
dependabot-preview[bot] Dec 26, 2020
dd3e328
Bump node from 14.14.0-alpine to 15.5.0-alpine
dependabot-preview[bot] Dec 24, 2020
8daaf43
Merge pull request #739 from release-drafter/dependabot/npm_and_yarn/…
dependabot[bot] Dec 26, 2020
c48509f
update actions (#740)
jetersen Dec 26, 2020
e275524
fix checkname
jetersen Dec 26, 2020
e4d3b1c
Bump probot from 9.11.5 to 11.0.1
dependabot-preview[bot] Dec 26, 2020
fd604c7
fix appId, private key, test logging and content path
jetersen Dec 26, 2020
68e3739
replace context.github with context.octokit
jetersen Dec 26, 2020
025dff9
context.config now returns a simpler object
jetersen Dec 26, 2020
bfcd23a
adapt logger tests
jetersen Dec 26, 2020
c2d2351
cleanup config-mock
jetersen Dec 26, 2020
86f1d9d
disable throttling and retry logic in octokit
jetersen Dec 26, 2020
9b1712b
Allow more than just a push event to run the action (#632)
MindaugasLaganeckas Dec 27, 2020
ddcbf38
add exclude label
jetersen Dec 27, 2020
329e805
improve GitHub Action build times (#742)
jetersen Dec 27, 2020
f6623b8
Revert "Improve example to use default branch" (#741)
jetersen Dec 27, 2020
4d1215c
v5.13.0
jetersen Dec 27, 2020
70eb821
[Security] Bump minimist from 1.2.0 to 1.2.5
dependabot-preview[bot] Dec 28, 2020
f24810d
add app-logo.svg
jetersen Dec 29, 2020
52ff3be
Bump semver from 7.3.2 to 7.3.4
dependabot-preview[bot] Dec 28, 2020
42f8f4d
Bump eslint-plugin-prettier from 3.1.4 to 3.3.0
dependabot-preview[bot] Dec 28, 2020
7ac6353
Bump eslint-config-prettier from 6.11.0 to 7.1.0
dependabot-preview[bot] Dec 30, 2020
06fd456
Bump husky from 4.2.5 to 4.3.6
dependabot-preview[bot] Dec 30, 2020
fef7296
Create Dependabot config file (#748)
dependabot-preview[bot] Dec 30, 2020
4afe673
format yaml
jetersen Dec 30, 2020
72592b1
Bump eslint from 7.16.0 to 7.17.0
dependabot[bot] Jan 4, 2021
21a0a55
Merge pull request #749 from release-drafter/dependabot/npm_and_yarn/…
dependabot[bot] Jan 4, 2021
696b776
Bump eslint-plugin-prettier from 3.3.0 to 3.3.1
dependabot[bot] Jan 5, 2021
d71bd62
Merge pull request #750 from release-drafter/dependabot/npm_and_yarn/…
dependabot[bot] Jan 5, 2021
abbfb1e
Bump node from 15.5.0-alpine to 15.5.1-alpine
dependabot[bot] Jan 6, 2021
724f43c
Merge pull request #751 from release-drafter/dependabot/docker/node-1…
dependabot[bot] Jan 6, 2021
41cf385
Bump nodemon from 2.0.6 to 2.0.7
dependabot[bot] Jan 7, 2021
76e5561
Bump husky from 4.3.6 to 4.3.7
dependabot[bot] Jan 7, 2021
9b9d7c2
add yarn build
jetersen Jan 7, 2021
ab997b2
Bump @vercel/ncc from 0.26.1 to 0.26.2
dependabot[bot] Jan 7, 2021
8b3597e
yarn build
jetersen Jan 7, 2021
1b86f47
correct vercel/ncc crlf output
jetersen Jan 7, 2021
09cf0ca
Merge pull request #753 from release-drafter/dependabot/npm_and_yarn/…
dependabot[bot] Jan 7, 2021
b9b914f
Merge pull request #752 from release-drafter/dependabot/npm_and_yarn/…
dependabot[bot] Jan 7, 2021
a9e1ef9
run test build on any pull requests
jetersen Jan 7, 2021
f68f3de
Bump @vercel/ncc from 0.26.2 to 0.27.0
dependabot[bot] Jan 12, 2021
8da60b0
Merge pull request #755 from release-drafter/dependabot/npm_and_yarn/…
dependabot[bot] Jan 12, 2021
189a98d
Bump eslint from 7.17.0 to 7.18.0 (#759)
dependabot[bot] Jan 18, 2021
3da8d86
Bump probot from 11.0.1 to 11.0.4 (#760)
dependabot[bot] Jan 18, 2021
7705fd4
Bump husky from 4.3.7 to 4.3.8 (#761)
dependabot[bot] Jan 18, 2021
4a62108
Bump eslint-config-prettier from 7.1.0 to 7.2.0 (#762)
dependabot[bot] Jan 19, 2021
8ef32da
Category templating (#767)
rofafor Jan 28, 2021
a9cde66
Container compatibility (#770)
rofafor Feb 1, 2021
b09ab18
Bump nock from 13.0.5 to 13.0.7 (#772)
dependabot[bot] Feb 1, 2021
193a397
Bump eslint from 7.18.0 to 7.19.0 (#773)
dependabot[bot] Feb 1, 2021
4bd7c3c
Add commitish to config (#771)
subsetpark Feb 5, 2021
145efe5
Bump node from 15.5.1-alpine to 15.8.0-alpine (#775)
dependabot[bot] Feb 5, 2021
8d716d3
Bump probot from 11.0.4 to 11.0.6 (#776)
dependabot[bot] Feb 5, 2021
626dd30
Bump lint-staged from 10.5.3 to 10.5.4
dependabot[bot] Feb 8, 2021
4dd8db0
Bump node from `5755177` to `db3f9c8`
dependabot[bot] Feb 8, 2021
f9f0116
Add autolabeler (#774)
rofafor Feb 11, 2021
a3b2539
Fix syntax on example snippet (#779)
ignasi35 Feb 11, 2021
6f8e158
use probot github adapter (#782)
jetersen Feb 11, 2021
00eb851
Merge pull request #777 from release-drafter/dependabot/npm_and_yarn/…
dependabot[bot] Feb 11, 2021
0492b8b
Merge pull request #778 from release-drafter/dependabot/docker/node-d…
dependabot[bot] Feb 11, 2021
e5ccf14
5.14.0
jetersen Feb 14, 2021
9ee40ca
Bump eslint from 7.19.0 to 7.20.0
dependabot[bot] Feb 15, 2021
ed8b54a
Merge pull request #787 from release-drafter/dependabot/npm_and_yarn/…
dependabot[bot] Feb 15, 2021
30279d4
Configurable functionality (#789)
rofafor Feb 28, 2021
04a9187
Clarify how autolabeler matcher configurations work (#806)
oleg-nenashev Mar 8, 2021
0271cc7
Bump nock from 13.0.7 to 13.0.11 (#809)
dependabot[bot] Mar 8, 2021
4669bb6
Bump node from 15.8.0-alpine to 15.11.0-alpine (#805)
dependabot[bot] Mar 8, 2021
3258d3b
Bump eslint from 7.20.0 to 7.21.0 (#799)
dependabot[bot] Mar 8, 2021
610ac81
Bump eslint-config-prettier from 7.2.0 to 8.1.0
dependabot[bot] Mar 8, 2021
776d935
Merge pull request #797 from release-drafter/dependabot/npm_and_yarn/…
dependabot[bot] Mar 8, 2021
f7ede87
Bump probot from 11.0.6 to 11.1.0 (#801)
dependabot[bot] Mar 12, 2021
777101c
Bump lodash from 4.17.20 to 4.17.21 (#791)
dependabot[bot] Mar 15, 2021
294cd30
Bump eslint from 7.21.0 to 7.22.0 (#814)
dependabot[bot] Mar 15, 2021
15bc40a
Bump node from `c01b572` to `1aa4d55` (#815)
dependabot[bot] Mar 15, 2021
fe52e97
5.15.0
jetersen Mar 16, 2021
b22d57d
Bump y18n from 4.0.0 to 4.0.1
dependabot[bot] Mar 30, 2021
4f6edbb
Bump @vercel/ncc from 0.27.0 to 0.28.4
dependabot[bot] Apr 29, 2021
99390ff
Merge pull request #828 from release-drafter/dependabot/npm_and_yarn/…
dependabot[bot] Apr 29, 2021
27d2935
build
jetersen Apr 29, 2021
349214e
Merge pull request #855 from release-drafter/dependabot/npm_and_yarn/…
dependabot[bot] Apr 29, 2021
f2bd66c
Merge branch 'master' of https://github.com/release-drafter/release-d…
Jun 3, 2021
6c9e515
Merge pull request #1 from classtinginc/chore/upstarem
Jun 3, 2021
1fe7740
feat: change body parsing delimiter to `###` from `##`
Jun 3, 2021
f4d9f10
Bump eslint from 7.22.0 to 7.29.0
dependabot[bot] Jun 21, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ node_modules
coverage
.buildkite
*.pem
.git
.git
dist/
4 changes: 3 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
coverage
coverage
dist/
node_modules/
27 changes: 27 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
version: 2
updates:
- package-ecosystem: docker
directory: '/'
schedule:
interval: daily
open-pull-requests-limit: 10
- package-ecosystem: npm
directory: '/'
schedule:
interval: daily
open-pull-requests-limit: 10
labels:
- 'type: dependencies'
ignore:
- dependency-name: '@hapi/joi'
versions:
- '>= 16.a'
- '< 18'
- dependency-name: '@types/hapi__joi'
versions:
- '>= 16.a'
- '< 18'
- package-ecosystem: 'github-actions'
directory: '/'
schedule:
interval: 'daily'
7 changes: 7 additions & 0 deletions .github/no-unstaged-files.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

if [[ "$(git status --porcelain)" != "" ]]; then
git status
echo "::error::💥 Unstaged changes detected. Locally try running: yarn prettier && yarn lint --fix && yarn build"
exit 1
fi
3 changes: 3 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,6 @@ version-resolver:
- 'type: docs'
- 'type: dependencies'
- 'type: security'

exclude-labels:
- 'skip-changelog'
21 changes: 0 additions & 21 deletions .github/workflows/lint.yml

This file was deleted.

24 changes: 13 additions & 11 deletions .github/workflows/rebase.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,26 @@
on:
issue_comment:
types: [created]
types:
- created
name: Automatic Rebase
jobs:
rebase:
name: Rebase
if: github.event.issue.pull_request != '' && contains(github.event.comment.body, '/rebase')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: khan/pull-request-comment-trigger@master
id: check
with:
trigger: '/rebase'
reaction: rocket
env:
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
- uses: actions/checkout@v2
if: steps.check.outputs.triggered == 'true'
with:
fetch-depth: 0
- name: Automatic Rebase
uses: cirrus-actions/[email protected]
uses: cirrus-actions/[email protected]
if: steps.check.outputs.triggered == 'true'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# https://github.community/t5/GitHub-Actions/Workflow-is-failing-if-no-job-can-be-ran-due-to-condition/m-p/38186#M3250
always_job:
name: Always run job
runs-on: ubuntu-latest
steps:
- name: Always run
run: echo "This job is used to prevent the workflow to fail when all other jobs are skipped."
24 changes: 16 additions & 8 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,24 @@
name: Tests

on: [push, pull_request]
on:
push:
branches:
- master
pull_request:

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: actions/setup-node@v1
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
version: 13.x
- name: Test
run: |
yarn install
yarn test
node-version: '13'
- run: yarn install --frozen-lockfile
- run: yarn test
- run: yarn lint --fix
- run: yarn prettier
- run: yarn build
- name: correct vercel/ncc crlf output
run: sed -i 's/\x0D$//' ./dist/index.js
- run: .github/no-unstaged-files.sh
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@ coverage
now.json
docker-compose-logs
package-lock.json
dist/static/
dist/views/
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
config-with-yaml-exception.yml
dist/
coverage/
2 changes: 2 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{
"trailingComma": "es5",
"arrowParens": "always",
"semi": false,
"singleQuote": true,
"bracketSpacing": true
Expand Down
4 changes: 3 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{
"eslint.autoFixOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"files.exclude": {
"dist/": true
}
}
5 changes: 3 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:14.4.0-alpine@sha256:796fbe3509bdd36aef0e62508379f84e32a172062b7a37cb3609dee1567893b9
FROM node:15.11.0-alpine@sha256:1aa4d551d84797a2df6261e4b6a78b849f6bd11b0dc94b7f2ddf0023fecd8261
ARG NODE_ENV=production
ENV NODE_ENV=${NODE_ENV}
LABEL "repository"="https://github.com/toolmantim/release-drafter"
Expand All @@ -11,4 +11,5 @@ LABEL "com.github.actions.color"="orange"
WORKDIR /app
COPY . .
RUN yarn --frozen-lockfile
ENTRYPOINT [ "/app/node_modules/.bin/probot", "receive", "/app/index.js" ]
ENTRYPOINT [ "/app/node_modules/.bin/probot" ]
CMD [ "receive", "/app/index.js" ]
57 changes: 52 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,26 @@ on:
# branches to consider in the event; optional, defaults to all
branches:
- master
# pull_request event is required only for autolabeler
pull_request:
# Only following types are handled by the action, but one can default to all as well
types: [opened, reopened, synchronize]

jobs:
update_release_draft:
runs-on: ubuntu-latest
steps:
# (Optional) GitHub Enterprise requires GHE_HOST variable set
#- name: Set GHE_HOST
# run: |
# echo "GHE_HOST=${GITHUB_SERVER_URL##https:\/\/}" >> $GITHUB_ENV

# Drafts your next Release notes as Pull Requests are merged into "master"
- uses: release-drafter/release-drafter@v5
with:
# (Optional) specify config name to use, relative to .github/. Default: release-drafter.yml
# config-name: my-config.yml
# (Optional) specify config name to use, relative to .github/. Default: release-drafter.yml
# with:
# config-name: my-config.yml
# disable-autolabeler: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
```
Expand Down Expand Up @@ -96,6 +106,7 @@ You can configure Release Drafter using the following key in your `.github/relea
| Key | Required | Description |
| ---------------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `template` | Required | The template for the body of the draft release. Use [template variables](#template-variables) to insert values. |
| `category-template` | Optional | The template to use for each category. Use [category template variables](#category-template-variables) to insert values. Default: `"## $TITLE"`. |
| `name-template` | Optional | The template for the name of the draft release. For example: `"v$NEXT_PATCH_VERSION"`. |
| `tag-template` | Optional | The template for the tag of the draft release. For example: `"v$NEXT_PATCH_VERSION"`. |
| `version-template` | Optional | The template to use when calculating the next version number for the release. Useful for projects that don't use semantic versioning. Default: `"$MAJOR.$MINOR.$PATCH"` |
Expand All @@ -111,6 +122,8 @@ You can configure Release Drafter using the following key in your `.github/relea
| `sort-direction` | Optional | Sort changelog in ascending or descending order. Can be one of: `ascending`, `descending`. Default: `descending`. |
| `prerelease` | Optional | Mark the draft release as pre-release. Default `false`. |
| `version-resolver` | Optional | Adjust the `$RESOLVED_VERSION` variable using labels. Refer to [Version Resolver](#version-resolver) to learn more about this |
| `filter-by-commitish` | Optional | Filter previous releases to consider only the target branch of the release. Default: `false`. |
| `commitish` | Optional | Specify the target branch of the release. Default: the default branch of the repo. |

Release Drafter also supports [Probot Config](https://github.com/probot/probot-config), if you want to store your configuration files in a central repository. This allows you to share configurations between projects, and create a organization-wide configuration file by creating a repository named `.github` with the file `.github/release-drafter.yml`.

Expand All @@ -124,6 +137,14 @@ You can use any of the following variables in your `template`:
| `$CONTRIBUTORS` | A comma separated list of contributors to this release (pull request authors, commit authors, and commit committers). |
| `$PREVIOUS_TAG` | The previous releases’s tag. |

## Category Template Variables

You can use any of the following variables in `category-template`:

| Variable | Description |
| -------- | ------------------------------------ |
| `$TITLE` | The category title, e.g. `Features`. |

## Next Version Variables

You can use any of the following variables in your `template`, `name-template` and `tag-template`:
Expand All @@ -133,7 +154,7 @@ You can use any of the following variables in your `template`, `name-template` a
| `$NEXT_PATCH_VERSION` | The next patch version number. For example, if the last tag or release was `v1.2.3`, the value would be `v1.2.4`. This is the most commonly used value. |
| `$NEXT_MINOR_VERSION` | The next minor version number. For example, if the last tag or release was `v1.2.3`, the value would be `v1.3.0`. |
| `$NEXT_MAJOR_VERSION` | The next major version number. For example, if the last tag or release was `v1.2.3`, the value would be `v2.0.0`. |
| `$RESOLVED_VERSION` | The next resolved version number, based on GitHub labels. Refer to [Version Resolution](#version-resolution) to learn more about this. |
| `$RESOLVED_VERSION` | The next resolved version number, based on GitHub labels. Refer to [Version Resolver](#version-resolver) to learn more about this. |

## Version Template Variables

Expand Down Expand Up @@ -213,7 +234,8 @@ Pull requests with the label "feature" or "fix" will now be grouped together:

<img src="design/screenshot-2.png" alt="Screenshot of generated draft release with categories" width="586" />

Adding such labels to your PRs can be automated by using [PR Labeler](https://github.com/TimonVS/pr-labeler-action) or [Probot Auto Labeler](https://github.com/probot/autolabeler).
Adding such labels to your PRs can be automated by using the embedded Autolabeler functionality (see below),
[PR Labeler](https://github.com/TimonVS/pr-labeler-action) or [Probot Auto Labeler](https://github.com/probot/autolabeler).

## Exclude Pull Requests

Expand Down Expand Up @@ -249,6 +271,30 @@ replacers:
replace: 'My Name'
```

## Autolabeler

You can add automatically a label into a pull request, with the `autolabeler` option. Available matchers are `files` (glob), `branch` (regex), `title` (regex) and `body` (regex).
Matchers are evaluated independently; the label will be set if at least one of the matchers meets the criteria.

```yml
autolabeler:
- label: 'chore'
files:
- '*.md'
branch:
- '/docs{0,1}\/.+/'
- label: 'bug'
branch:
- '/fix\/.+/'
title:
- '/fix/i'
- label: 'enhancement'
branch:
- '/feature\/.+/'
body:
- '/JIRA-[0-9]{1,4}/'
```

## Projects that don't use Semantic Versioning

If your project doesn't follow [Semantic Versioning](https://semver.org) you can still use Release Drafter, but you may want to set the `version-template` option to customize how the `$NEXT_{PATCH,MINOR,MAJOR}_VERSION` environment variables are generated.
Expand All @@ -267,6 +313,7 @@ The Release Drafter GitHub Action accepts a number of optional inputs directly i
| `version` | The version to be associated with the GitHub release that's created or updated. This will override any version calculated by the release-drafter. |
| `publish` | A boolean indicating whether the release being created or updated should be immediately published. This may be useful if the output of a previous workflow step determines that a new version of your project has been (or will be) released, as with [`salsify/action-detect-and-tag-new-version`](https://github.com/salsify/action-detect-and-tag-new-version). |
| `prerelease` | A boolean indicating whether the relase being created or updated is a prerelease. |
| `commitish` | A string specifying the target branch for the release being created. |

## Action Outputs

Expand Down
7 changes: 7 additions & 0 deletions action.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
const core = require('@actions/core')
const { run } = require('@probot/adapter-github-actions')
const app = require('./index')

run(app).catch((err) => {
core.setFailed(`💥 Release drafter failed with error: ${err.message}`)
})
21 changes: 18 additions & 3 deletions action.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: 'Release Drafter'
description: 'Drafts your next release notes as pull requests are merged into master.'
runs:
using: 'docker'
image: 'Dockerfile'
using: 'node12'
main: 'dist/index.js'
branding:
icon: edit-2
color: orange
Expand Down Expand Up @@ -35,7 +35,22 @@ inputs:
default: ''
prerelease:
description: |
A boolean indicating whether the relase being created or updated is a prerelease.
A boolean indicating whether the release being created or updated is a prerelease.
required: false
default: ''
commitish:
description: |
The object that the release should be created to point to.
required: false
default: ''
disable-releaser:
description: |
A boolean indicating whether the releaser mode is disabled.
required: false
default: ''
disable-autolabeler:
description: |
A boolean indicating whether the autolabeler mode is disabled.
required: false
default: ''
outputs:
Expand Down
8 changes: 7 additions & 1 deletion bin/generate-schema.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,13 @@ const jsonSchema = {
}

// template is only required after deep merged, should not be required in the JSON schema
jsonSchema.required = jsonSchema.required.filter((item) => item !== 'template')
// we should also remove the required field in case nothing remains after the filtering to keep draft04 compatibility
const requiredField = jsonSchema.required.filter((item) => item !== 'template')
if (requiredField.length) {
jsonSchema.required = requiredField
} else {
delete jsonSchema.required
}

if (args[0] === 'print') {
fs.writeFileSync('./schema.json', `${JSON.stringify(jsonSchema, null, 2)}\n`)
Expand Down
11 changes: 11 additions & 0 deletions design/app-logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading