chore(ghaction): format
Signed-off-by: David Ko <dko@suse.com> Signed-off-by: davidko <dko@suse.com>
This commit is contained in:
parent
d87927ed85
commit
519d087a88
50
.github/workflows/add-to-projects.yml
vendored
50
.github/workflows/add-to-projects.yml
vendored
@ -1,32 +1,40 @@
|
||||
name: Add-To-Projects
|
||||
on:
|
||||
issues:
|
||||
types: [opened, labeled]
|
||||
types: [ opened, labeled ]
|
||||
jobs:
|
||||
community:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Is Longhorn Member
|
||||
uses: tspascoal/get-user-teams-membership@v1.0.4
|
||||
id: is-longhorn-member
|
||||
with:
|
||||
username: ${{ github.event.issue.user.login }}
|
||||
organization: longhorn
|
||||
GITHUB_TOKEN: ${{ secrets.CUSTOM_GITHUB_TOKEN }}
|
||||
- name: Add To Community Project
|
||||
if: fromJSON(steps.is-longhorn-member.outputs.teams)[0] == null
|
||||
uses: actions/add-to-project@v0.3.0
|
||||
with:
|
||||
project-url: https://github.com/orgs/longhorn/projects/5
|
||||
github-token: ${{ secrets.CUSTOM_GITHUB_TOKEN }}
|
||||
- name: Is Longhorn Member
|
||||
uses: tspascoal/get-user-teams-membership@v1.0.4
|
||||
id: is-longhorn-member
|
||||
with:
|
||||
username: ${{ github.event.issue.user.login }}
|
||||
organization: longhorn
|
||||
GITHUB_TOKEN: ${{ secrets.CUSTOM_GITHUB_TOKEN }}
|
||||
- name: Add To Community Project
|
||||
if: steps.is-longhorn-member.outputs.isTeamMember == 'false'
|
||||
uses: actions/add-to-project@v0.3.0
|
||||
with:
|
||||
project-url: https://github.com/orgs/longhorn/projects/5
|
||||
github-token: ${{ secrets.CUSTOM_GITHUB_TOKEN }}
|
||||
|
||||
qa:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Add To QA & Devops Project
|
||||
uses: actions/add-to-project@v0.3.0
|
||||
with:
|
||||
project-url: https://github.com/orgs/longhorn/projects/4
|
||||
github-token: ${{ secrets.CUSTOM_GITHUB_TOKEN }}
|
||||
labeled: kind/test, area/test-infra
|
||||
label-operator: OR
|
||||
- name: Is Longhorn Member
|
||||
uses: tspascoal/get-user-teams-membership@v1.0.4
|
||||
id: is-longhorn-member
|
||||
with:
|
||||
username: ${{ github.event.issue.user.login }}
|
||||
organization: longhorn
|
||||
GITHUB_TOKEN: ${{ secrets.CUSTOM_GITHUB_TOKEN }}
|
||||
- name: Add To QA & DevOps Project
|
||||
if: steps.is-longhorn-member.outputs.isTeamMember == 'true'
|
||||
uses: actions/add-to-project@v0.3.0
|
||||
with:
|
||||
project-url: https://github.com/orgs/longhorn/projects/4
|
||||
github-token: ${{ secrets.CUSTOM_GITHUB_TOKEN }}
|
||||
labeled: kind/test, area/test-infra
|
||||
label-operator: OR
|
||||
|
74
.github/workflows/close-issue.yml
vendored
74
.github/workflows/close-issue.yml
vendored
@ -1,50 +1,50 @@
|
||||
name: Close-Issue
|
||||
on:
|
||||
issues:
|
||||
types: [unlabeled]
|
||||
types: [ unlabeled ]
|
||||
jobs:
|
||||
backport:
|
||||
runs-on: ubuntu-latest
|
||||
if: contains(github.event.label.name, 'backport/')
|
||||
steps:
|
||||
- name: Get Backport Version
|
||||
uses: xom9ikk/split@v1
|
||||
id: split
|
||||
with:
|
||||
string: ${{ github.event.label.name }}
|
||||
separator: /
|
||||
- name: Check if Backport Issue Exists
|
||||
uses: actions-cool/issues-helper@v3
|
||||
id: if-backport-issue-exists
|
||||
with:
|
||||
actions: 'find-issues'
|
||||
token: ${{ github.token }}
|
||||
title-includes: |
|
||||
[BACKPORT][v${{ steps.split.outputs._1 }}]${{ github.event.issue.title }}
|
||||
- name: Close Backport Issue
|
||||
if: fromJSON(steps.if-backport-issue-exists.outputs.issues)[0] != null
|
||||
uses: actions-cool/issues-helper@v3
|
||||
with:
|
||||
actions: 'close-issue'
|
||||
token: ${{ github.token }}
|
||||
issue-number: ${{ fromJSON(steps.if-backport-issue-exists.outputs.issues)[0].number }}
|
||||
- name: Get Backport Version
|
||||
uses: xom9ikk/split@v1
|
||||
id: split
|
||||
with:
|
||||
string: ${{ github.event.label.name }}
|
||||
separator: /
|
||||
- name: Check if Backport Issue Exists
|
||||
uses: actions-cool/issues-helper@v3
|
||||
id: if-backport-issue-exists
|
||||
with:
|
||||
actions: 'find-issues'
|
||||
token: ${{ github.token }}
|
||||
title-includes: |
|
||||
[BACKPORT][v${{ steps.split.outputs._1 }}]${{ github.event.issue.title }}
|
||||
- name: Close Backport Issue
|
||||
if: fromJSON(steps.if-backport-issue-exists.outputs.issues)[0] != null
|
||||
uses: actions-cool/issues-helper@v3
|
||||
with:
|
||||
actions: 'close-issue'
|
||||
token: ${{ github.token }}
|
||||
issue-number: ${{ fromJSON(steps.if-backport-issue-exists.outputs.issues)[0].number }}
|
||||
|
||||
automation:
|
||||
runs-on: ubuntu-latest
|
||||
if: contains(github.event.label.name, 'require/automation-e2e')
|
||||
steps:
|
||||
- name: Check if Automation Issue Exists
|
||||
uses: actions-cool/issues-helper@v3
|
||||
id: if-automation-issue-exists
|
||||
with:
|
||||
actions: 'find-issues'
|
||||
token: ${{ github.token }}
|
||||
title-includes: |
|
||||
[TEST]${{ github.event.issue.title }}
|
||||
- name: Close Automation Test Issue
|
||||
if: fromJSON(steps.if-automation-issue-exists.outputs.issues)[0] != null
|
||||
uses: actions-cool/issues-helper@v3
|
||||
with:
|
||||
actions: 'close-issue'
|
||||
token: ${{ github.token }}
|
||||
issue-number: ${{ fromJSON(steps.if-automation-issue-exists.outputs.issues)[0].number }}
|
||||
- name: Check if Automation Issue Exists
|
||||
uses: actions-cool/issues-helper@v3
|
||||
id: if-automation-issue-exists
|
||||
with:
|
||||
actions: 'find-issues'
|
||||
token: ${{ github.token }}
|
||||
title-includes: |
|
||||
[TEST]${{ github.event.issue.title }}
|
||||
- name: Close Automation Test Issue
|
||||
if: fromJSON(steps.if-automation-issue-exists.outputs.issues)[0] != null
|
||||
uses: actions-cool/issues-helper@v3
|
||||
with:
|
||||
actions: 'close-issue'
|
||||
token: ${{ github.token }}
|
||||
issue-number: ${{ fromJSON(steps.if-automation-issue-exists.outputs.issues)[0].number }}
|
||||
|
34
.github/workflows/stale.yaml
vendored
34
.github/workflows/stale.yaml
vendored
@ -4,25 +4,25 @@ on:
|
||||
workflow_call:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: '30 1 * * *'
|
||||
- cron: '30 1 * * *'
|
||||
|
||||
jobs:
|
||||
stale:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/stale@v4
|
||||
with:
|
||||
stale-issue-message: 'This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.'
|
||||
stale-pr-message: 'This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days.'
|
||||
close-issue-message: 'This issue was closed because it has been stalled for 5 days with no activity.'
|
||||
close-pr-message: 'This PR was closed because it has been stalled for 10 days with no activity.'
|
||||
days-before-stale: 30
|
||||
days-before-pr-stale: 45
|
||||
days-before-close: 5
|
||||
days-before-pr-close: 10
|
||||
stale-issue-label: 'stale'
|
||||
stale-pr-label: 'stale'
|
||||
exempt-all-assignees: true
|
||||
exempt-issue-labels: 'kind/bug,kind/doc,kind/enhancement,kind/poc,kind/refactoring,kind/test,kind/task,kind/backport,kind/regression,kind/evaluation'
|
||||
exempt-draft-pr: true
|
||||
exempt-all-milestones: true
|
||||
- uses: actions/stale@v4
|
||||
with:
|
||||
stale-issue-message: 'This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.'
|
||||
stale-pr-message: 'This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days.'
|
||||
close-issue-message: 'This issue was closed because it has been stalled for 5 days with no activity.'
|
||||
close-pr-message: 'This PR was closed because it has been stalled for 10 days with no activity.'
|
||||
days-before-stale: 30
|
||||
days-before-pr-stale: 45
|
||||
days-before-close: 5
|
||||
days-before-pr-close: 10
|
||||
stale-issue-label: 'stale'
|
||||
stale-pr-label: 'stale'
|
||||
exempt-all-assignees: true
|
||||
exempt-issue-labels: 'kind/bug,kind/doc,kind/enhancement,kind/poc,kind/refactoring,kind/test,kind/task,kind/backport,kind/regression,kind/evaluation'
|
||||
exempt-draft-pr: true
|
||||
exempt-all-milestones: true
|
||||
|
Loading…
Reference in New Issue
Block a user