Skip to content

Commit

Permalink
Merge pull request #1192 from danger/fb/fs_lookup
Browse files Browse the repository at this point in the history
PR Suggestions for #991
  • Loading branch information
orta committed Jan 8, 2022
2 parents cbdbf9d + e3c4da3 commit f58b6a1
Show file tree
Hide file tree
Showing 125 changed files with 4,850 additions and 3,638 deletions.
4 changes: 4 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# .gitattributes documentation: https://git-scm.com/docs/gitattributes

# Resolve 3-way merge conflicts on the CHANGELOG.md file using the union strategy
CHANGELOG.md merge=union
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
github: [orta]
36 changes: 36 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
name: Bug report
about: Create a report to help us improve
title: "[BUG] "
labels: bug
---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1.
2.
3.
4.

**Expected behavior**
<!--- If you're suggesting a change/improvement, tell us how it should work -->
<!--- If danger is behaving incorrectly, please include a link to the spec or documentation that supports that your expected behavior is correct. -->

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Your Environment**
<!--- Include as many relevant details about the environment you experienced the bug in -->

| software | version
| ---------------- | -------
| danger.js |
| node |
| npm |
| Operating System |

**Additional context**
Add any other context about the problem here.
60 changes: 60 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: CI
on: pull_request

jobs:
test:
runs-on: ubuntu-20.04

steps:
# Check out, and set up the node/ruby infra
- uses: actions/checkout@v1
- uses: actions/setup-node@v2
with:
node-version: '14'

# Get local dependencies & test
- run: yarn install
- run: yarn build
- run: yarn test

# Validate related tooling
- run: yarn declarations
- run: yarn tsc distribution/danger.d.ts
- run: rm -rf node_modules/@types/babel-*
- run: rm -rf node_modules/@types/babylon

# Not many Flow users nowadays, so this probably is worth dropping
# if it becomes an issue.
- run: echo "Testing Flow definition file"
- run: yarn build:flow-types
# - run: yarn flow check

- run: 'echo "This is only for Integration tests on two blank projects"'

- run: |
mkdir danger_blank_test
cd danger_blank_test
yarn init --yes
yarn add file:..
echo "warn('I warned you')" > dangerfile.js
echo "Testing a blank Dangerfile on an empty project"
DEBUG="*" yarn danger run --text-only
cd ..
rm -rf danger_blank_test
name: "Make a CRA"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: |
npm install -g create-react-app
create-react-app danger_babel_test
cd danger_babel_test
yarn add file:..
echo "warn('Expect 2 warnings'); const a = async () => {warn('the other');}; schedule(a)" > dangerfile.js
echo "Testing a blank Dangerfile on a babel CRA project"
DEBUG="*" yarn danger ci --text-only
cd ..
rm -rf danger_babel_test
name: "Make a small babel app"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
28 changes: 28 additions & 0 deletions .github/workflows/publish_package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Release Danger-JS package

on:
push:
tags:
- '*'

jobs:
build:
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v2

- name: Export tag version
run: echo "VERSION=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV

- name: Docker Login
run: echo $PACKAGES_WRITE_TOKEN | docker login ghcr.io -u $USERNAME --password-stdin
env:
PACKAGES_WRITE_TOKEN: ${{ secrets.DOCKER_GITHUB_PASSWORD }}
USERNAME: ${{ secrets.DOCKER_GITHUB_USERNAME }}

- name: Docker Build
run: docker build -t ghcr.io/danger/danger-js:$VERSION .

- name: Deploy
run: docker push ghcr.io/danger/danger-js:$VERSION
19 changes: 0 additions & 19 deletions .github/workflows/uploadDockerImage.yml

This file was deleted.

1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ source/danger-outgoing-process-schema.json
source/danger-incoming-process-schema.json
source/platforms/_tests/fixtures/bbs-dsl-input.json
source/platforms/_tests/fixtures/bbc-dsl-input.json
CHANGELOG.md
7 changes: 3 additions & 4 deletions .release-it.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@
"assets": "brew-distribution/*.zip"
},
"buildCommand": "yarn package",
"scripts": {
"beforeStart": "VERSION=${version} yarn ts-node scripts/update-changelog.ts",
"beforeBump": "yarn declarations; yarn build:schemas",
"afterRelease": "VERSION=${version} scripts/create-homebrew-tap-pr.sh"
"hooks": {
"before:bump": "yarn declarations; yarn build:schemas",
"after:release": "VERSION=${version} scripts/create-homebrew-tap-pr.sh"
}
}
37 changes: 6 additions & 31 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ cache:
matrix:
include:
# Normal CI test runs :D
- node_js: "10"
- node_js: "14"

- node_js: "10"
- node_js: "14"
after_script:
- echo "Validating TypeScript definition file"
- yarn build
Expand All @@ -23,13 +23,13 @@ matrix:
- yarn flow check

# Checks every example dangerfile can run in `danger runner`.
- node_js: "10"
- node_js: "14"
script:
- yarn build
- node scripts/run-fixtures.js

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

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

# Create some fake projects at runtime
- node_js: "10.16"
script:
- echo "This is only for Integration tests on two blank projects"
- yarn build
- mkdir danger_blank_test
- cd danger_blank_test
- yarn init --yes
- yarn add file:..
- echo "warn('I warned you')" > dangerfile.js
- echo "Testing a blank Dangerfile on an empty project"
- DEBUG="*" yarn danger run --text-only
- cd ..
- rm -rf danger_blank_test

- npm install -g create-react-app
- create-react-app danger_babel_test
- cd danger_babel_test
- yarn add file:..
- echo "warn('Expect 2 warnings'); const a = async () => {warn('the other');}; schedule(a)" > dangerfile.js
- echo "Testing a blank Dangerfile on a babel CRA project"
- DEBUG="*" yarn danger ci --text-only
- cd ..
- rm -rf danger_babel_test

script:
- yarn lint
- yarn add jest
Expand Down
4 changes: 4 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,11 @@
"autogenerated",
"bdotdub",
"bitbucket",
"bitrise",
"buildkite",
"caffodian",
"codefresh",
"codemagic",
"codeship",
"commit's",
"dangerfile",
Expand Down
15 changes: 0 additions & 15 deletions .vscode/tasks.json

This file was deleted.

Loading

0 comments on commit f58b6a1

Please sign in to comment.