I am looking to send out a one time email to the followers of a Github repo to announce the first release.
This is answer is pretty good:
https://www.quora.com/Is-there-a-way-to-send-a-message-or-email-to-all-the-followers-of-GitHub-Repo/answer/PoAn-Baron-Chen-1?srid=Xt2o
The Github API has a way to get the followers of a user -
https://developer.github.com/v3/users/followers/#list-followers-of-a-user
...but ... is there a way to get a list of the followers of a Github repo?
Take a look at github-email-explorer looks like it does what you're trying to do.
First line from the README:
For people who want to create an email marketing plan for particular group on GitHub, github-email-explorer can collect addresses from a repository you want, and then send email content to those email addresses.
Related
I"m trying to get the objectID(SHa1d) of a commit.
Is there a way to retrieve the value?
You can get the objectId through Refs - List rest api.
https://dev.azure.com/{organization}/_apis/git/repositories/{repositoryId}/refs?filter=tags/&api-version=5.1-preview.1
However, if you want to get the information of annotatedtags from the commit's response, I am afraid this is currently not possible. The commit's response currently does not contain tags information.
Here is a uservoice for the same issue has been submitted on Developer Community forum. You can vote and add your comments for this feedback. Our PM and Product Group are reviewing these suggestion regularly and considering take it as plan.
In addition, you can retrieve tags based on commit id from Repos-> Tags in web UI.
The Commits - Get Commits API for Azure DevOps Git should serve the Commit ID as well in the response, along with retrieving git commits for a project. Check out the examples given in the same page for looking at some sample requests and responses.
Here is one:
Hope this helps!
https://help.github.com/en/articles/about-code-owners
From the above documentation I’m trying to determine code and file owners of a particular file. I haven’t been able to find anything that gives this information within the GitHub documentation.
The closest I found was this, GitHub API v3: Determine if user is an Owner of an Organization
But that seems to be answering a slightly different question.
I've built an npm library called codeowners-api which does this . So its not python but in JS.
If you want to use REST you would need to fetch the codeowners file from the Repo in question using Github's get-file API.
After that you take the file and you iterate over the codeowners file until you find the match. You can look at my library's code as reference.
I've also created a chrome extension which gives the reviewer a filter button to see only their relevant files.
https://chrome.google.com/webstore/detail/codeowners/mklphhfajjbikchaodnibnjmeibbonhb
For those whoever get stuck in this situation and can't use that library^, I managed to find a work around where I use .search_issues() and then query repo:x+review:approved+is:open+is:pr, the review does not switch to approved until a Codeowner has approved the PR.
This is the best way I've found to do this:
List requested reviewers for a pull request using the Pull Requests API: https://docs.github.com/en/github-ae#latest/rest/reference/pulls#list-requested-reviewers-for-a-pull-request. This will give you a list of usernames and a list of teams.
Codeowners are essentially just teams or individuals assigned to watch over certain parts of the codebase. In my case, I wanted a list of usernames who are part of each codeowning team. So for each codeowning team that I got in Step 1, I used the Teams API to get lists of the team members: https://docs.github.com/en/rest/reference/teams#list-team-members.
Caveats of this approach:
Step 1 of this approach lists out all of those whose reviews were requested on the PR. While Github automatically requests reviews from codeowning individuals and teams, one can manually request reviews as well. This step does not distinguish between automatic review requests (which suggest codeowner status) and manual review requests.
On the GitHub website, it is possible to list PRs reviewed by a user for a specific repository with the filter query is:pr reviewed-by:your-github-username. See example.
But I can't find how to replicate this functionality using the GitHub API. Is there a query you can make that will do something like GET /repos/:owner/:repo/pulls/reviewedby/:reviewer?
The search endpoint turned out to be the key. Example request:
https://api.github.com/search/issues?q=+type:pr+repo=facebook/react+reviewed-by:bvaughn
I'm not exactly sure how I managed to do this but I went through my commits today and noticed something interesting.
It looks like GitHub is recognizing me as two separate people?
This is a personal repo and so far I'm the only person who has made any changes to the repo. I would like it to show just one name, I'm pretty new to Git/GitHub so any help would be greatly appreciated!
This happens when your commit is authored by an email address that GitHub does not know about.
You can add this email to your GitHub account
(Click on your avatar > Settings > Email > Add email address)
...Or update your email in ~/.gitconfig to match what you already have in GitHub.
[user]
name = John Sprunger
email = jsprunger#myemail.com
I like to get all the names who are monitoring checkin of a particular directory, i.e. the persons getting email notification when there is checkin in that directory.
Any pointer?
I can think of two ways:
Make a submission to that directory, and look at the email that is sent out to see who is on the list.
or, run 'p4 reviews //that/particular/directory/...' and look at the results.