Programmatically Add Labels to Your Issues

For the past week, I’ve been working on building a Probot app that automates inviting users to my GitHub organization. If you read my past blog post, you will learn that I decided to implement a form of triaging by opening an issue for potential member…


This content originally appeared on DEV Community and was authored by Rizel Scarlett

For the past week, I’ve been working on building a Probot app that automates inviting users to my GitHub organization. If you read my past blog post, you will learn that I decided to implement a form of triaging by opening an issue for potential members if they star the repository. That was successful, but I realized that other people may open issues in my repository for various reasons – not just to join my organization. I don’t want to weed through multiple issues to figure out if they are requests or not. I prefer to filter for the ones that are requests. An easy way to do that is by adding a label to the issues that include requests to join my organization.

To programmatically add a label to my issues, I added a labels property. The labels property accepts an array of strings representing label names. I named my ‘pending-invitation’.

Image description

Now, I can filter the issues by the pending-invitation label.

Image description

Image description

Tomorrow, I plan to approve pending issues and them to the organization. Stay tuned, and follow GitHub and me on DEV for more content.


This content originally appeared on DEV Community and was authored by Rizel Scarlett


Print Share Comment Cite Upload Translate Updates
APA

Rizel Scarlett | Sciencx (2022-02-10T03:24:11+00:00) Programmatically Add Labels to Your Issues. Retrieved from https://www.scien.cx/2022/02/10/programmatically-add-labels-to-your-issues/

MLA
" » Programmatically Add Labels to Your Issues." Rizel Scarlett | Sciencx - Thursday February 10, 2022, https://www.scien.cx/2022/02/10/programmatically-add-labels-to-your-issues/
HARVARD
Rizel Scarlett | Sciencx Thursday February 10, 2022 » Programmatically Add Labels to Your Issues., viewed ,<https://www.scien.cx/2022/02/10/programmatically-add-labels-to-your-issues/>
VANCOUVER
Rizel Scarlett | Sciencx - » Programmatically Add Labels to Your Issues. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2022/02/10/programmatically-add-labels-to-your-issues/
CHICAGO
" » Programmatically Add Labels to Your Issues." Rizel Scarlett | Sciencx - Accessed . https://www.scien.cx/2022/02/10/programmatically-add-labels-to-your-issues/
IEEE
" » Programmatically Add Labels to Your Issues." Rizel Scarlett | Sciencx [Online]. Available: https://www.scien.cx/2022/02/10/programmatically-add-labels-to-your-issues/. [Accessed: ]
rf:citation
» Programmatically Add Labels to Your Issues | Rizel Scarlett | Sciencx | https://www.scien.cx/2022/02/10/programmatically-add-labels-to-your-issues/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.