Skip to content

Commit f58b6a1

Browse files
authored
Merge pull request #1192 from danger/fb/fs_lookup
PR Suggestions for #991
2 parents cbdbf9d + e3c4da3 commit f58b6a1

File tree

125 files changed

+4850
-3638
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

125 files changed

+4850
-3638
lines changed

.gitattributes

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# .gitattributes documentation: https://git-scm.com/docs/gitattributes
2+
3+
# Resolve 3-way merge conflicts on the CHANGELOG.md file using the union strategy
4+
CHANGELOG.md merge=union

.github/FUNDING.yml

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
github: [orta]

.github/ISSUE_TEMPLATE/bug_report.md

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: "[BUG] "
5+
labels: bug
6+
---
7+
8+
**Describe the bug**
9+
A clear and concise description of what the bug is.
10+
11+
**To Reproduce**
12+
Steps to reproduce the behavior:
13+
1.
14+
2.
15+
3.
16+
4.
17+
18+
**Expected behavior**
19+
<!--- If you're suggesting a change/improvement, tell us how it should work -->
20+
<!--- If danger is behaving incorrectly, please include a link to the spec or documentation that supports that your expected behavior is correct. -->
21+
22+
**Screenshots**
23+
If applicable, add screenshots to help explain your problem.
24+
25+
**Your Environment**
26+
<!--- Include as many relevant details about the environment you experienced the bug in -->
27+
28+
| software | version
29+
| ---------------- | -------
30+
| danger.js |
31+
| node |
32+
| npm |
33+
| Operating System |
34+
35+
**Additional context**
36+
Add any other context about the problem here.

.github/workflows/CI.yml

+60
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: CI
2+
on: pull_request
3+
4+
jobs:
5+
test:
6+
runs-on: ubuntu-20.04
7+
8+
steps:
9+
# Check out, and set up the node/ruby infra
10+
- uses: actions/checkout@v1
11+
- uses: actions/setup-node@v2
12+
with:
13+
node-version: '14'
14+
15+
# Get local dependencies & test
16+
- run: yarn install
17+
- run: yarn build
18+
- run: yarn test
19+
20+
# Validate related tooling
21+
- run: yarn declarations
22+
- run: yarn tsc distribution/danger.d.ts
23+
- run: rm -rf node_modules/@types/babel-*
24+
- run: rm -rf node_modules/@types/babylon
25+
26+
# Not many Flow users nowadays, so this probably is worth dropping
27+
# if it becomes an issue.
28+
- run: echo "Testing Flow definition file"
29+
- run: yarn build:flow-types
30+
# - run: yarn flow check
31+
32+
- run: 'echo "This is only for Integration tests on two blank projects"'
33+
34+
- run: |
35+
mkdir danger_blank_test
36+
cd danger_blank_test
37+
yarn init --yes
38+
yarn add file:..
39+
echo "warn('I warned you')" > dangerfile.js
40+
echo "Testing a blank Dangerfile on an empty project"
41+
DEBUG="*" yarn danger run --text-only
42+
cd ..
43+
rm -rf danger_blank_test
44+
name: "Make a CRA"
45+
env:
46+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
47+
48+
- run: |
49+
npm install -g create-react-app
50+
create-react-app danger_babel_test
51+
cd danger_babel_test
52+
yarn add file:..
53+
echo "warn('Expect 2 warnings'); const a = async () => {warn('the other');}; schedule(a)" > dangerfile.js
54+
echo "Testing a blank Dangerfile on a babel CRA project"
55+
DEBUG="*" yarn danger ci --text-only
56+
cd ..
57+
rm -rf danger_babel_test
58+
name: "Make a small babel app"
59+
env:
60+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/publish_package.yml

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Release Danger-JS package
2+
3+
on:
4+
push:
5+
tags:
6+
- '*'
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-20.04
11+
12+
steps:
13+
- uses: actions/checkout@v2
14+
15+
- name: Export tag version
16+
run: echo "VERSION=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV
17+
18+
- name: Docker Login
19+
run: echo $PACKAGES_WRITE_TOKEN | docker login ghcr.io -u $USERNAME --password-stdin
20+
env:
21+
PACKAGES_WRITE_TOKEN: ${{ secrets.DOCKER_GITHUB_PASSWORD }}
22+
USERNAME: ${{ secrets.DOCKER_GITHUB_USERNAME }}
23+
24+
- name: Docker Build
25+
run: docker build -t ghcr.io/danger/danger-js:$VERSION .
26+
27+
- name: Deploy
28+
run: docker push ghcr.io/danger/danger-js:$VERSION

