-
-
Notifications
You must be signed in to change notification settings - Fork 538
Expand file tree
/
Copy pathfeature-request-custom-work.yml
More file actions
68 lines (59 loc) · 2.38 KB
/
feature-request-custom-work.yml
File metadata and controls
68 lines (59 loc) · 2.38 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
name: Feature Request Custom Work Comment
on:
issues:
types: [opened]
permissions:
contents: read
issues: write
jobs:
comment:
if: >-
${{
github.event.issue.author_association != 'OWNER' &&
github.event.issue.author_association != 'MEMBER' &&
github.event.issue.author_association != 'COLLABORATOR'
}}
runs-on: ubuntu-latest
steps:
- name: Comment on enhancement requests from regular users
uses: actions/github-script@v7
with:
script: |
const issueTypeQuery = `
query($owner: String!, $repo: String!, $issueNumber: Int!) {
repository(owner: $owner, name: $repo) {
issue(number: $issueNumber) {
issueType {
name
}
}
}
}
`;
const issueTypeResult = await github.graphql(issueTypeQuery, {
owner: context.repo.owner,
repo: context.repo.repo,
issueNumber: context.issue.number,
});
const issueTypeName = issueTypeResult.repository.issue?.issueType?.name?.trim().toLowerCase();
const hasFeatureLabel = context.payload.issue.labels.some(
(label) => label.name.startsWith('Type: Feature')
);
if (issueTypeName !== 'enhancement' && !hasFeatureLabel) {
core.info(`Skipping issue #${context.issue.number}. Issue type: ${issueTypeName ?? 'none'}.`);
return;
}
const commentBody = [
'Blazorise is continuously evolving, and we do review feature requests from the community. However, due to limited resources, not all requests can be prioritized or scheduled in the short term.',
'',
'If this feature is critical for your project and you need it implemented on a specific timeline, we offer a custom development program where features can be prioritized and delivered in collaboration with you: ',
'https://blazorise.com/custom-work',
'',
'---',
].join('\n');
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
body: commentBody,
});