Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add reminder label support #3118

Merged
merged 9 commits into from
Dec 25, 2023
Merged
4 changes: 2 additions & 2 deletions lib/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ function addLabel(prID, labels) {
function deleteLabel(prID, label) {
let url = `labels/${label}`;
if (prID) {
ulr= `issues/${prID}/labels/${label}`
url= `issues/${prID}/labels/${label}`
}
return axios.delete(`https://api.github.com/repos/ioBroker/ioBroker.repositories/${url}`, {
headers: {
Expand All @@ -31,7 +31,7 @@ function deleteLabel(prID, label) {
function getLabels(prID) {
let url = `labels`;
if (prID) {
ulr= `issues/${prID}/labels`
url= `issues/${prID}/labels`
}
return axios(`https://api.github.com/repos/ioBroker/ioBroker.repositories/${url}`,
{
Expand Down
4 changes: 2 additions & 2 deletions lib/stableBrandNewReminder.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ async function doIt() {
console.log(` will merged after ${dateStr}`);
const label = `* ${dateStr} *`;
const labels = getLabels('');
if ( ! labels.includes(`${label}`)) {
if ( ! labels.filter( (f) => { return f.name===`${label}`})) {
console.log(` will create label $label}`);
addLabel(`${label}, ``remind after ${dateStr}`, `#ffffff`);
}
Expand All @@ -52,7 +52,7 @@ async function doIt() {
console.log(` will remind at ${dateStr}`);
const label = `* ${dateStr} *`;
const labels = getLabels('');
if ( ! labels.includes(`${label}`)) {
if ( ! labels.filter( (f) => { return f.name===`${label}`})) {
console.log(` will create label $label}`);
addLabel(`${label}, ``reminde after ${dateStr}`, `#ffffff`);
}
Expand Down