Skip to content

A local-first personal finance app

[AI] Fix feature-request workflows to use the Feature issue type instead of the feature label (#8572)

youngcwf3a907a156d7
diff --git a/.github/actions/handle-feature-requests.js b/.github/actions/handle-feature-requests.js
index ddb0bab5fc..926e6af7e5 100644
--- a/.github/actions/handle-feature-requests.js
+++ b/.github/actions/handle-feature-requests.js
@@ -42,6 +42,9 @@ async function main() {
nodes {
id
number
+ issueType {
+ name
+ }
labels(first: 10) {
nodes {
id
@@ -60,7 +63,7 @@ async function main() {
console.log(JSON.stringify(res, null, 2));
return res.data.repository.pullRequest.closingIssuesReferences.nodes.filter(
- issue => issue.labels.nodes.some(label => label.name === 'feature'),
+ issue => issue.issueType?.name === 'Feature',
);
});
diff --git a/.github/workflows/issues-close-feature-requests.yml b/.github/workflows/issues-close-feature-requests.yml
index caafadc0f4..afdd40d66a 100644
--- a/.github/workflows/issues-close-feature-requests.yml
+++ b/.github/workflows/issues-close-feature-requests.yml
@@ -2,14 +2,14 @@ name: Close feature requests with automated message
on:
issues:
- types: [labeled]
+ types: [typed]
permissions:
issues: write
jobs:
needs-votes:
- if: ${{ github.event.label.name == 'feature' }}
+ if: ${{ github.event.type.name == 'Feature' }}
runs-on: depot-ubuntu-latest
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
diff --git a/.github/workflows/issues-remove-help-wanted.yml b/.github/workflows/issues-remove-help-wanted.yml
index 17651c3f1f..f7b7a68156 100644
--- a/.github/workflows/issues-remove-help-wanted.yml
+++ b/.github/workflows/issues-remove-help-wanted.yml
@@ -9,7 +9,7 @@ permissions:
jobs:
remove-help-wanted:
- if: ${{ !contains(github.event.issue.labels.*.name, 'feature') && contains(github.event.issue.labels.*.name, 'help wanted') }}
+ if: ${{ github.event.issue.type.name != 'Feature' && contains(github.event.issue.labels.*.name, 'help wanted') }}
runs-on: depot-ubuntu-latest
steps:
- name: Remove 'help wanted' label
diff --git a/upcoming-release-notes/fix-feature-issue-type-workflows.md b/upcoming-release-notes/fix-feature-issue-type-workflows.md
new file mode 100644
index 0000000000..86259299d3
--- /dev/null
+++ b/upcoming-release-notes/fix-feature-issue-type-workflows.md
@@ -0,0 +1,6 @@
+---
+category: Maintenance
+authors: [youngcw]
+---
+
+Fix feature request workflows by using the feature type