Skip to content

Commit acd7c70

Browse files
Merge branch 'main' into dependabot/pip/jsonpointer-approx-eq-3.0
2 parents 140d34c + b24fb51 commit acd7c70

80 files changed

Lines changed: 5718 additions & 191 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
name: 🐞 Bug
2+
description: Report a bug or an issue you've found
3+
title: "[Bug] <title>"
4+
labels: ["bug"]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
Thanks for taking the time to fill out this bug report!
10+
- type: checkboxes
11+
attributes:
12+
label: Is this a new bug?
13+
description: >
14+
In other words: Is this an error, flaw, failure or fault? Please search issues to see if someone has already reported the bug you encountered.
15+
options:
16+
- label: I believe this is a new bug
17+
required: true
18+
- label: I have searched the existing issues, and I could not find an existing issue for this bug
19+
required: true
20+
21+
- type: textarea
22+
attributes:
23+
label: Current Behavior
24+
description: A concise description of what you're experiencing.
25+
validations:
26+
required: true
27+
28+
- type: textarea
29+
attributes:
30+
label: Expected Behavior
31+
description: A concise description of what you expected to happen.
32+
validations:
33+
required: true
34+
35+
- type: textarea
36+
attributes:
37+
label: Steps To Reproduce
38+
description: Steps to reproduce the behavior.
39+
placeholder: |
40+
1. In this environment...
41+
2. With this config...
42+
3. Run '...'
43+
4. See error...
44+
validations:
45+
required: true
46+
47+
- type: textarea
48+
attributes:
49+
label: Environment
50+
description: |
51+
examples:
52+
- **OS**: Ubuntu 20.04
53+
- **Language version**: Python 3.10.11 (`python --version`)
54+
- **SDK Name**: PayPal (If you are using this library as a dependency, please name the parent SDK)
55+
value: |
56+
- **OS**:
57+
- **Language version**:
58+
- **SDK Name**:
59+
render: markdown
60+
validations:
61+
required: true
62+
63+
- type: textarea
64+
id: logs
65+
attributes:
66+
label: Relevant log output
67+
description: |
68+
If applicable, log output to help explain your problem.
69+
render: shell
70+
validations:
71+
required: false
72+
73+
- type: textarea
74+
attributes:
75+
label: Additional Context
76+
description: |
77+
Links? References? Anything that will give us more context about the issue you are encountering!
78+
validations:
79+
required: false

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 0 additions & 32 deletions
This file was deleted.
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: ✨ Feature
2+
description: Propose an extension
3+
title: "[Feature] <title>"
4+
labels: ["enhancement"]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
Thanks for taking the time to fill out this feature request!
10+
- type: checkboxes
11+
attributes:
12+
label: Is this your first time submitting a feature request?
13+
description: >
14+
We want to make sure that features are distinct and discoverable,
15+
so that other members of the community can find them and offer their thoughts.
16+
17+
Issues are the right place to request extensions of existing functionality.
18+
options:
19+
- label: I have searched the existing issues, and I could not find an existing issue for this feature
20+
required: true
21+
- label: I am requesting an extension of the existing functionality
22+
- type: textarea
23+
attributes:
24+
label: Describe the feature
25+
description: A clear and concise description of what you want to happen.
26+
validations:
27+
required: true
28+
- type: textarea
29+
attributes:
30+
label: Describe alternatives you've considered
31+
description: |
32+
A clear and concise description of any alternative solutions or features you've considered.
33+
validations:
34+
required: false
35+
- type: textarea
36+
attributes:
37+
label: Who will this benefit?
38+
description: |
39+
What kind of use case will this feature be useful for? Please be specific and provide examples, this will help us prioritize properly.
40+
validations:
41+
required: false
42+
- type: input
43+
attributes:
44+
label: Are you interested in contributing this feature?
45+
description: Let us know if you want to write some code, and how we can help.
46+
validations:
47+
required: false
48+
- type: textarea
49+
attributes:
50+
label: Anything else?
51+
description: |
52+
Links? References? Anything that will give us more context about the feature you are suggesting!
53+
validations:
54+
required: false
Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
name: Dependabot Notifications
2+
3+
on:
4+
workflow_run:
5+
workflows: ["*"]
6+
types:
7+
- completed
8+
9+
jobs:
10+
notify-checks:
11+
runs-on: ubuntu-latest
12+
if: github.actor == 'dependabot[bot]'
13+
steps:
14+
- name: Get PR Information
15+
if: github.actor == 'dependabot[bot]'
16+
id: get-pr-info
17+
uses: actions/github-script@v6
18+
with:
19+
script: |
20+
const { owner, repo } = context.repo;
21+
const run = context.payload.workflow_run;
22+
23+
// Get PR directly from the workflow run's head SHA
24+
const response = await github.rest.repos.listPullRequestsAssociatedWithCommit({
25+
owner,
26+
repo,
27+
commit_sha: run.head_sha
28+
});
29+
30+
const pr = response.data[0]; // Get the first associated PR
31+
32+
if (pr) {
33+
core.exportVariable('PR_TITLE', pr.title);
34+
core.exportVariable('PR_AUTHOR', pr.user.login);
35+
core.exportVariable('PR_LINK', pr.html_url);
36+
core.exportVariable('PR_NUMBER', pr.number.toString());
37+
} else {
38+
core.exportVariable('PR_TITLE', 'Unknown');
39+
core.exportVariable('PR_AUTHOR', context.actor);
40+
core.exportVariable('PR_LINK', `https://github.com/${owner}/${repo}/pulls`);
41+
core.exportVariable('PR_NUMBER', '');
42+
}
43+
44+
// Get check runs for this commit
45+
const checkRuns = await github.rest.checks.listForRef({
46+
owner,
47+
repo,
48+
ref: run.head_sha
49+
});
50+
51+
// Count different check conclusions
52+
const stats = checkRuns.data.check_runs.reduce((acc, check) => {
53+
acc[check.conclusion] = (acc[check.conclusion] || 0) + 1;
54+
return acc;
55+
}, {});
56+
57+
// Create status summary
58+
const summary = Object.entries(stats)
59+
.map(([status, count]) => `${count} ${status}`)
60+
.join(', ');
61+
62+
core.exportVariable('CHECKS_SUMMARY', summary);
63+
64+
// Determine overall status
65+
const hasFailures = stats.failure > 0;
66+
const hasSuccess = stats.success > 0;
67+
const hasCancelled = stats.cancelled > 0;
68+
69+
let overallStatus;
70+
if (hasFailures) {
71+
overallStatus = 'failure';
72+
} else if (hasCancelled && !hasSuccess) {
73+
overallStatus = 'cancelled';
74+
} else if (hasSuccess) {
75+
overallStatus = 'success';
76+
} else {
77+
overallStatus = 'unknown';
78+
}
79+
80+
// Only set status if this is the last workflow to complete
81+
const incompleteRuns = await github.rest.actions.listWorkflowRunsForRepo({
82+
owner,
83+
repo,
84+
head_sha: run.head_sha,
85+
status: 'in_progress'
86+
});
87+
88+
if (incompleteRuns.data.total_count === 0) {
89+
core.exportVariable('ALL_CHECKS_STATUS', overallStatus);
90+
core.exportVariable('SHOULD_NOTIFY', 'true');
91+
92+
// If checks failed and PR exists, close it
93+
if ((overallStatus === 'failure' || overallStatus === 'cancelled') && pr) {
94+
await github.rest.pulls.update({
95+
owner,
96+
repo,
97+
pull_number: pr.number,
98+
state: 'closed'
99+
});
100+
101+
// Add comment explaining why PR was closed
102+
await github.rest.issues.createComment({
103+
owner,
104+
repo,
105+
issue_number: pr.number,
106+
body: `This PR was automatically closed because some checks failed.\nStatus Summary: ${summary}`
107+
});
108+
}
109+
} else {
110+
core.exportVariable('SHOULD_NOTIFY', 'false');
111+
}
112+
113+
- name: Send Slack Notification for Success
114+
if: env.SHOULD_NOTIFY == 'true' && env.ALL_CHECKS_STATUS == 'success' && github.actor == 'dependabot[bot]'
115+
id: slack
116+
uses: slackapi/slack-github-action@v1.25.0
117+
with:
118+
channel-id: 'C08TLGVQ6V8'
119+
slack-message: |
120+
Repository: ${{ github.repository }}
121+
Title: ${{ env.PR_TITLE }}
122+
Author: ${{ env.PR_AUTHOR }}
123+
Link: ${{ env.PR_LINK }}
124+
Status Summary: ${{ env.CHECKS_SUMMARY }}
125+
env:
126+
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}

