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

detect forked PR on AppVeyor CI, close #4063 #4078

Merged
merged 2 commits into from
May 1, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion packages/server/lib/modes/record.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ createRun = (options = {}) ->
recordKey ?= env.get("CYPRESS_RECORD_KEY") or env.get("CYPRESS_CI_KEY")

if not recordKey
## are we a forked PR and are we NOT running our own internal
## are we a forked pull request (forked PR) and are we NOT running our own internal
## e2e tests? currently some e2e tests fail when a user submits
## a PR because this logic triggers unintended here
if isForkPr.isForkPr() and not runningInternalTests()
Expand Down
2 changes: 1 addition & 1 deletion packages/server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@
"http-status-codes": "1.3.2",
"human-interval": "0.1.6",
"image-size": "0.7.2",
"is-fork-pr": "2.0.0",
"is-fork-pr": "2.2.0",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

new version with AppVeyor CI support

"jimp": "0.6.0",
"jsonlint": "1.6.3",
"konfig": "0.2.1",
Expand Down
3 changes: 2 additions & 1 deletion packages/server/test/e2e/7_record_spec.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -502,6 +502,7 @@ describe "e2e record", ->
expect(getRequestUrls()).to.be.empty

it "warns but does not exit when is forked pr", ->
process.env.CIRCLECI = "true"
process.env.CIRCLE_PR_NUMBER = "123"
process.env.CIRCLE_PR_USERNAME = "brian-mann"
process.env.CIRCLE_PR_REPONAME = "cypress"
Expand All @@ -517,7 +518,7 @@ describe "e2e record", ->
expect(getRequestUrls()).to.be.empty

it "warns but does not exit when is forked pr and parallel", ->
process.env.CIRCLECI = "1"
process.env.CIRCLECI = "true"
process.env.CIRCLE_WORKFLOW_ID = "123"
process.env.CIRCLE_PR_NUMBER = "123"
process.env.CIRCLE_PR_USERNAME = "brian-mann"
Expand Down
1 change: 0 additions & 1 deletion packages/server/test/integration/cypress_spec.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ http = require("http")
Promise = require("bluebird")
electron = require("electron")
commitInfo = require("@cypress/commit-info")
isForkPr = require("is-fork-pr")
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unused in this file

Fixtures = require("../support/helpers/fixtures")
snapshot = require("snap-shot-it")
stripAnsi = require("strip-ansi")
Expand Down