move workflow files to .github/workflows/

This commit is contained in:
slavaleleka
2021-03-23 11:41:37 +03:00
parent b131959780
commit 642c7ccf20
2 changed files with 0 additions and 0 deletions

View File

@@ -0,0 +1,47 @@
name: Remove 'Resolved' and 'Cannot reproduce' labels on issue reopen
on:
issues:
types: [reopened]
jobs:
remove_label:
runs-on: ubuntu-latest
steps:
- uses: actions/github-script@v3
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
var owner = context.repo.owner;
var repo = context.repo.repo;
var issue_number = context.issue.number;
var resolvedLabel = 'A: Resolved';
var cannotReproduceLabel = 'A: Cannot reproduce';
var issueLabelsRaw = await github.issues.listLabelsOnIssue({
owner,
repo,
issue_number,
});
var issueLabels = issueLabelsRaw.data
.map((el) => el.name);
if (issueLabels.indexOf(resolvedLabel) > -1) {
github.issues.removeLabel({
owner,
repo,
issue_number,
name: resolvedLabel,
});
}
if (issueLabels.indexOf(cannotReproduceLabel) > -1) {
github.issues.removeLabel({
owner,
repo,
issue_number,
name: cannotReproduceLabel,
});
}

18
.github/workflows/stale.yml vendored Normal file
View File

@@ -0,0 +1,18 @@
# Number of days of inactivity before an issue becomes stale
daysUntilStale: 14
# Number of days of inactivity before a stale issue is closed
daysUntilClose: 3
# Issues with these labels will never be considered stale
exemptLabels:
- 'A: By design'
- 'A: In progress'
- 'A: Problematic'
# Label to use when marking an issue as stale
staleLabel: "A: Won't fix"
# Comment to post when marking an issue as stale. Set to `false` to disable
markComment: >
This issue has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs. Thank you
for your contributions.
# Comment to post when closing a stale issue. Set to `false` to disable
closeComment: false