Skip to content

Commit 04b69e3

Browse files
committed
Merge branch 'gh-workflows'
PR #44. * gh-workflows: Add additional maintenance github workflows
2 parents bc91431 + 7773ce1 commit 04b69e3

File tree

3 files changed

+102
-0
lines changed

3 files changed

+102
-0
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Labels workflow
2+
3+
on:
4+
pull_request:
5+
types: [labeled]
6+
7+
jobs:
8+
comments-for-labels:
9+
runs-on: ubuntu-latest
10+
permissions:
11+
pull-requests: 'write'
12+
steps:
13+
- name: Comment on labeled pull request
14+
if: ${{ github.event.label.name == 'needs-tests' }}
15+
uses: actions/github-script@v6
16+
with:
17+
github-token: ${{ secrets.GITHUB_TOKEN }}
18+
script: |
19+
const { owner, repo } = context.repo;
20+
const { number, labels } = context.payload.pull_request;
21+
const message = 'Thanks for the pull request! ' +
22+
'Before we can merge this, we require tests to be added. ' +
23+
'This helps us maintain the quality of the codebase and ' +
24+
'ensures we don\'t regress on this change in the future. ' +
25+
'See our contributing guidelines for ' +
26+
'more details. Let us know if you have any questions, and ' +
27+
'thanks again for the pull request!';
28+
await github.rest.issues.createComment({
29+
owner, repo, issue_number: number, body: message});

.github/workflows/stale.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# This workflow warns and then closes issues and PRs that have had no activity for a specified amount of time.
2+
#
3+
# You can adjust the behavior by modifying this file.
4+
# For more information, see:
5+
# https://github.com/actions/stale
6+
name: Mark stale issues and pull requests
7+
8+
on:
9+
schedule:
10+
- cron: '32 9 * * *'
11+
12+
jobs:
13+
stale:
14+
15+
runs-on: ubuntu-latest
16+
permissions:
17+
issues: write
18+
pull-requests: write
19+
20+
steps:
21+
- uses: actions/stale@v5
22+
with:
23+
repo-token: ${{ secrets.GITHUB_TOKEN }}
24+
stale-issue-message: 'This issue is still waiting on a response, and will be closed soon if there is no response.'
25+
stale-pr-message: 'This PR is still waiting on updates and will be closed soon if there is no update.'
26+
stale-issue-label: 'closing-soon-if-no-response'
27+
stale-pr-label: 'closing-soon-if-no-response'
28+
days-before-stale: 7
29+
days-before-close: 2
30+
days-before-pr-stale: 30
31+
days-before-pr-close: 7
32+
any-of-labels: response-needed,changes-requested

CONTRIBUTING.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Contributing
2+
3+
We work hard to provide a high-quality and useful CLI, and we greatly value
4+
feedback and contributions from our community. Whether it's a new feature,
5+
correction, or additional documentation, we welcome your pull requests. Please
6+
submit any [issues](https://github.com/jmespath/jp/issues)
7+
or [pull requests](https://github.com/jmespath/jp/pulls)
8+
through GitHub.
9+
10+
This document contains guidelines for contributing code and filing issues.
11+
12+
## Contributing Code
13+
14+
This list below are guidelines to use when submitting pull requests.
15+
These are the same set of guidelines that the core contributors use
16+
when submitting changes, and we ask the same of all community
17+
contributions as well:
18+
19+
* We maintain a high percentage of code coverage in our tests. As a general
20+
rule of thumb, code changes should not lower the overall code coverage
21+
percentage for the project. In practice, this means that every bug fix and
22+
feature addition should include tests.
23+
* All PRs must run cleanly through `make test`.
24+
in more detail in the sections below.
25+
26+
27+
## Feature Development
28+
29+
This CLI is designed to be a reference CLI implementation of JMESPath,
30+
and implements the official JMESPath specification. As such, we do not
31+
accept feature requests that are not part of the official JMESPath
32+
specification. If you would like to propose changes to the JMESPath
33+
language itself, which includes new syntax, functions, operators, etc.,
34+
you can create a JMESPath enhancement proposal in the
35+
[jmespath.jep repository](https://github.com/jmespath/jmespath.jep).
36+
Once the proposal is accepted, we can then implement the changes in this
37+
CLI.
38+
39+
## Running Tests
40+
41+
To run the tests, you can run `make test`.

0 commit comments

Comments
 (0)