Skip to content

Commit c8bc952

Browse files
authored
Merge pull request #453 from microsoftgraph/kiota/long-term-branch
Merge kiota/long-term-branch into dev
2 parents 968acfe + cf2e213 commit c8bc952

File tree

67 files changed

+1530
-2684
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+1530
-2684
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
* @samwelkanda @jobala @ddyett @MichaelMainer @shemogumbe
1+
@microsoftgraph/msgraph-devx-python-write
Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
---
22
name: Bug report
33
about: Create a report to help us improve
4-
title: ''
4+
title: ""
55
labels: bug
6-
assignees: samwelkanda
7-
86
---
97

108
---
9+
1110
name: Bug report
1211
about: Create a report to help us improve
1312
title: ''
@@ -16,15 +15,20 @@ assignees: ''
1615

1716
---
1817

18+
**Environment**
19+
20+
- Python Version
21+
- msgraph-core version:
22+
- OS:
23+
24+
**Stack trace (if available)**
25+
Screenshot or `formatted` copy and paste of your stack trace.
26+
1927
**Describe the bug**
2028
A clear and concise description of what the bug is.
2129

2230
**To Reproduce**
2331
Steps to reproduce the behavior:
24-
1. Go to '...'
25-
2. Click on '....'
26-
3. Scroll down to '....'
27-
4. See error
2832

2933
**Expected behavior**
3034
A clear and concise description of what you expected to happen.
@@ -33,4 +37,4 @@ A clear and concise description of what you expected to happen.
3337
If applicable, add screenshots to help explain your problem.
3438

3539
**Additional context**
36-
Add any other context about the problem here.
40+
Add any other context about the problem here.

.github/RELEASE-TEMPLATE.md

Lines changed: 0 additions & 4 deletions
This file was deleted.

