Skip to content

Commit 068d2ff

Browse files
release: handle-stale-discussions v1 (#6)
* chore: build action * chore: build action * chore: build action * chore: build action * chore: build action * chore: build action * fix: package action, refactor, some fixes * fix: package action, refactor, some fixes * fix: package action, refactor, some fixes * fix: package action, refactor, some fixes * fix: package action, refactor, some fixes * refactor client * undo refactor client * refactor client * refactor client * refactor client * refactor client * refactor client * refactor client * refactor client * refactor client * fix: implement logic discussed in meetings, refactor logic * add debug statements * add debug statements * add debug statements * add debug statements * refactor further * remove days-until-close and add dependabot * chore: more refactor, adjust error messages * chore: adjust logging messages * chore: adjust logging messages * chore: adjust logging messages * chore: adjust logging messages * chore: adjust logging messages * fix: foreach bug? * chore: adjust logging messages * fix(temp): only checks most recent 1 comment per discussion * log * log * incorporated sggested changes in workflow * githubClient updated * build branch * updations as suggested * changes implemented for cache object * added code for writing back the objects to cache * wrote back label id to cache object * cache updated with defaultOptions * updated cache object * added typePolicies * removed default options * updated workflow logic * added closed field in discussionData query * added return to closed statement * checking closed flag * print flag * logging * logging * logging * lockDiscussion mutation added * cache issue and logging * logging in cache * cache error * cache error fix * cache error fix * logging for instructions reply * logging * logging commentId * logging for instrcutions reply * logging again * minor edits * minor edits before final testing * minor comment text change * compiled files * error handling, final touches, new props * add new proposed keyword prop and defalt to readme and action.yml * adjust checking instructions reply logic * adjust checking instructions reply logic * adjust instructions reply * update readme and our own workflow file to use stale discussions * fix: boolean inputs always true * chore: remove async when no need to await for response * feat: add prop to decide how to handle stale discussions * feat: support patial day values * chore: adjust logging when stale * chore: run workflow every 30 minutes * chore: log eventName * chore: log payload * feat: add instructions reply immediately if triggered by created discussion comment * chore: reorganize logic for new comment trigger * chore: update readme and workflow file with new event trigger functionality * chore: update contributing guide --------- Co-authored-by: shailja <[email protected]>
1 parent 3fd2115 commit 068d2ff

36 files changed

+92775
-744
lines changed

.github/dependabot.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: npm
4+
directory: "/"
5+
schedule:
6+
interval: weekly
7+
day: tuesday
8+
open-pull-requests-limit: 10
9+
target-branch: 'main'

.github/pull_request_template.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44

55
---
66

7-
* [ ] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws-actions/configure-aws-credentials/blob/main/CONTRIBUTING.md)
7+
* [ ] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws-github-ops/handle-stale-discussions/blob/main/CONTRIBUTING.md)
88

9-
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
9+
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Lines changed: 8 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,17 @@
11
name: HandleStaleDiscussions
22
on:
33
schedule:
4-
- cron: '*/30 * * * *'
5-
push:
6-
branches:
7-
- main
8-
pull_request:
9-
branches:
10-
- main
4+
- cron: '0 */4 * * *'
5+
discussion_comment:
6+
types: [created]
117

128
jobs:
13-
run-action:
14-
name: Run action
9+
handle-stale-discussions:
10+
name: Handle stale discussions
1511
runs-on: ubuntu-latest
16-
1712
steps:
18-
- uses: actions/checkout@v2
19-
20-
- name: Use Node.js 16.x
21-
uses: actions/setup-node@v2
22-
with:
23-
node-version: 16.x
24-
cache: 'npm'
25-
cache-dependency-path: package-lock.json
26-
27-
- name: Install dependencies
28-
run: npm ci
29-
30-
- name: Build
31-
run: npm run build
32-
33-
- name: Handle stale discussions
34-
uses: ./
13+
- name: Stale discussions action
14+
uses: aws-github-ops/handle-stale-discussions@main
3515
env:
3616
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
37-
DEFAULT_BRANCH: master
17+

CONTRIBUTING.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,18 +30,17 @@ Contributions via pull requests are much appreciated. Before sending us a pull r
3030
To send us a pull request, please:
3131

3232
1. Fork the repository.
33-
2. Modify the source; please focus on the specific change you are contributing. If you also reformat all the code, it will be hard for us to focus on your change.
34-
3. Ensure local tests pass.
35-
4. Commit to your fork using clear commit messages.
36-
5. Send us a pull request, answering any default questions in the pull request interface.
37-
6. Pay attention to any automated CI failures reported in the pull request, and stay involved in the conversation.
33+
2. Modify the source; Install packages with `npm i`, and build your code with `npm run package`.
34+
3. Commit to your fork using clear commit messages.
35+
4. Send us a pull request, answering any default questions in the pull request interface.
36+
5. Pay attention to any automated CI failures reported in the pull request, and stay involved in the conversation.
3837

3938
GitHub provides additional document on [forking a repository](https://help.github.com/articles/fork-a-repo/) and
4039
[creating a pull request](https://help.github.com/articles/creating-a-pull-request/).
4140

4241

4342
## Finding contributions to work on
44-
Looking at the existing issues is a great way to find something to contribute on. As our projects, by default, use the default GitHub issue labels (enhancement/bug/duplicate/help wanted/invalid/question/wontfix), looking at any 'help wanted' issues is a great place to start.
43+
Looking at the existing issues is a great way to find something to contribute on.
4544

4645

4746
## Code of Conduct

0 commit comments

Comments
 (0)