Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test action #9

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .github/workflows/test-action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Test Open Source Heartbeat Action
on:
pull_request: []
push:
branches:
- main

jobs:
install-spack:
runs-on: ubuntu-latest
name: Install Spack
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Generate OpenSource Heartbeat Interface
uses: ./
with:
collection: 'docs/_events'
token: ${{ secrets.GITHUB_TOKEN }}
4 changes: 1 addition & 3 deletions action.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# action.yml
name: 'Open Source Heartbeat Interface'
description: 'Create an interface for open source events on GitHub.'
branding:
Expand Down Expand Up @@ -32,8 +31,7 @@ inputs:
description: 'The collections folder under docs to write events to. Defaults to _events.'
default: _events
token:
description: >
Auth token used to fetch the repository.
description: Auth token used to fetch the repository.
default: ${{ github.token }}
runs:
using: 'docker'
Expand Down
7 changes: 1 addition & 6 deletions scripts/generate-events.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

"""

Copyright (C) 2020-2022 Vanessa Sochat.
Copyright (C) 2020-2023 Vanessa Sochat.

This Source Code Form is subject to the terms of the
Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed
Expand Down Expand Up @@ -78,7 +78,6 @@ def get_users(users_file):


def get_org_events(orgs):

# We will lookup public events
api_base = "https://api.github.com/orgs/{orgname}/events"

Expand All @@ -100,7 +99,6 @@ def get_org_events(orgs):


def get_user_events(users):

# We will lookup public events
api_base = "https://api.github.com/users/{username}/events/public"
# https://api.github.com/orgs/poldracklab/events
Expand All @@ -123,7 +121,6 @@ def get_user_events(users):


def generate_content(event, user, seen):

# Get shared metadata
repo_name = event["repo"]["name"]
repo = "https://github.com/%s" % repo_name
Expand Down Expand Up @@ -275,7 +272,6 @@ def write_events(events, output_dir):
files = set()
for user, eventlist in events.items():
for event in eventlist:

# We don't care about watching, forking, etc.
# https://docs.github.com/en/developers/webhooks-and-events/github-event-types
if event["type"] in [
Expand Down Expand Up @@ -323,7 +319,6 @@ def write_events(events, output_dir):


def main():

parser = get_parser()
args, extra = parser.parse_known_args()

Expand Down
1 change: 0 additions & 1 deletion scripts/update-users.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@ def write_file(content, filename):


def main():

parser = get_parser()
args, extra = parser.parse_known_args()

Expand Down