Skip to content

Commit 694dd6b

Browse files
authored
Merge pull request #1 from arsulegai/runner
Add runner that uses PAT to generate issues to the repositories
2 parents b534305 + 6bac1be commit 694dd6b

3 files changed

Lines changed: 30 additions & 3 deletions

File tree

.github/workflows/runner.yaml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Run and trigger the workflow
2+
3+
on:
4+
schedule:
5+
- cron: 0 1 * * *
6+
workflow_dispatch:
7+
8+
jobs:
9+
build:
10+
permissions:
11+
issues: write
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v2
15+
16+
- name: Generate latest release information
17+
run: |
18+
# Run the docker-compose command
19+
docker-compose -f deployments/docker-compose.yaml up
20+
exit ${?}
21+
shell: bash
22+
env:
23+
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"

assets/config.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
buffer_window_days: 7
22
projects:
33
- name: Hyperledger Bevel
4-
github_org: hyperledger
5-
github_repo: bevel
4+
github_org: arsulegai
5+
github_repo: github-issue-schedule
66
maintainers:
77
- arsulegai
88
schedules:
9-
- date: 2023-05-12
9+
- date: 2023-05-13
1010
title: Submit the 2023 Q3 quarterly report
1111
description: Dear Bevel maintainers, please submit the 2023 Q3 report.

cmd/main.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ func main() {
5656
// number of days from today to the actual schedule
5757
numberOfDays := int(differenceTime.Hours() / 24)
5858

59+
log.Printf("current: %v requested: %v", currentTime, requestedTime)
60+
5961
// do not proceed if the current time is way past the schedule
6062
// reminder
6163
if currentTime.After(requestedTime) {
@@ -64,6 +66,8 @@ func main() {
6466
continue
6567
}
6668

69+
log.Printf("difference: %v configured: %v", numberOfDays, config.BufferWindowDays)
70+
6771
// found a case where action is needed
6872
if uint8(numberOfDays) == config.BufferWindowDays {
6973
// do as scheduled on this date

0 commit comments

Comments
 (0)