Comments (5)
Hi @dfmore, I haven't actually tried to do this before, so I don't know if overriding GITHUB_REPOSITORY actually works. From your screenshot, it seems that Github might not allow you to override env variables that they set.
Another way of going about this is to define another env variable, something like REPOSITORY_NAME, and check in main.py if it's set. If REPOSITORY_NAME is set, then use it, if not then fallback to GITHUB_REPOSITORY.
I don't have time to make the changes right now and test, but happy to merge in a PR with these changes. Next time I do have time to work on the project I'll see if I can get this in.
from repository-traffic-action.
Hi @thias15! Should a forked repositories views and clones count towards the upstream repository? Do you know what GitHub does for this scenario?
I think I would expect a forked repos stats to be separate from the upstream repo, given that forked repo can become it's own separate thing.
Either way I don't think there is anything that can be done, apart from the person who forked creating a PAT and using it to log metrics for the fork.
from repository-traffic-action.
It would be nice to have the repo name as an input rather than using GITHUB_REPOSITORY
from repository-traffic-action.
Sorry, hadn't seen your latest comment. I think it would be reasonable to let the user override GITHUB_REPOSITORY with their own value by setting an env variable. By the way have you tried overriding GITHUB_REPOSITORY by setting it on the yaml file? Something along the lines of:
- name: GitHub traffic
uses: sangonzal/[email protected]
env:
TRAFFIC_ACTION_TOKEN: ${{ secrets.TRAFFIC_ACTION_TOKEN }}
GITHUB_REPOSITORY: name_you_want_to_use
I don't have time to make the changes and test right now, but if you'd like to make the change I would merge the pull request in and release a new version.
from repository-traffic-action.
Hi @sangonzal 👋🏽 I've tried your suggestion about using the GITHUB_REPOSITORY
env but couldn't get it to work.
I'm running your action from the innovyze/Traffic-Data
repository on traffic from the innovyze/Open-Source-Support
repository.
It seems that the environment variable has been recognised, but the action is still being applied to traffic in the innovyze/Traffic-Data
repository.
Do you know what I'm getting wrong?
from repository-traffic-action.
Related Issues (10)
- Get traffic data for repo A, store in folder in repo B HOT 1
- where are the data files? HOT 6
- github.GithubException.BadCredentialsException: 401 HOT 1
- Change in Github API
- latest commit in dev branch fails to run HOT 2
- Does the action overwrite traffic data csvs every time it runs? HOT 2
- Views and Visitors HOT 1
- quick question HOT 2
- Job failing ; exception error HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from repository-traffic-action.