-
Notifications
You must be signed in to change notification settings - Fork 87
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'pre-linting' into feature/insert-manager
- Loading branch information
Showing
4 changed files
with
241 additions
and
133 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: close-issues | ||
|
||
# (c) 2020 by Linus Gasser for C4DT.org | ||
# This action closes issues referenced in the PR in the case the merge | ||
# does not happen on the 'default' branch. | ||
# It searches for the same tags as the original github closers. | ||
|
||
on: | ||
pull_request: | ||
types: [closed] | ||
branches: [develop] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: script | ||
uses: actions/github-script@v3 | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
script: | | ||
const pr = context.payload.pull_request; | ||
if (!pr.merged){ | ||
console.log("Don't close issues when PR is not merged"); | ||
return; | ||
} | ||
const body = pr.body; | ||
const lines = body.split('\n').map((l)=>l.trim()); | ||
const closers = new RegExp( | ||
/(close|closes|closed|fix|fixes|fixed|resolve|resolves|resolved)/i); | ||
const issues = lines.filter((l)=>l.match(closers)); | ||
const issue_nbrs = issues.map((i) => i.replace(/.*#/, '')); | ||
issue_nbrs.forEach((i) => { | ||
console.log("Closing issue " + i); | ||
github.issues.createComment({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
issue_number: i, | ||
body: `Closed by PR #${pr.number} ${pr.title}` | ||
}); | ||
github.issues.update({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
issue_number: i, | ||
state: 'closed' | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Security Policy | ||
|
||
## Supported Versions | ||
|
||
Currently eligble versions for patches are the following | ||
|
||
| Version | Supported | | ||
| ------- | ------------------ | | ||
| 1.x.x | :white_check_mark: | | ||
|
||
|
||
## Reporting a Vulnerability | ||
Please report (suspected) security vulnerabilities to [email protected]. You will receive a response from us within 48 hours. If the issue is confirmed, we will release a patch as soon as possible depending on complexity but historically within a few days. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.