-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add filtering, pipeline, and instructions
- Loading branch information
Showing
15 changed files
with
786 additions
and
0 deletions.
There are no files selected for viewing
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
* @jef |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
github: jef | ||
custom: ["https://www.paypal.me/jxf"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
--- | ||
name: "\U0001F41B Bug report" | ||
about: Report a bug for this project | ||
title: '' | ||
labels: '' | ||
assignees: '' | ||
|
||
--- | ||
|
||
## Expected Behavior | ||
|
||
<!-- Tell us what should happen --> | ||
|
||
## Current Behavior | ||
|
||
<!-- Tell us what happens instead of the expected behavior --> | ||
|
||
## Steps to Reproduce | ||
|
||
<!-- Provide a link to a live example, or an unambiguous set of steps to reproduce this bug. --> | ||
<!-- Include code to reproduce, if relevant --> | ||
|
||
## Environment | ||
|
||
- OS: | ||
- Flags: | ||
|
||
## Logs | ||
|
||
<!-- Provide a brief log --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
blank_issues_enabled: false | ||
contact_links: | ||
- name: 💡 Have an idea for a new feature? | ||
url: https://github.com/jef/stargazer-vanity/discussions | ||
about: Create a new idea discussion! | ||
- name: 🙇 Need help with stargazer-vanity? | ||
url: https://github.com/jef/stargazer-vanity/discussions | ||
about: Create a new help discussion if it hasn't been asked before! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "daily" | ||
labels: | ||
- "dependencies" | ||
- package-ecosystem: "gomod" | ||
directory: "/" | ||
schedule: | ||
interval: "daily" | ||
labels: | ||
- "dependencies" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<!-- Please use Conventional Commits to label your title --> | ||
<!-- https://www.conventionalcommits.org/en/v1.0.0/ --> | ||
<!-- Example: feat: allow provided config object to extend other configs --> | ||
|
||
### Description | ||
|
||
<!-- Fixes #(issue) --> | ||
<!-- Please also include relevant motivation and context. --> | ||
|
||
### Testing | ||
|
||
<!-- Please describe the tests that you ran to verify your changes. --> | ||
<!-- Provide instructions so we can reproduce. --> | ||
<!-- Please also list any relevant details for your test configuration --> | ||
|
||
### New dependencies | ||
|
||
<!-- List any dependencies that are required for this change. --> | ||
<!-- Otherwise, delete section. --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
name: cd | ||
on: | ||
push: | ||
branches: | ||
- main | ||
jobs: | ||
cd: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: google-github-actions/[email protected] | ||
id: release | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
release-type: simple | ||
package-name: stargazer-vanity | ||
- name: Retrieve latest tag | ||
run: echo "TAG=$(cat version.txt)" >> $GITHUB_ENV | ||
- uses: actions/setup-go@v2 | ||
with: | ||
go-version: '1.15' | ||
- uses: actions/cache@v2 | ||
with: | ||
path: ~/go/pkg/mod | ||
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | ||
restore-keys: ${{ runner.os }}-go- | ||
- name: Build release assets | ||
run: make dist | ||
- name: Upload Windows asset | ||
if: ${{ steps.release.outputs.release_created }} | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.release.outputs.upload_url }} | ||
asset_path: ./svg.exe | ||
asset_name: svg-windows-amd64.exe | ||
asset_content_type: application/octet-stream | ||
- name: Upload Linux asset | ||
if: ${{ steps.release.outputs.release_created }} | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.release.outputs.upload_url }} | ||
asset_path: ./svg.linux | ||
asset_name: svg-linux-amd64 | ||
asset_content_type: application/octet-stream | ||
- name: Upload macOS asset | ||
if: ${{ steps.release.outputs.release_created }} | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.release.outputs.upload_url }} | ||
asset_path: ./svg.darwin | ||
asset_name: svg-darwin-amd64 | ||
asset_content_type: application/octet-stream |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: ci | ||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-go@v2 | ||
with: | ||
go-version: '1.15' | ||
- uses: actions/cache@v2 | ||
with: | ||
path: ~/go/pkg/mod | ||
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | ||
restore-keys: ${{ runner.os }}-go- | ||
- name: Build | ||
run: make | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-go@v2 | ||
with: | ||
go-version: '1.15' | ||
- uses: actions/cache@v2 | ||
with: | ||
path: ~/go/pkg/mod | ||
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | ||
restore-keys: | | ||
${{ runner.os }}-go- | ||
- name: Lint | ||
run: | | ||
go get -u golang.org/x/lint/golint | ||
golint -set_exit_status |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,9 @@ | ||
.idea/ | ||
|
||
# Binaries for programs and plugins | ||
*.exe | ||
*.linux | ||
*.macos | ||
*.exe~ | ||
*.dll | ||
*.so | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
.DEFAULT_GOAL := build | ||
|
||
.PHONY: build | ||
build: | ||
go build -o sgv | ||
|
||
.PHONY: clean | ||
clean: | ||
rm -rf sgv | ||
|
||
.PHONY: dist | ||
dist: | ||
GOOS=windows GOARCH=amd64 go build -o svg.exe | ||
GOOS=linux GOARCH=amd64 go build -o svg.linux | ||
GOOS=darwin GOARCH=amd64 go build -o svg.darwin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# stargazer-vanity [![cd](https://github.com/jef/stargazer-vanity/workflows/cd/badge.svg)](https://github.com/jef/stargazer-vanity/actions?query=workflow%3Acd+branch%3Amain) | ||
|
||
- **star·gaz·er** `/ˈstärˌɡāzər/` Someone that has starred a repository. | ||
- **van·i·ty** `/ˈvanədē/` Excessive pride in or admiration of one's own appearance or achievements. | ||
|
||
I created this out of pure vanity, hence the name. I was curious as to who has starred my repositories (and others) and what companies they worked for. | ||
|
||
This allows programs lets a user understand that data without parsing through _many_ pages of stargazers. | ||
|
||
## Usage | ||
|
||
It is required that you use a GitHub Personal Access Token (PAT). You can generate one [here](https://github.com/settings/tokens/new). The required scopes are `['read:org', 'user:email', 'read:user']`. Set your PAT to environment variable `GITHUB_PAT`. If `GITHUB_PAT` isn't set, you will be prompted for your PAT in the beginning of startup. | ||
|
||
``` | ||
Usage of ./stargazer-vanity: | ||
-company string | ||
Filter stargazers by company name(s). Can be comma separated. | ||
If no names are given, then all stargazers will output. | ||
-employee | ||
Filter stargazers that are GitHub employees. | ||
-repo string | ||
(Required) The name of the repository. | ||
-owner string | ||
(Required) The owner or organization of the repository. | ||
``` | ||
|
||
### Examples | ||
|
||
- Amazon, Google, and GitHub employees for [cli/cli](https://github.com/cli/cli) | ||
- `./stargazer-vanity -company=amazon,google -employee -owner=cli -repo=cli` | ||
- Nvidia employees for [jef/streetmerchant](https://github.com/jef/streetmerchant) | ||
- `./stargazer-vanity -company=nvidia -owner=jef -repo=streetmerchant` | ||
|
||
## Development | ||
|
||
- `make build`: Builds source | ||
- `make clean`: Cleans executable | ||
- `make dist`: Cross-compilation for distribution |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
module github.com/jef/stargazer-vanity | ||
|
||
go 1.15 | ||
|
||
require ( | ||
github.com/shurcooL/graphql v0.0.0-20200928012149-18c5c3165e3a | ||
golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad | ||
golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5 | ||
) |
Oops, something went wrong.