Skip to content

Commit

Permalink
chore: Update auto add github workflow and issue form templates (#558)
Browse files Browse the repository at this point in the history
* chore: Update auto add github workflow and issue form templates

* Remove specification of astroid lib and let pylint requirements dictate version

* Remove specification of astroid lib and let pylint requirements dictate version
  • Loading branch information
fey101 committed May 9, 2024
1 parent ae6f5e7 commit 337c649
Show file tree
Hide file tree
Showing 8 changed files with 243 additions and 63 deletions.
100 changes: 100 additions & 0 deletions .github/ISSUE_TEMPLATE/01-sdk-bug.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
name: SDK Bug Report
description: File SDK bug report
labels: ["type:bug", "status:waiting-for-triage"]
body:
- type: markdown
attributes:
value: |
**Thank you for taking the time to fill out this bug report!**
💥Before submitting a new request, please search existing issues to see if an issue already exists.
- type: textarea
id: description
attributes:
label: Describe the bug
description: |
Provide a description of the actual behavior observed. If applicable please include any error messages, exception stacktraces or a screenshot.
placeholder: I am trying to do [...] but [...]
validations:
required: true
- type: textarea
id: expected-behavior
attributes:
label: Expected behavior
description: |
A clear and concise description of what you expected to happen.
placeholder: Expected behavior
validations:
required: true
- type: textarea
id: repro-steps
attributes:
label: How to reproduce
description: |
Please include minimal steps to reproduce the problem if possible. E.g.: the smallest possible code snippet; or steps to run project in link above. If possible include text as text rather than screenshots (so it shows up in searches).
If there's a link to a public repo where the sample code exists, include it too.
placeholder: Minimal Reproduction steps
validations:
required: true
- type: input
attributes:
label: SDK Version
placeholder: e.g. 5.32.1
description: Version of the SDK with the bug described above.
validations:
required: false
- type: input
id: regression
attributes:
label: Latest version known to work for scenario above?
description: |
Did this work in a previous build or release of the SDK or API client? If you can try a previous release or build to find out, that can help us narrow down the problem. If you don't know, that's OK.
placeholder: version-number
validations:
required: false
- type: textarea
id: known-workarounds
attributes:
label: Known Workarounds
description: |
Please provide a description of any known workarounds.
placeholder: Known Workarounds
validations:
required: false
- type: textarea
id: logs
attributes:
label: Debug output
description: Please copy and paste the debug output below.
value: |
<details><summary>Click to expand log</summary>
```
<Log output here>
```
</details>
validations:
required: false
- type: textarea
id: configuration
attributes:
label: Configuration
description: |
Please provide more information on your SDK configuration:
* What OS and version, and what distro if applicable (Windows 10, Windows 11, MacOS Catalina, Ubuntu 22.04)?
* What is the architecture (x64, x86, ARM, ARM64)?
* Do you know whether it is specific to that configuration?
placeholder: |
- OS:
- architecture:
validations:
required: false
- type: textarea
id: other-info
attributes:
label: Other information
description: |
If you have an idea where the problem might lie, let us know that here. Please include any pointers to code, relevant changes, or related issues you know of.
placeholder: Other information
validations:
required: false
30 changes: 30 additions & 0 deletions .github/ISSUE_TEMPLATE/02-sdk-feature-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: SDK Feature request
description: Request a new feature on the SDK
labels: ["type:feature", "status:waiting-for-triage"]
body:
- type: markdown
attributes:
value: |
**Thank you for taking the time to fill out this feature request form!**
💥Please search to see if an issue already exists for the feature you are requesting.
- type: textarea
attributes:
label: Is your feature request related to a problem? Please describe the problem.
description: A clear and concise description of what the problem is.
placeholder: I am trying to do [...] but [...]
validations:
required: false
- type: textarea
attributes:
label: Describe the solution you'd like.
description: |
A clear and concise description of what you want to happen. Include any alternative solutions you've considered.
validations:
required: true
- type: textarea
attributes:
label: Additional context?
description: |
Add any other context or screenshots about the feature request here.
validations:
required: false
8 changes: 8 additions & 0 deletions .github/ISSUE_TEMPLATE/03-blank-issue.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
name: Blank issue
about: Something that doesn't fit the other categories
title: ''
labels: ["status:waiting-for-triage"]
assignees: ''

---
40 changes: 0 additions & 40 deletions .github/ISSUE_TEMPLATE/bug_report.md

This file was deleted.

11 changes: 11 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
blank_issues_enabled: true
contact_links:
- name: Question on use of Python graph sdk
url: https://github.com/microsoftgraph/msgraph-sdk-python-core/discussions
about: Please add your question in the discussions section of the repo
- name: Question on use of kiota
url: https://github.com/microsoft/kiota/discussions
about: Please add your question in the discussions section of the repo
- name: Question or Feature Request for the MS Graph API?
url: https://aka.ms/msgraphsupport
about: Report an issue or limitation with the MS Graph service APIs
20 changes: 0 additions & 20 deletions .github/ISSUE_TEMPLATE/feature_request.md

This file was deleted.

94 changes: 94 additions & 0 deletions .github/workflows/project-auto-add.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
# This workflow is used to add new issues to GitHub GraphSDKs Project

name: Add Issue or PR to project
on:
issues:
types:
- opened
pull_request:
types:
- opened
branches:
- 'main'

jobs:
track_issue:
if: github.actor != 'dependabot[bot]'
runs-on: ubuntu-latest
steps:
- name: Generate token
id: generate_token
uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a
with:
app_id: ${{ secrets.GRAPHBOT_APP_ID }}
private_key: ${{ secrets.GRAPHBOT_APP_PEM }}

- name: Get project data
env:
GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }}
ORGANIZATION: microsoftgraph
PROJECT_NUMBER: 55
run: |
gh api graphql -f query='
query($org: String!, $number: Int!) {
organization(login: $org){
projectV2(number: $number) {
id
fields(first:20) {
nodes {
... on ProjectV2SingleSelectField {
id
name
options {
id
name
}
}
}
}
}
}
}' -f org=$ORGANIZATION -F number=$PROJECT_NUMBER > project_data.json
echo 'PROJECT_ID='$(jq '.data.organization.projectV2.id' project_data.json) >> $GITHUB_ENV
echo 'LANGUAGE_FIELD_ID='$(jq '.data.organization.projectV2.fields.nodes[] | select(.name== "Language") | .id' project_data.json) >> $GITHUB_ENV
echo 'LANGUAGE_OPTION_ID='$(jq '.data.organization.projectV2.fields.nodes[] | select(.name== "Language") | .options[] | select(.name=="Python") |.id' project_data.json) >> $GITHUB_ENV
- name: Add Issue or PR to project
env:
GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }}
ISSUE_ID: ${{ github.event_name == 'issues' && github.event.issue.node_id || github.event.pull_request.node_id }}
run: |
item_id="$( gh api graphql -f query='
mutation($project:ID!, $issue:ID!) {
addProjectV2ItemById(input: {projectId: $project, contentId: $issue}) {
item {
id
}
}
}' -f project=$PROJECT_ID -f issue=$ISSUE_ID --jq '.data.addProjectV2ItemById.item.id')"
echo 'ITEM_ID='$item_id >> $GITHUB_ENV
- name: Set Language
env:
GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }}
run: |
gh api graphql -f query='
mutation (
$project: ID!
$item: ID!
$language_field: ID!
$language_value: String!
) {
set_status: updateProjectV2ItemFieldValue(input: {
projectId: $project
itemId: $item
fieldId: $language_field
value: {singleSelectOptionId: $language_value}
}) {
projectV2Item {
id
}
}
}' -f project=$PROJECT_ID -f item=$ITEM_ID -f language_field=$LANGUAGE_FIELD_ID -f language_value=${{ env.LANGUAGE_OPTION_ID }} --silent
3 changes: 0 additions & 3 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
-i https://pypi.org/simple

astroid==3.2.0 ; python_full_version >= '3.7.2'

async-generator==1.10 ; python_version >= '3.5'

asyncmock==0.4.2
Expand Down Expand Up @@ -156,4 +154,3 @@ multidict==6.0.5 ; python_version >= '3.7'
uritemplate==4.1.1 ; python_version >= '3.6'

yarl==1.9.4 ; python_version >= '3.7'

0 comments on commit 337c649

Please sign in to comment.