mirror of
https://github.com/bloxstraplabs/bloxstrap.git
synced 2025-06-23 23:00:23 -07:00
Compare commits
14 Commits
a1ff3a42c6
...
7694a16521
Author | SHA1 | Date | |
---|---|---|---|
|
7694a16521 | ||
|
d243a88b38 | ||
|
9d638b4284 | ||
|
c37f46b3dd | ||
|
5f79605a00 | ||
|
971ccf994d | ||
|
4cde20da93 | ||
|
0bd48993ee | ||
|
ff3e1c1cda | ||
|
08377f924e | ||
|
fa5e00d6ec | ||
|
74733e8d9e | ||
|
a4bd88dc0c | ||
|
e47589096d |
53
.github/workflows/bug-report-version.yml
vendored
Normal file
53
.github/workflows/bug-report-version.yml
vendored
Normal file
@ -0,0 +1,53 @@
|
||||
name: Check Bug Report Version
|
||||
on:
|
||||
issues:
|
||||
types: [opened]
|
||||
|
||||
jobs:
|
||||
check-version:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Get latest version
|
||||
id: read-version
|
||||
run: |
|
||||
version=$(grep -oPm1 "(?<=<Version>)[^<]+" Bloxstrap/Bloxstrap.csproj)
|
||||
echo "version=$version" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Check issue for Bloxstrap version
|
||||
uses: actions/github-script@v7
|
||||
id: check-issue
|
||||
with:
|
||||
script: |
|
||||
const issueBody = context.payload.issue.body;
|
||||
const versionHeader = issueBody.match(/### Bloxstrap Version/);
|
||||
const versionMatch = issueBody.match(/v?\d+[\.,]\d+[\.,]\d+/);
|
||||
const latestVersion = '${{ steps.read-version.outputs.version }}';
|
||||
|
||||
if (versionHeader && !versionMatch) {
|
||||
await github.rest.issues.createComment({
|
||||
issue_number: context.issue.number,
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
body: 'Please specify the Bloxstrap version you are using. Use the format `vX.Y.Z`.'
|
||||
});
|
||||
} else if (versionMatch) {
|
||||
const issueVersion = versionMatch[0];
|
||||
if (issueVersion !== latestVersion) {
|
||||
await github.rest.issues.createComment({
|
||||
issue_number: context.issue.number,
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
body: `You are using an outdated version of Bloxstrap (${issueVersion}). Please update to the [latest version of Bloxstrap](https://github.com/pizzaboxer/bloxstrap/releases/latest). If you are still experiencing the bug, please reopen this issue.`
|
||||
});
|
||||
return github.rest.issues.update({
|
||||
issue_number: context.issue.number,
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
state: 'closed',
|
||||
state_reason: 'not_planned'
|
||||
});
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user