Skip to content

Commit 443f805

Browse files
authored
Merge pull request #179 from microsoftgraph/dev
Dev
2 parents 6d9304e + e8b38fa commit 443f805

File tree

6 files changed

+111
-7
lines changed

6 files changed

+111
-7
lines changed

.github/workflows/pr-validation.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
matrix:
2121
php-versions: ['7.4', '8.1', '8.2', '8.3']
2222
steps:
23-
- uses: actions/[email protected].5
23+
- uses: actions/[email protected].6
2424
- name: Setup PHP
2525
uses: shivammathur/setup-php@v2
2626
with:
@@ -41,7 +41,7 @@ jobs:
4141
code-coverage:
4242
runs-on: ubuntu-latest
4343
steps:
44-
- uses: actions/[email protected].5
44+
- uses: actions/[email protected].6
4545
- name: Setup PHP and Xdebug for Code Coverage report
4646
uses: shivammathur/setup-php@v2
4747
with:
Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
# This workflow is used to add new issues to GitHub GraphSDKs Project
2+
3+
name: Add Issue or PR to project
4+
on:
5+
issues:
6+
types:
7+
- opened
8+
pull_request:
9+
types:
10+
- opened
11+
branches:
12+
- "dev"
13+
14+
jobs:
15+
track_issue:
16+
if: github.actor != 'dependabot[bot]' && !github.event.pull_request.head.repo.fork
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: Generate token
20+
id: generate_token
21+
uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a
22+
with:
23+
app_id: ${{ secrets.GRAPHBOT_APP_ID }}
24+
private_key: ${{ secrets.GRAPHBOT_APP_PEM }}
25+
26+
- name: Get project data
27+
env:
28+
GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }}
29+
ORGANIZATION: microsoftgraph
30+
PROJECT_NUMBER: 55
31+
run: |
32+
gh api graphql -f query='
33+
query($org: String!, $number: Int!) {
34+
organization(login: $org){
35+
projectV2(number: $number) {
36+
id
37+
fields(first:20) {
38+
nodes {
39+
... on ProjectV2SingleSelectField {
40+
id
41+
name
42+
options {
43+
id
44+
name
45+
}
46+
}
47+
}
48+
}
49+
}
50+
}
51+
}' -f org=$ORGANIZATION -F number=$PROJECT_NUMBER > project_data.json
52+
53+
echo 'PROJECT_ID='$(jq '.data.organization.projectV2.id' project_data.json) >> $GITHUB_ENV
54+
echo 'LANGUAGE_FIELD_ID='$(jq '.data.organization.projectV2.fields.nodes[] | select(.name== "Language") | .id' project_data.json) >> $GITHUB_ENV
55+
echo 'LANGUAGE_OPTION_ID='$(jq '.data.organization.projectV2.fields.nodes[] | select(.name== "Language") | .options[] | select(.name=="PHP") |.id' project_data.json) >> $GITHUB_ENV
56+
57+
- name: Add Issue or PR to project
58+
env:
59+
GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }}
60+
ISSUE_ID: ${{ github.event_name == 'issues' && github.event.issue.node_id || github.event.pull_request.node_id }}
61+
run: |
62+
item_id="$( gh api graphql -f query='
63+
mutation($project:ID!, $issue:ID!) {
64+
addProjectV2ItemById(input: {projectId: $project, contentId: $issue}) {
65+
item {
66+
id
67+
}
68+
}
69+
}' -f project=$PROJECT_ID -f issue=$ISSUE_ID --jq '.data.addProjectV2ItemById.item.id')"
70+
71+
echo 'ITEM_ID='$item_id >> $GITHUB_ENV
72+
73+
- name: Set Language
74+
env:
75+
GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }}
76+
run: |
77+
gh api graphql -f query='
78+
mutation (
79+
$project: ID!
80+
$item: ID!
81+
$language_field: ID!
82+
$language_value: String!
83+
) {
84+
set_status: updateProjectV2ItemFieldValue(input: {
85+
projectId: $project
86+
itemId: $item
87+
fieldId: $language_field
88+
value: {singleSelectOptionId: $language_value}
89+
}) {
90+
projectV2Item {
91+
id
92+
}
93+
}
94+
}' -f project=$PROJECT_ID -f item=$ITEM_ID -f language_field=$LANGUAGE_FIELD_ID -f language_value=${{ env.LANGUAGE_OPTION_ID }} --silent

.github/workflows/tag-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
create-tag:
2222
runs-on: ubuntu-latest
2323
steps:
24-
- uses: actions/[email protected].5
24+
- uses: actions/[email protected].6
2525

2626
- name: Get SDK version and set environment variable
2727
run: |

.github/workflows/update-docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
run-php-documentor:
1616
runs-on: ubuntu-latest
1717
steps:
18-
- uses: actions/[email protected].5
18+
- uses: actions/[email protected].6
1919
with:
2020
ref: ${{ github.ref }}
2121

CODE_OF_CONDUCT.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Microsoft Open Source Code of Conduct
2+
3+
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
4+
5+
Resources:
6+
7+
- [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/)
8+
- [Microsoft Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/)
9+
- Contact [[email protected]](mailto:[email protected]) with questions or concerns
10+
- Employees can reach out at [aka.ms/opensource/moderation-support](https://aka.ms/opensource/moderation-support)

tests/Requests/BaseBatchRequestBuilderTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ protected function setUp(): void
3333
Utils::streamFor(json_encode([
3434
"responses" => [
3535
[
36-
"id" => 1,
36+
"id" => "1",
3737
"status" => 200,
3838
"headers" => ['content-type' => 'text/plain', 'content-length' => '10'],
3939
"body" => "text"
@@ -47,13 +47,13 @@ protected function setUp(): void
4747
Utils::streamFor(json_encode([
4848
"responses" => [
4949
[
50-
"id" => 1,
50+
"id" => "1",
5151
"status" => 200,
5252
"headers" => ['content-type' => 'text/plain'],
5353
"body" => "text"
5454
],
5555
[
56-
"id" => 2,
56+
"id" => "2",
5757
"status" => 424,
5858
"headers" => ['content-type' => 'text/plain'],
5959
"body" => "Failed Dependency"

0 commit comments

Comments
 (0)