forked from opensearch-project/sql
-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (41 loc) · 1.39 KB
/
Copy pathissue-dedupe.yml
File metadata and controls
43 lines (41 loc) · 1.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
---
name: Issue Dedupe Main
on:
issues:
types: [opened]
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
inputs:
job:
description: 'Job to run'
required: true
type: choice
options:
- detect
- auto-close
default: detect
issue_number:
description: 'Issue number to check for duplicates (detect only)'
required: false
type: string
jobs:
detect:
if: (github.event_name == 'issues' && github.event.issue.user.type != 'Bot') || (github.event_name == 'workflow_dispatch' && inputs.job == 'detect')
uses: opensearch-project/opensearch-build/.github/workflows/issue-dedupe-detect.yml@c2498b758c08fb7bc48476509a5fc1b8dd5f7493 # main
permissions:
contents: read
issues: write
id-token: write
secrets:
BEDROCK_ACCESS_ROLE_ISSUE_DEDUPE: ${{ secrets.BEDROCK_ACCESS_ROLE_ISSUE_DEDUPE }}
with:
issue_number: ${{ inputs.issue_number || '' }}
grace_days: ${{ vars.DUPLICATE_GRACE_DAYS || '7' }}
auto-close:
if: github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && inputs.job == 'auto-close')
uses: opensearch-project/opensearch-build/.github/workflows/issue-dedupe-autoclose.yml@c2498b758c08fb7bc48476509a5fc1b8dd5f7493 # main
permissions:
issues: write
with:
grace_days: ${{ vars.DUPLICATE_GRACE_DAYS || '7' }}