Skip to content

Open Source Code from Team IntelliconnectQ developed using MS Power Automate, MS Teams to alert Team Members if GitHub Repository was inactive for the day

Notifications You must be signed in to change notification settings

intelliconnect/code-repository-monitor-mspowerplatform

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 

Repository files navigation

GitHub Code Repository Monitor Using PowerAutomate – Installation Guide and Manual

This utility provides recurring alerts for commits to a GitHub repository. It serves as a reminder for instances when a commit might be forgotten or overlooked, helping to ensure that code changes are consistently recorded. This utility is developed using Power Automate.

Why Use Power Automate?

Many companies rely on Office 365 applications and services for internal communication and collaboration. Power Automate, integrated within Office 365 Suite, eliminates the need for third-party applications. It offers over a thousand connectors and actions. For this utility, we utilize connectors such as HTTP to call GitHub's REST API and SharePoint actions to retrieve items from a list and MS Teams to communicate with programmers and stakeholders. Note that a Power Automate Premium license is required to use HTTP actions.

How Does the Scheduled Flow Provide Alerts?

The Scheduled Flow is a recurring flow in Power Automate that can be scheduled to run at any desired time or frequency throughout the day. The flow first retrieves the repository list from SharePoint. Based on the repository names, it then iterates through each to check for commits. If no commits are found for the day, it posts a message to MS Teams.

How to install this application?

Pre-requisite: Power Automate License

Step 1: Download the zip file.

Step 2: Go to https://make.powerautomate.com/ log in with your credentials.

Step 3: Go to My Flows.

Picture 1

Here, you will find all your flows.

Step 4: Import the zip file which was downloaded earlier

Picture2

Once you select the zip file, it will start importing.

Picture3

Step 5: Select the connections required

Click on Select during import and select the connection or create one, it will take a few seconds.

Picture4

Click on import once you have selected the connections. It will take a minute or two to import, don’t close the window.

Step 6: Go to My Flows and Turn on the flow you just imported

Picture5

Step 7: Set up the Repository list

Go to the Share Point from application lists. Select the Share Point site, where you can add the list.

Picture6 Picture7

Step 8: Create a Blank list from Share Point

Picture8

Add three fields like this and add your GitHub organizations and repositories and the respective group chat name in team.

orgname, reponame, team and description

Note: Every repository you are adding must have access from the account you will run the autoamte flow from.

Picture9

Step 9: Add the Share Point list in the flow

Go to My Flows> Click on edit the flow.

Click on Get Items action and select the site your list is in, and then select the list.

Save the flow once you have added the list. (Ignore the warning for OData query)

Picture10

Step 10: Change the token in HTTP action

Create a token from GitHub>Settings>Developer’s settings> Personal Access Token.

Make a classic token giving repository permissions and copy the token.

Picture11 Picture12

You will find HTTP in such way:

Picture13

Paste it in HTTP action in the flow.

Picture14

And save it, you are done with setting the flow up.

You can customize a few things such as time and the list name.

You can change the recurring time in schedule action:

Picture15

Once you are done with customizing the flow, hit save and you are done! You will get alerts to the teams you named in Share Point at the time you selected in schedule action.

How to test the flow?

Go to My Flows> Github Commits Alert> Edit.

Then, press the test button.

Picture16

It will show like this:

Picture17

And in the Teams, which you mentioned you’d get alert like this:

Picture18

Since the test was successful, you can now start using it daily.

We trust this will streamline your workflow and make things easier for you!

Ready to Transform your Business with Automation? Get Started

Disclaimer:

This project and its accompanying installation documentation are provided "as is" without any warranties or guarantees of any kind, either express or implied. While we have made every effort to ensure the accuracy and functionality of the code and instructions provided, we cannot guarantee that this solution will work in all environments or configurations. Use of this project is at your own risk. We are not responsible for any issues, damages, or data loss that may occur as a result of using this project or following the installation instructions. It is strongly recommended that you thoroughly test the solution in a non-production environment before deploying it to your production systems. Additionally, ensure that your environment meets all prerequisites and that you have the appropriate expertise to manage and troubleshoot any issues that may arise. By using this project, you acknowledge and agree to the terms of this disclaimer.

About

Open Source Code from Team IntelliconnectQ developed using MS Power Automate, MS Teams to alert Team Members if GitHub Repository was inactive for the day

Topics

Resources

Stars

Watchers

Forks