Skip to content

Commit c34a6fc

Browse files
authored
github: Add issue templates and GitHub->AzDO issue syncing (ni#21)
- [X] This contribution adheres to [CONTRIBUTING.md](https://github.com/ni/nisync-python/blob/main/CONTRIBUTING.md). ### What does this Pull Request accomplish? With reference to the content of [DAQmx PR](ni/nidaqmx-python#686) - Add GitHub issue template based on https://github.com/ni/ni-apis/tree/main/.github/ISSUE_TEMPLATE - Add a GitHub Actions workflow that syncs GitHub issues to Azure DevOps using [https://github.com/danhellem/github-actions-issue-to-work-item](https://github.com/danhellem/github-actions-issue-to-work-item) The workflow is based on [ https://github.com/ni/measurement-plugin-python/blob/main/.github/workflows/sync_github_issues_to_azdo.yml](https://github.com/ni/measurement-plugin-python/blob/main/.github/workflows/sync_github_issues_to_azdo.yml) - By referring daqmx, I created two new labels(tech debt and user story) before this PR is merged. - What is difference from [DAQmx PR](ni/nidaqmx-python#686) 1. '[ado_area_path](https://github.com/ni/nisync-python/pull/21/files#diff-202df4d842092333fc71217d929c58e696a315f3ae8415b32b5650adf1af9b28:~:text=ado_area_path%3A%20%22DevCentral%5C%5CProduct%20RnD%5C%5CPlatform%20HW%20and%20SW%5C%5CCore%20SW%20and%20Drivers%5C%5CPlatform%20HW%20and%20Drivers%5C%5CDrivers%5C%5CMars%22)' : Area path of reported issue in Azure DevOps 2. package name in[ bug_report.md](https://github.com/ni/nisync-python/pull/21/files#diff-185833cb26d7ac66a4d39042fd576a820c2c2c6d05ad18973bb9c7dce77267c5:~:text=*%20NI%2DSync,nisync%2Dpython%60) ### Why should this Pull Request be merged? Provide more guidance for which information to include in bug reports. Automatically sync bug reports to Azure DevOps so they get more visibility. ### What testing has been done? None Signed-off-by: wchung <[email protected]>
1 parent 89fef5b commit c34a6fc

File tree

5 files changed

+129
-0
lines changed

5 files changed

+129
-0
lines changed
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: 'bug,triage'
6+
---
7+
8+
<!---
9+
Thanks for filing an issue! Before you submit, please read the following:
10+
11+
Search open/closed issues before submitting. Someone may have reported the same issue before.
12+
-->
13+
14+
# Bug Report
15+
16+
<!--- Provide a general summary of the issue here -->
17+
18+
## Repro or Code Sample
19+
20+
<!-- Please provide steps to reproduce the issue and/or a code repository, gist, code snippet or sample files -->
21+
22+
## Expected Behavior
23+
24+
<!--- Tell us what should happen -->
25+
26+
## Current Behavior
27+
28+
<!--- Tell us what happens instead of the expected behavior -->
29+
<!--- If you are seeing an error, please include the full error message and stack trace -->
30+
<!--- If applicable, provide screenshots -->
31+
32+
## Possible Solution
33+
34+
<!--- Not obligatory, but suggest a fix/reason for the bug -->
35+
<!--- Please let us know if you'd be willing to contribute the fix; we'd be happy to work with you -->
36+
37+
## Context
38+
39+
<!--- How has this issue affected you? What are you trying to accomplish? -->
40+
<!--- Providing context helps us come up with a solution that is most useful in the real world -->
41+
42+
## Your Environment
43+
44+
<!--- Include as many relevant details as possible about the environment you experienced the bug in -->
45+
46+
* Operating system and version: [e.g. Windows 11 24H2, Ubuntu Linux 24.04]
47+
* NI-Sync version: [e.g. 2024 Q4]
48+
* `nisync-python` version: [e.g. 1.0.1]
49+
* Python version [e.g. 3.9]
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: 'enhancement,triage'
6+
---
7+
8+
<!---
9+
Thanks for filing an issue! Before you submit, please read the following:
10+
11+
Search open/closed issues before submitting. Someone may have requested the same feature before.
12+
-->
13+
14+
## Problem to Solve
15+
16+
<!--- Provide a clear and concise description of why this feature is wanted or what problem it solves. -->
17+
18+
## Proposed Solution
19+
20+
<!--- Provide a clear and concise description of the feature you're proposing. -->
21+
22+
<!--- The implementing team may build a list of tasks/sub-issues here:
23+
## Tasks
24+
- [ ] This is a subtask of the feature. (It can be converted to an issue.)
25+
-->
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
name: Tech debt
3+
about: (DEV TEAM ONLY) Non-user-visible improvement to code or development process
4+
title: ''
5+
labels: 'tech debt,triage'
6+
---
7+
## Tech Debt
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
name: User story
3+
about: (DEV TEAM ONLY) A small chunk of work to be done
4+
title: '(Fully descriptive title)'
5+
labels: 'user story,triage'
6+
---
7+
8+
<!-- Ensure the title can be understood without the parent item's context, e.g. "nimble-button Angular wrapper" rather than just "Angular wrapper" -->
9+
10+
## User Story
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Sync issue to Azure DevOps work item
2+
3+
on:
4+
issues:
5+
# Omit "labeled" and "unlabeled" to work around https://github.com/danhellem/github-actions-issue-to-work-item/issues/70
6+
types:
7+
[opened, edited, deleted, closed, reopened, assigned]
8+
issue_comment:
9+
types: [created, edited, deleted]
10+
11+
jobs:
12+
alert:
13+
if: ${{ !github.event.issue.pull_request && github.event.issue.title != 'Dependency Dashboard' }}
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Choose work item type
17+
id: choose_work_item_type
18+
run: |
19+
if [ "${{ contains(github.event.issue.labels.*.name, 'enhancement') || contains(github.event.issue.labels.*.name, 'user story') }}" == "true" ]; then
20+
echo "work_item_type=User Story" >> $GITHUB_OUTPUT
21+
elif [ "${{ contains(github.event.issue.labels.*.name, 'tech debt') }}" == "true" ]; then
22+
echo "work_item_type=Technical Debt" >> $GITHUB_OUTPUT
23+
else
24+
echo "work_item_type=Bug" >> $GITHUB_OUTPUT
25+
fi
26+
- uses: danhellem/[email protected]
27+
env:
28+
ado_token: "${{ secrets.AZDO_WORK_ITEM_TOKEN }}"
29+
github_token: "${{ secrets.GH_REPO_TOKEN }}"
30+
ado_organization: "ni"
31+
ado_project: "DevCentral"
32+
ado_area_path: "DevCentral\\Product RnD\\Platform HW and SW\\Core SW and Drivers\\Platform HW and Drivers\\Drivers\\Mars"
33+
ado_wit: "${{ steps.choose_work_item_type.outputs.work_item_type }}"
34+
ado_new_state: "New"
35+
ado_active_state: "Active"
36+
ado_close_state: "Closed"
37+
ado_bypassrules: true
38+
log_level: 100

0 commit comments

Comments
 (0)