Skip to content

Commit

Permalink
Merge pull request #51 from microsoft/dev
Browse files Browse the repository at this point in the history
Release 0.8.3
  • Loading branch information
SilasKenneth authored Oct 5, 2023
2 parents c35b028 + 1e98bdf commit c4345c3
Show file tree
Hide file tree
Showing 6 changed files with 297 additions and 53 deletions.
101 changes: 101 additions & 0 deletions .github/policies/resourceManagement.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
id:
name: GitOps.PullRequestIssueManagement
description: GitOps.PullRequestIssueManagement primitive
owner:
resource: repository
disabled: false
where:
configuration:
resourceManagementConfiguration:
scheduledSearches:
- description:
frequencies:
- hourly:
hour: 6
filters:
- isIssue
- isOpen
- hasLabel:
label: 'Needs: Author Feedback'
- hasLabel:
label: 'Status: No Recent Activity'
- noActivitySince:
days: 3
actions:
- closeIssue
- description:
frequencies:
- hourly:
hour: 6
filters:
- isIssue
- isOpen
- hasLabel:
label: 'Needs: Author Feedback'
- noActivitySince:
days: 4
- isNotLabeledWith:
label: 'Status: No Recent Activity'
actions:
- addLabel:
label: 'Status: No Recent Activity'
- addReply:
reply: This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for **4 days**. It will be closed if no further activity occurs **within 3 days of this comment**.
- description:
frequencies:
- hourly:
hour: 6
filters:
- isIssue
- isOpen
- hasLabel:
label: 'Resolution: Duplicate'
- noActivitySince:
days: 1
actions:
- addReply:
reply: This issue has been marked as duplicate and has not had any activity for **1 day**. It will be closed for housekeeping purposes.
- closeIssue
eventResponderTasks:
- if:
- payloadType: Issue_Comment
- isAction:
action: Created
- isActivitySender:
issueAuthor: True
- hasLabel:
label: 'Needs: Author Feedback'
- isOpen
then:
- addLabel:
label: 'Needs: Attention :wave:'
- removeLabel:
label: 'Needs: Author Feedback'
description:
- if:
- payloadType: Issues
- not:
isAction:
action: Closed
- hasLabel:
label: 'Status: No Recent Activity'
then:
- removeLabel:
label: 'Status: No Recent Activity'
description:
- if:
- payloadType: Issue_Comment
- hasLabel:
label: 'Status: No Recent Activity'
then:
- removeLabel:
label: 'Status: No Recent Activity'
description:
- if:
- payloadType: Pull_Request
then:
- inPrLabel:
label: WIP
description:
onFailure:
onSuccess:
7 changes: 5 additions & 2 deletions .github/workflows/pr-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,15 @@ jobs:
php-versions: ['7.4', '8.0', '8.1', '8.2']
steps:
- name: Checkout
uses: actions/checkout@v3.5.3
uses: actions/checkout@v4.1.0
- name: Setup PHP and Xdebug for Code Coverage report
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
coverage: xdebug
coverage: xdebug2
env:
phpts: ts
debug: true
- name: Install dependencies
run: composer install
- name: Run static analysis
Expand Down
3 changes: 3 additions & 0 deletions phpunit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,7 @@
<html outputDirectory="coverage"/>
</report>
</coverage>
<php>
<ini name="memory_limit" value="500M" />
</php>
</phpunit>
8 changes: 8 additions & 0 deletions src/Constants.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?php

namespace Microsoft\Kiota\Authentication;

class Constants
{
public const VERSION = "0.8.3";
}
37 changes: 37 additions & 0 deletions src/ObservabilityOptions.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<?php

namespace Microsoft\Kiota\Authentication;

use OpenTelemetry\API\Common\Instrumentation\Globals;
use OpenTelemetry\API\Trace\TracerInterface;

class ObservabilityOptions
{
private static ?TracerInterface $tracer = null;
public static function getTracerInstrumentationName(): string
{
return "microsoft.kiota.authentication:kiota-authentication-phpleague";
}

/**
* @return TracerInterface
*/
public static function getTracer(): TracerInterface
{
if (self::$tracer === null) {
self::$tracer = Globals::tracerProvider()->getTracer(
self::getTracerInstrumentationName(),
Constants::VERSION);
}
return self::$tracer;
}

/**
* @param TracerInterface $tracer
* @return void
*/
public static function setTracer(TracerInterface $tracer): void
{
self::$tracer = $tracer;
}
}
Loading

0 comments on commit c4345c3

Please sign in to comment.