mirror of
https://github.com/cypress-io/cypress.git
synced 2026-02-25 10:30:39 -06:00
put platform and arch into commit message status object
This commit is contained in:
@@ -176,7 +176,6 @@ module.exports = {
|
||||
# the test projects will exercise the new version of
|
||||
# the Cypress test runner we just built
|
||||
runTestProjects: (getStatusAndMessage, providerName, version) ->
|
||||
# status is {owner, repo, sha}
|
||||
|
||||
projectFilter = getFilterByProvider(providerName)
|
||||
|
||||
@@ -217,6 +216,18 @@ module.exports = {
|
||||
createGithubCommitStatusCheck = ({ sha }) ->
|
||||
return if not status
|
||||
|
||||
# status is {owner, repo, sha} and maybe a few other properties
|
||||
isStatus = check.schema({
|
||||
owner: check.unemptyString,
|
||||
repo: check.unemptyString,
|
||||
sha: check.commitId,
|
||||
context: check.unemptyString,
|
||||
platform: check.unemptyString,
|
||||
arch: check.unemptyString
|
||||
})
|
||||
if not isStatus(status)
|
||||
console.error("Invalid status object %o", status)
|
||||
|
||||
targetUrl = "https://github.com/#{owner}/#{repo}/commit/#{sha}"
|
||||
commitStatusOptions = {
|
||||
targetUrl,
|
||||
|
||||
@@ -98,11 +98,16 @@ const getStatusAndMessage = (projectRepoName) => {
|
||||
|
||||
if (commit && is.commitId(commit)) {
|
||||
// commit is full 40 character hex string
|
||||
const platform = os.platform()
|
||||
const arch = os.arch()
|
||||
|
||||
status = {
|
||||
owner: 'cypress-io',
|
||||
repo: 'cypress',
|
||||
sha: commit,
|
||||
context: `[${os.platform()}-${os.arch()}] ${projectRepoName}`,
|
||||
platform,
|
||||
arch,
|
||||
context: `[${platform}-${arch}] ${projectRepoName}`,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user