.github/dependabot.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: pip
4+
directory: "/"
5+
schedule:
6+
interval: daily
7+
open-pull-requests-limit: 10
8+
- package-ecosystem: github-actions
9+
directory: "/"
10+
schedule:
11+
interval: daily
12+
open-pull-requests-limit: 10
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
# Copyright (c) Microsoft Corporation.
2+
# Licensed under the MIT License.
3+
4+
# File initially created using https://github.com/MIchaelMainer/policyservicetoolkit/blob/main/branch_protection_export.ps1.
5+
6+
name: msgraph-sdk-python-core-branch-protection
7+
description: Branch protection policy for the msgraph-sdk-python-core repository
8+
resource: repository
9+
configuration:
10+
branchProtectionRules:
11+
12+
- branchNamePattern: dev
13+
# This branch pattern applies to the following branches as of 06/12/2023 11:37:28:
14+
# dev
15+
16+
# Specifies whether this branch can be deleted. boolean
17+
allowsDeletions: false
18+
# Specifies whether forced pushes are allowed on this branch. boolean
19+
allowsForcePushes: false
20+
# Specifies whether new commits pushed to the matching branches dismiss pull request review approvals. boolean
21+
dismissStaleReviews: true
22+
# Specifies whether admins can overwrite branch protection. boolean
23+
isAdminEnforced: false
24+
# Indicates whether "Require a pull request before merging" is enabled. boolean
25+
requiresPullRequestBeforeMerging: true
26+
# Specifies the number of pull request reviews before merging. int (0-6). Should be null/empty if PRs are not required
27+
requiredApprovingReviewsCount: 1
28+
# Require review from Code Owners. Requires requiredApprovingReviewsCount. boolean
29+
requireCodeOwnersReview: true
30+
# Are commits required to be signed. boolean. TODO: all contributors must have commit signing on local machines.
31+
requiresCommitSignatures: false
32+
# Are conversations required to be resolved before merging? boolean
33+
requiresConversationResolution: true
34+
# Are merge commits prohibited from being pushed to this branch. boolean
35+
requiresLinearHistory: false
36+
# Required status checks to pass before merging. Values can be any string, but if the value does not correspond to any
37+
# existing status check, the status check will be stuck on pending for status since nothing exists to push an actual status
38+
requiredStatusChecks:
39+
- CodeQL
40+
# Require branches to be up to date before merging. Requires requiredStatusChecks. boolean
41+
requiresStrictStatusChecks: true
42+
# Indicates whether there are restrictions on who can push. boolean. Should be set with whoCanPush.
43+
restrictsPushes: false
44+
# Restrict who can dismiss pull request reviews. boolean
45+
restrictsReviewDismissals: false
46+
47+
- branchNamePattern: master
48+
# This branch pattern applies to the following branches as of 06/12/2023 11:37:28:
49+
# master
50+
51+
# Specifies whether this branch can be deleted. boolean
52+
allowsDeletions: false
53+
# Specifies whether forced pushes are allowed on this branch. boolean
54+
allowsForcePushes: true
55+
# Specifies whether new commits pushed to the matching branches dismiss pull request review approvals. boolean
56+
dismissStaleReviews: true
57+
# Specifies whether admins can overwrite branch protection. boolean
58+
isAdminEnforced: false
59+
# Indicates whether "Require a pull request before merging" is enabled. boolean
60+
requiresPullRequestBeforeMerging: true
61+
# Specifies the number of pull request reviews before merging. int (0-6). Should be null/empty if PRs are not required
62+
requiredApprovingReviewsCount: 1
63+
# Require review from Code Owners. Requires requiredApprovingReviewsCount. boolean
64+
requireCodeOwnersReview: true
65+
# Are commits required to be signed. boolean. TODO: all contributors must have commit signing on local machines.
66+
requiresCommitSignatures: false
67+
# Are conversations required to be resolved before merging? boolean
68+
requiresConversationResolution: true
69+
# Are merge commits prohibited from being pushed to this branch. boolean
70+
requiresLinearHistory: false
71+
# Required status checks to pass before merging. Values can be any string, but if the value does not correspond to any
72+
# existing status check, the status check will be stuck on pending for status since nothing exists to push an actual status
73+
requiredStatusChecks:
74+
- CodeQL
75+
# Require branches to be up to date before merging. Requires requiredStatusChecks. boolean
76+
requiresStrictStatusChecks: true
77+
# Indicates whether there are restrictions on who can push. boolean. Should be set with whoCanPush.
78+
restrictsPushes: false
79+
# Restrict who can dismiss pull request reviews. boolean
80+
restrictsReviewDismissals: false
Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
id:
2+
name: GitOps.PullRequestIssueManagement
3+
description: GitOps.PullRequestIssueManagement primitive
4+
owner:
5+
resource: repository
6+
disabled: false
7+
where:
8+
configuration:
9+
resourceManagementConfiguration:
10+
scheduledSearches:
11+
- description:
12+
frequencies:
13+
- hourly:
14+
hour: 6
15+
filters:
16+
- isIssue
17+
- isOpen
18+
- hasLabel:
19+
label: 'needs author feedback'
20+
- hasLabel:
21+
label: 'Status: No Recent Activity'
22+
- noActivitySince:
23+
days: 3
24+
actions:
25+
- closeIssue
26+
- description:
27+
frequencies:
28+
- hourly:
29+
hour: 6
30+
filters:
31+
- isIssue
32+
- isOpen
33+
- hasLabel:
34+
label: 'needs author feedback'
35+
- noActivitySince:
36+
days: 4
37+
- isNotLabeledWith:
38+
label: 'Status: No Recent Activity'
39+
actions:
40+
- addLabel:
41+
label: 'Status: No Recent Activity'
42+
- addReply:
43+
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**.
44+
- description:
45+
frequencies:
46+
- hourly:
47+
hour: 6
48+
filters:
49+
- isIssue
50+
- isOpen
51+
- hasLabel:
52+
label: 'duplicate'
53+
- noActivitySince:
54+
days: 1
55+
actions:
56+
- addReply:
57+
reply: This issue has been marked as duplicate and has not had any activity for **1 day**. It will be closed for housekeeping purposes.
58+
- closeIssue
59+
eventResponderTasks:
60+
- if:
61+
- payloadType: Issue_Comment
62+
- isAction:
63+
action: Created
64+
- isActivitySender:
65+
issueAuthor: True
66+
- hasLabel:
67+
label: 'needs author feedback'
68+
- isOpen
69+
then:
70+
- addLabel:
71+
label: 'Needs: Attention :wave:'
72+
- removeLabel:
73+
label: 'needs author feedback'
74+
description:
75+
- if:
76+
- payloadType: Issues
77+
- not:
78+
isAction:
79+
action: Closed
80+
- hasLabel:
81+
label: 'Status: No Recent Activity'
82+
then:
83+
- removeLabel:
84+
label: 'Status: No Recent Activity'
85+
description:
86+
- if:
87+
- payloadType: Issue_Comment
88+
- hasLabel:
89+
label: 'Status: No Recent Activity'
90+
then:
91+
- removeLabel:
92+
label: 'Status: No Recent Activity'
93+
description:
94+
- if:
95+
- payloadType: Pull_Request
96+
then:
97+
- inPrLabel:
98+
label: WIP
99+
description:
100+
onFailure:
101+
onSuccess:
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Auto-merge dependabot updates
2+
3+
on:
4+
pull_request:
5+
branches: [master]
6+
7+
permissions:
8+
pull-requests: write
9+
contents: write
10+
11+
jobs:
12+
dependabot-merge:
13+
runs-on: ubuntu-latest
14+
15+
if: ${{ github.actor == 'dependabot[bot]' }}
16+
17+
steps:
18+
- name: Dependabot metadata
19+
id: metadata
20+
uses: dependabot/[email protected]
21+
with:
22+
github-token: "${{ secrets.GITHUB_TOKEN }}"
23+
24+
- name: Enable auto-merge for Dependabot PRs
25+
# Only if version bump is not a major version change
26+
if: ${{steps.metadata.outputs.update-type != 'version-update:semver-major'}}
27+
run: gh pr merge --auto --merge "$PR_URL"
28+
env:
29+
PR_URL: ${{github.event.pull_request.html_url}}
30+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

