Skip to content

Commit

Permalink
Merge branch 'ChilliCream:main' into opa-auth
Browse files Browse the repository at this point in the history
  • Loading branch information
queil authored Jan 31, 2022
2 parents e43a74d + ce10dd3 commit 59d9294
Show file tree
Hide file tree
Showing 1,106 changed files with 47,904 additions and 5,359 deletions.
2 changes: 1 addition & 1 deletion .build/Build.PublicApiAnalyzer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
using System.Threading.Tasks;
using Nuke.Common;
using Nuke.Common.IO;
using Nuke.Common.ProjectModel;
using Nuke.Common.Tools.DotNet;
using static Nuke.Common.Tools.DotNet.DotNetTasks;
using static Nuke.Common.Tools.Git.GitTasks;
using static Helpers;
using Nuke.Common.ProjectModel;

partial class Build
{
Expand Down
7 changes: 5 additions & 2 deletions .build/Build.Sonar.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
using Nuke.Common.Tooling;
using Nuke.Common.Tools.DotNet;
using Nuke.Common.Tools.SonarScanner;
using static System.IO.Path;
using static Nuke.Common.Tools.DotNet.DotNetTasks;
using static Nuke.Common.Tools.SonarScanner.SonarScannerTasks;
using static Helpers;
using static System.IO.Path;

partial class Build
{
Expand Down Expand Up @@ -121,5 +121,8 @@ DotNetBuildSettings SonarBuildAll(DotNetBuildSettings settings) =>
.SetFramework(Net60);

bool IsRelevantForSonar(string fileName)
=> !ExcludedCover.Contains(GetFileNameWithoutExtension(fileName));
=> !ExcludedCover.Contains(GetFileNameWithoutExtension(fileName)) &&
!fileName.Contains("example") &&
!fileName.Contains("sample") &&
!fileName.Contains("HotChocolate.Types.Analyzers");
}
4 changes: 2 additions & 2 deletions .build/Build.Tests.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
Expand All @@ -17,8 +19,6 @@
using static Nuke.Common.Tools.ReportGenerator.ReportGeneratorTasks;
using static Nuke.Common.Tools.Codecov.CodecovTasks;
using static Helpers;
using System;
using System.Diagnostics;

partial class Build
{
Expand Down
2 changes: 2 additions & 0 deletions .build/Helpers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,12 @@ class Helpers
{
"GreenDonut",
Path.Combine("HotChocolate", "Analyzers"),
Path.Combine("HotChocolate", "ApolloFederation"),
Path.Combine("HotChocolate", "AspNetCore"),
Path.Combine("HotChocolate", "AzureFunctions"),
Path.Combine("HotChocolate", "Core"),
Path.Combine("HotChocolate", "CodeGeneration"),
Path.Combine("HotChocolate", "Diagnostics"),
Path.Combine("HotChocolate", "Language"),
Path.Combine("HotChocolate", "PersistedQueries"),
Path.Combine("HotChocolate", "Utilities"),
Expand Down
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ body:
- Hot Chocolate
- Strawberry Shake
- Banana Cake Pop
- Green Donut
validations:
required: true
- type: input
Expand Down
3 changes: 2 additions & 1 deletion .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,11 @@ body:
id: product
attributes:
label: Product
description: Which of our products is affected by this bug?
description: Which of our products does this relate to?
options:
- Hot Chocolate
- Strawberry Shake
- Banana Cake Pop
- Green Donut
validations:
required: true
62 changes: 62 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"

on:
push:
branches: [ main ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ main ]
schedule:
- cron: '28 6 * * 6'

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [ 'csharp' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Learn more about CodeQL language support at https://git.io/codeql-language-support

steps:
- name: Checkout repository
uses: actions/checkout@v2

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main

- name: Setup .NET Core SDK
uses: actions/setup-dotnet@v1.9.0

- name: Build
run: |
./init.sh
dotnet build ./src/All.sln
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
53 changes: 0 additions & 53 deletions ErrorCodes.md

This file was deleted.

10 changes: 10 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@ MIT License

Copyright (c) 2021 ChilliCream Inc. (Michael & Rafael Staib)

DISCLAIMER:
----------------------------------------------------------------------------------
Covered by the MIT is only the C# source code that is located in the main branch.
Minified JavaScript files are excluded from the MIT file since they represent
external components from other projects that are just used by our project.

Further, other branches from our contributors or temporary feature branches
are not covered by this license and may contain proprietary code.
----------------------------------------------------------------------------------

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
![ChilliCream GraphQL Platform](https://chillicream.com/resources/chillicream-graphql-banner.svg)

[![NuGet Package](https://img.shields.io/nuget/v/hotchocolate.svg)](https://www.nuget.org/packages/HotChocolate/)
[![License](https://img.shields.io/github/license/ChilliCream/hotchocolate.svg)](https://github.com/ChilliCream/hotchocolate/blob/main/LICENSE)
[![License](https://img.shields.io/badge/license-MIT-green)](https://github.com/ChilliCream/hotchocolate/blob/main/LICENSE)
[![Coverage Status](https://sonarcloud.io/api/project_badges/measure?project=HotChocolate&metric=coverage)](https://sonarcloud.io/dashboard?id=HotChocolate)
[![Slack channel](https://img.shields.io/badge/join%20the%20community-on%20slack-blue.svg)](http://slack.chillicream.com/)
[![Twitter](https://img.shields.io/badge/join%20us-on%20twitter-green.svg)](https://twitter.com/chilli_cream)
Expand Down
16 changes: 16 additions & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Security Policy

## Supported Versions

We will provide security updates to the latest major version.

| Version | Supported |
| ------- | ------------------ |
| 12.x | :white_check_mark: |
| < 12.0 | :x: |

## Reporting a Vulnerability

Security issues and bugs should be reported privately, via email, to ChilliCream Inc. by emailing contact@chillicream.com. You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message.

Please do not open issues for anything you think might have a security implication.
2 changes: 1 addition & 1 deletion format.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

rootDir=$(dirname "$0")


$rootDir/src/HotChocolate/AspNetCore/format.sh
$rootDir/src/HotChocolate/ApolloFederation/format.sh
$rootDir/src/HotChocolate/Data/format.sh
$rootDir/src/HotChocolate/Language/format.sh
3 changes: 3 additions & 0 deletions src/GreenDonut/src/Core/DataLoaderDiagnosticEventListener.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ public virtual void ResolvedTaskFromCache(
public virtual IDisposable ExecuteBatch<TKey>(
IDataLoader dataLoader,
IReadOnlyList<TKey> keys)
where TKey : notnull
=> EmptyScope;

/// <inheritdoc />
Expand All @@ -39,12 +40,14 @@ public virtual void BatchResults<TKey, TValue>(
public virtual void BatchError<TKey>(
IReadOnlyList<TKey> keys,
Exception error)
where TKey : notnull
{ }

/// <inheritdoc />
public virtual void BatchItemError<TKey>(
TKey key,
Exception error)
where TKey : notnull
{ }

private sealed class EmptyActivityScope : IDisposable
Expand Down
9 changes: 6 additions & 3 deletions src/GreenDonut/src/Core/IDataLoaderDiagnosticEvents.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ void ResolvedTaskFromCache(
/// </returns>
IDisposable ExecuteBatch<TKey>(
IDataLoader dataLoader,
IReadOnlyList<TKey> keys);
IReadOnlyList<TKey> keys)
where TKey : notnull;

/// <summary>
/// This event is raised whenever the executed batch yielded a result.
Expand All @@ -53,7 +54,8 @@ void BatchResults<TKey, TValue>(
/// <typeparam name="TKey">The type of the keys.</typeparam>
void BatchError<TKey>(
IReadOnlyList<TKey> keys,
Exception error);
Exception error)
where TKey : notnull;

/// <summary>
/// This event is raised whenever there is an error for a specific key
Expand All @@ -64,6 +66,7 @@ void BatchError<TKey>(
/// <typeparam name="TKey">The type of the key.</typeparam>
void BatchItemError<TKey>(
TKey key,
Exception error);
Exception error)
where TKey : notnull;
}
}
24 changes: 24 additions & 0 deletions src/HotChocolate/ApolloFederation/.vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"label": "build",
"command": "dotnet",
"type": "shell",
"args": [
"build",
// Ask dotnet build to generate full paths for file names.
"/property:GenerateFullPaths=true",
// Do not generate summary otherwise it leads to duplicate errors in Problems panel
"/consoleloggerparameters:NoSummary"
],
"group": "build",
"presentation": {
"reveal": "silent"
},
"problemMatcher": "$msCompile"
}
]
}
9 changes: 9 additions & 0 deletions src/HotChocolate/ApolloFederation/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<Project>
<Import Project="$([MSBuild]::GetPathOfFileAbove('Directory.Build.props', '$(MSBuildThisFileDirectory)..\'))" />

<PropertyGroup>
<Nullable>enable</Nullable>
<TargetFrameworks Condition="'$(IsMacOsArm)' != 'true'">net6.0; net5.0</TargetFrameworks>
<TargetFrameworks Condition="'$(IsMacOsArm)' == 'true'">net6.0</TargetFrameworks>
</PropertyGroup>
</Project>
Loading

0 comments on commit 59d9294

Please sign in to comment.