.github/workflows/uploadDockerImage.yml

-19
This file was deleted.

.prettierignore

+1
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ source/danger-outgoing-process-schema.json
22
source/danger-incoming-process-schema.json
33
source/platforms/_tests/fixtures/bbs-dsl-input.json
44
source/platforms/_tests/fixtures/bbc-dsl-input.json
5+
CHANGELOG.md

.release-it.json

+3-4
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,8 @@
44
"assets": "brew-distribution/*.zip"
55
},
66
"buildCommand": "yarn package",
7-
"scripts": {
8-
"beforeStart": "VERSION=${version} yarn ts-node scripts/update-changelog.ts",
9-
"beforeBump": "yarn declarations; yarn build:schemas",
10-
"afterRelease": "VERSION=${version} scripts/create-homebrew-tap-pr.sh"
7+
"hooks": {
8+
"before:bump": "yarn declarations; yarn build:schemas",
9+
"after:release": "VERSION=${version} scripts/create-homebrew-tap-pr.sh"
1110
}
1211
}

.travis.yml

+6-31
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ cache:
88
matrix:
99
include:
1010
# Normal CI test runs :D
11-
- node_js: "10"
11+
- node_js: "14"
1212

13-
- node_js: "10"
13+
- node_js: "14"
1414
after_script:
1515
- echo "Validating TypeScript definition file"
1616
- yarn build
@@ -23,13 +23,13 @@ matrix:
2323
- yarn flow check
2424

2525
# Checks every example dangerfile can run in `danger runner`.
26-
- node_js: "10"
26+
- node_js: "14"
2727
script:
2828
- yarn build
2929
- node scripts/run-fixtures.js
3030

3131
# Runs both the CI and PR with a custom process to ensure apps like swift/rust work
32-
- node_js: "10.13"
32+
- node_js: "14"
3333
script:
3434
- yarn build
3535
- node distribution/commands/danger-ci.js --process "ruby scripts/danger_runner.rb"
@@ -61,36 +61,11 @@ matrix:
6161
- echo "Validating that danger pr works as expected"
6262
- DEBUG="*" danger pr https://github.com/danger/danger-js/pull/465 --dangerfile dangerfile.circle.js --verbose
6363

64-
- echo "Grabbing master so that danger-local can use it for comparison"
65-
- git checkout -t origin/master || true
64+
- echo "Grabbing main so that danger-local can use it for comparison"
65+
- git checkout -t origin/main || true
6666
- '[ ! -z $TRAVIS_PULL_REQUEST ] && DEBUG="*" danger local --dangerfile
6767
source/platforms/git/_tests/local_dangerfile_example.ts || echo "Skipping Danger Local for non PR run"'
6868

69-
# Create some fake projects at runtime
70-
- node_js: "10.16"
71-
script:
72-
- echo "This is only for Integration tests on two blank projects"
73-
- yarn build
74-
- mkdir danger_blank_test
75-
- cd danger_blank_test
76-
- yarn init --yes
77-
- yarn add file:..
78-
- echo "warn('I warned you')" > dangerfile.js
79-
- echo "Testing a blank Dangerfile on an empty project"
80-
- DEBUG="*" yarn danger run --text-only
81-
- cd ..
82-
- rm -rf danger_blank_test
83-
84-
- npm install -g create-react-app
85-
- create-react-app danger_babel_test
86-
- cd danger_babel_test
87-
- yarn add file:..
88-
- echo "warn('Expect 2 warnings'); const a = async () => {warn('the other');}; schedule(a)" > dangerfile.js
89-
- echo "Testing a blank Dangerfile on a babel CRA project"
90-
- DEBUG="*" yarn danger ci --text-only
91-
- cd ..
92-
- rm -rf danger_babel_test
93-
9469
script:
9570
- yarn lint
9671
- yarn add jest

.vscode/settings.json

+4
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,11 @@
2424
"autogenerated",
2525
"bdotdub",
2626
"bitbucket",
27+
"bitrise",
28+
"buildkite",
2729
"caffodian",
30+
"codefresh",
31+
"codemagic",
2832
"codeship",
2933
"commit's",
3034
"dangerfile",

.vscode/tasks.json

-15
This file was deleted.

0 commit comments

Comments
 (0)