.github/workflows/ci.yml renamed to .github/workflows/build.yml

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,47 @@
11
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
22
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
33

4-
name: CI
4+
name: Build and test
55

66
on:
7+
push:
78
pull_request:
8-
branches: [master, dev]
9+
workflow_call:
910

1011
jobs:
1112
build:
1213
runs-on: ubuntu-latest
14+
timeout-minutes: 40
1315
strategy:
16+
max-parallel: 5
1417
matrix:
15-
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10"]
18+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
1619

1720
steps:
18-
- uses: actions/checkout@v3
21+
- uses: actions/checkout@v4
1922
- name: Set up Python ${{ matrix.python-version }}
20-
uses: actions/setup-python@v4
23+
uses: actions/setup-python@v5
2124
with:
2225
python-version: ${{ matrix.python-version }}
2326
- name: Install dependencies
2427
run: |
2528
python -m pip install --upgrade pip
26-
pip install pipenv
27-
pipenv install --dev --skip-lock
29+
pip install -r requirements-dev.txt
2830
- name: Check code format
2931
run: |
30-
pipenv run yapf -dr .
32+
yapf -dr src
3133
- name: Check import order
3234
run: |
33-
pipenv run isort .
35+
isort src
36+
- name: Static type checking with Mypy
37+
run: |
38+
mypy src
3439
- name: Lint with Pylint
3540
run: |
36-
pipenv run pylint msgraph --disable=W --rcfile=.pylintrc
41+
pylint src --disable=W --rcfile=.pylintrc
3742
- name: Test with pytest
3843
run: |
39-
pipenv run pytest
44+
pytest
4045
env:
4146
AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
4247
AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}

0 commit comments

Comments
 (0)