Skip to content

Commit 5f7b16f

Browse files
committed
👷 Add GitHub Actions for issue-manager and latest-changes
1 parent b8524ca commit 5f7b16f

File tree

2 files changed

+84
-0
lines changed

2 files changed

+84
-0
lines changed

.github/workflows/issue-manager.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Issue Manager
2+
3+
on:
4+
schedule:
5+
- cron: "0 5 * * *"
6+
issue_comment:
7+
types:
8+
- created
9+
issues:
10+
types:
11+
- labeled
12+
pull_request_target:
13+
types:
14+
- labeled
15+
workflow_dispatch:
16+
17+
jobs:
18+
issue-manager:
19+
if: github.repository_owner == 'tiangolo'
20+
runs-on: ubuntu-latest
21+
steps:
22+
- name: Dump GitHub context
23+
env:
24+
GITHUB_CONTEXT: ${{ toJson(github) }}
25+
run: echo "$GITHUB_CONTEXT"
26+
- uses: tiangolo/[email protected]
27+
with:
28+
token: ${{ secrets.GITHUB_TOKEN }}
29+
config: >
30+
{
31+
"answered": {
32+
"delay": 864000,
33+
"message": "Assuming the original need was handled, this will be automatically closed now. But feel free to add more comments or create new issues or PRs."
34+
},
35+
"changes-requested": {
36+
"delay": 2628000,
37+
"message": "As this PR had requested changes to be applied but has been inactive for a while, it's now going to be closed. But if there's anyone interested, feel free to create a new PR."
38+
}
39+
}

.github/workflows/latest-changes.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Latest Changes
2+
3+
on:
4+
pull_request_target:
5+
branches:
6+
- master
7+
types:
8+
- closed
9+
workflow_dispatch:
10+
inputs:
11+
number:
12+
description: PR number
13+
required: true
14+
debug_enabled:
15+
description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)'
16+
required: false
17+
default: 'false'
18+
19+
jobs:
20+
latest-changes:
21+
runs-on: ubuntu-latest
22+
steps:
23+
- name: Dump GitHub context
24+
env:
25+
GITHUB_CONTEXT: ${{ toJson(github) }}
26+
run: echo "$GITHUB_CONTEXT"
27+
- uses: actions/checkout@v4
28+
with:
29+
# To allow latest-changes to commit to the main branch
30+
token: ${{ secrets.LATEST_CHANGES }}
31+
# Allow debugging with tmate
32+
- name: Setup tmate session
33+
uses: mxschmitt/action-tmate@v3
34+
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.debug_enabled == 'true' }}
35+
with:
36+
limit-access-to-actor: true
37+
- uses: docker://tiangolo/latest-changes:0.3.0
38+
# - uses: tiangolo/latest-changes@main
39+
with:
40+
token: ${{ secrets.GITHUB_TOKEN }}
41+
latest_changes_file: release-notes.md
42+
latest_changes_header: '## Latest Changes'
43+
end_regex: '^## '
44+
debug_logs: true
45+
label_header_prefix: '### '

0 commit comments

Comments
 (0)