.github/workflows/pylint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
strategy:
1010
fail-fast: false
1111
matrix:
12-
os: [ubuntu-latest]
12+
os: [ubuntu-22.04]
1313
python: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
1414
steps:
1515
- uses: actions/checkout@v3

.github/workflows/test-runner.yml

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ jobs:
1515
runs-on: ${{ matrix.os }}
1616
strategy:
1717
matrix:
18-
os: [ubuntu-latest]
19-
python: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
18+
os: [ubuntu-22.04]
19+
python: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
2020
steps:
2121
- uses: actions/checkout@v3
2222
- name: Setup Python
@@ -32,11 +32,10 @@ jobs:
3232
run: coverage run -m pytest
3333
- name: Generate coverage report
3434
run: coverage xml
35-
- name: Upload coverage report
36-
if: ${{ matrix.os == 'ubuntu-latest' && matrix.python == '3.13' && github.actor != 'dependabot[bot]' }}
37-
uses: paambaati/codeclimate-action@v3.0.0
35+
36+
- name: SonarQube Scan
37+
if: ${{ matrix.python == '3.13' && github.actor != 'dependabot[bot]' }}
38+
uses: SonarSource/sonarqube-scan-action@v5.2.0
3839
env:
39-
CC_TEST_REPORTER_ID: ${{ secrets.CODE_CLIMATE_TEST_REPORTER_ID }}
40-
with:
41-
coverageLocations: |
42-
${{github.workspace}}/coverage.xml:coverage.py
40+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
41+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,4 +160,6 @@ cython_debug/
160160
.idea/
161161

162162
# Visual Studio Code
163-
.vscode/
163+
.vscode/
164+
.qodo
165+
*~

0 commit comments

Comments
 (0)