Commit f278d60
FIX: Contribution process for internal/external contributors & documentation (#149)
### Work Item / Issue Reference
<!--
For mssql-python maintainers: Insert your ADO Work Item ID below (e.g.
AB#37452)
For external contributors: Insert GitHub issue link below (e.g.
#123)
-->
<!-- mssql-python maintainers: ADO Work Item -->
<!-- External contributors: GitHub Issue -->
> GitHub Issue: #148
-------------------------------------------------------------------
### Summary
<!-- Insert your summary of changes below. Minimum 10 characters
required. -->
This PR updates the PR validation workflow, documentation, and PR
template to support a more inclusive contribution process that
accommodates both Microsoft organization members and external
contributors with appropriate validation requirements.
### 🔧 Workflow Updates (`.github/workflows/pr-format-check.yml`)
- **Added organization membership detection**: Uses GitHub API to check
if PR author is a Microsoft org member
- **Dual validation logic**:
- **Microsoft org members**: Continue to require ADO Work Item links
(maintains existing behavior)
- **External contributors**: Require GitHub issue links in format
`https://github.com/microsoft/mssql-python/issues/XXX`
- **Preserved existing validations**: Title prefix and summary
requirements remain enforced for all contributors
- **Enhanced error messages**: Provide clear, actionable guidance with
references to CONTRIBUTING.md
### 📚 Documentation Updates (`CONTRIBUTING.md`)
- **Clear contributor guidance**: Step-by-step instructions for both
internal and external contributors
- **External contributor workflow**:
1. Create GitHub issue first
2. Link issue in PR description
3. Follow PR title and summary requirements
- **Internal contributor workflow**: Clarified ADO Work Item
requirements
- **Comprehensive PR requirements**: Documented all validation rules in
one place
### 📝 PR Template Updates (`.github/PULL_REQUEST_TEMPLATE.MD`)
- **Dual-purpose template**: Sections for both ADO links and GitHub
issue links
- **Clear guidance**: Comments explaining which section to use based on
contributor type
- **Examples provided**: Specific format examples for both link types
- **Embedded guidelines**: Quick reference for contribution requirements
## Technical Implementation
### Validation Logic
- **Microsoft members**: Validates ADO links with pattern
`/https:\/\/sqlclientdrivers\.visualstudio\.com\/[^\/]+\/_workitems\/edit\/\d+/i`
- **External contributors**: Validates GitHub issue links with pattern
`/https:\/\/github\.com\/microsoft\/mssql-python\/issues\/\d+/i`
### Benefits
✅ **Seamless external contribution**: Clear path for community
contributors
✅ **Maintained internal traceability**: ADO Work Item requirements
preserved
✅ **Backward compatibility**: No changes for existing internal workflows
✅ **Clear documentation**: Comprehensive guidance for all contributor
types
✅ **Actionable error messages**: Helpful validation failures with next
steps
### Validation
- ✅ YAML syntax validated and confirmed working
- ✅ Workflow logic reviewed for edge cases and error handling
- ✅ Regex patterns tested for both ADO and GitHub issue links
- ✅ Error messages verified for clarity and actionability
- ✅ Documentation reviewed for completeness and accuracy
This implementation ensures that external contributors can easily
participate in the project while maintaining the required traceability
and validation standards for internal Microsoft contributors.
*This pull request was created as a result of the following prompt from
Copilot chat.*
> Update the PR validation workflow, documentation, and PR template to
support a more inclusive contribution process:
>
> 1. In .github/workflows/pr-format-check.yml:
> - For PRs from microsoft org members, continue to require an ADO Work
Item link in the PR description.
> - For PRs from external contributors, require a GitHub issue link
(format: https://github.com/microsoft/mssql-python/issues/XXX) in the PR
description instead of an ADO Work Item link.
> - Ensure that the title prefix and summary requirements remain
enforced for all contributors.
>
> 2. In CONTRIBUTING.md:
> - Add clear instructions for external contributors: they must first
raise a GitHub issue and then link it in their PR description.
> - Clarify that internal contributors (microsoft org) must link an ADO
Work Item.
>
> 3. In .github/PULL_REQUEST_TEMPLATE.MD:
> - Provide guidance for both contributor types (internal: ADO link;
external: GitHub issue link).
> - Make the requirements and examples explicit.
>
> All changes should make the process as seamless as possible for
external contributors while maintaining the required traceability for
internal contributors.
<!-- START COPILOT CODING AGENT TIPS -->
---
💡 You can make Copilot smarter by setting up custom instructions,
customizing its development environment and configuring Model Context
Protocol (MCP) servers. Learn more [Copilot coding agent
tips](https://gh.io/copilot-coding-agent-tips) in the docs.
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: bewithgaurav <8655500+bewithgaurav@users.noreply.github.com>
Co-authored-by: Gaurav Sharma <sharmag@microsoft.com>1 parent de72919 commit f278d60
File tree
3 files changed
+84
-21
lines changed- .github
- workflows
3 files changed
+84
-21
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
3 | 10 | | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
4 | 15 | | |
5 | 16 | | |
6 | | - | |
| 17 | + | |
7 | 18 | | |
8 | 19 | | |
9 | 20 | | |
| |||
29 | 40 | | |
30 | 41 | | |
31 | 42 | | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
32 | 55 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
20 | 21 | | |
| 22 | + | |
21 | 23 | | |
22 | | - | |
| 24 | + | |
| 25 | + | |
23 | 26 | | |
24 | 27 | | |
25 | | - | |
| 28 | + | |
| 29 | + | |
26 | 30 | | |
27 | 31 | | |
28 | 32 | | |
29 | 33 | | |
30 | 34 | | |
31 | | - | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
32 | 41 | | |
| 42 | + | |
33 | 43 | | |
34 | | - | |
35 | | - | |
| 44 | + | |
| 45 | + | |
36 | 46 | | |
37 | | - | |
38 | | - | |
39 | | - | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
40 | 52 | | |
41 | | - | |
| 53 | + | |
42 | 54 | | |
43 | | - | |
| 55 | + | |
44 | 56 | | |
45 | 57 | | |
46 | 58 | | |
47 | | - | |
| 59 | + | |
48 | 60 | | |
49 | | - | |
50 | | - | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
51 | 64 | | |
52 | 65 | | |
53 | | - | |
| 66 | + | |
54 | 67 | | |
55 | 68 | | |
56 | 69 | | |
57 | | - | |
| 70 | + | |
58 | 71 | | |
59 | | - | |
60 | | - | |
| 72 | + | |
61 | 73 | | |
62 | 74 | | |
63 | 75 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
0 commit comments