Questions on GitHub automations

This topic was automatically generated from Slack. You can find the original thread here.

David Aronchick : I think this is a great fit for what we need, but if you could help us figure out this flow (I searched for a bunch of docs, but I don’t think I could find it):
• User creates a new issue in GitHub
• Team decides it should be in the backlog so promotes it to a project
• Pipedream adds a label indicating what project it’s part of and what column it’s in (Pipedream)
• When user moves card from column to column, the name of label for “stage:” is updated (Pipedream)
I think this seems pretty straightforward, but the number one issue we’re having is that column_ids are not resolvable to strings from Github. Any guidance there?

Also, if a label doesn’t exist, can we create them?

Dylan Sather (Pipedream) : this should all be possible with the GitHub API / actions in Pipedream. You’ll find a few workflows we use to automate actions based on labels, etc. in this blog post: https://pipedream.com/blog/devreleng/ (see the GitHub section).

When I’m back at my computer, I’ll send you a few more workflows that specifically automate tasks tied to GitHub project boards to show you a few more examples.

Yes, you should be able to create labels programmatically. I personally use the Octokit JS client that wraps the GitHub API. You’ll see examples in these workflows. https://octokit.github.io/rest.js/v18#issues-create-label

David Aronchick : thanks! i saw plenty that were read only, but i need to interact with the GH API to a) resolve column_id -> name b) check if label already exists c) create it if not (which it looks like you linked to)

Dylan Sather (Pipedream) : Take a look at these two workflows. They run on project card events (when a card is created, moved, etc. in a project). These two specifically just send Slack messages when a card is moved into a specific column:

Dylan Sather (Pipedream) : https://pipedream.com/@pd/pipedream-github-issue-ready-for-pr-review-p_6lCkM5j/edit

Dylan Sather (Pipedream) : https://pipedream.com/@pd/pipedream-github-issue-ready-for-qa-p_q6CqRoN/edit