-
Notifications
You must be signed in to change notification settings - Fork 45
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
Feature request: Keep the configuration in a file #52
Comments
Yes. We can have a |
Agree. Moving the settings to a configuration file seems like a good idea. I personally have the following file structure in mind: settings:
username: 'Readme-Workflows'
commit_message: '⚡ Update README with the recent activity'
max_lines: 5
readme_file: './README.md'
disabled_events: # Maybe we can now have an actual list?
- 'comment'
url_text: '{REPO}{ID}'
date:
timezone: '0:00' # Would also allow defining timezone names if #49 is worked on
text: 'Last updated: {DATE}'
date_format: 'dddd, mmmmm dS, yyyy, h:MM:ss TT'
messages:
comments: '💬 Commented on {ID} in {REPO}'
issue_open: '❗️ Opened issue {ID} in {REPO}'
issue_close: '✔ Closed issue {ID} in {REPO}'
pr_open: '💪 Opened PR {ID} in {REPO}'
pr_close: '❌ Closed PR {ID} in {REPO}'
pr_merge: '🎉 Merged PR {ID} in {REPO}'
repo_create: '📔 Created new repository {REPO}'
repo_fork: '🔱 Forked {FORK} from {REPO}'
repo_watch: '👀 Watching {REPO}'
wiki_create: '📖 Created new wiki page {WIKI} in {REPO}' |
@Andre601 that'd be fine too. However, I think we should keep these parameters in uppercase. |
Yes can have a actually list for DISABLE_EVENTS. |
I dislike uppercase names in YAML names, because it just looks shit. |
Annoying, ok, then first replace underscore (_) with hiphen (-) |
We cannot do that. At the end, we have to convert it into object and it does not accept hiphen (-). |
It's "hyphen" to my knowledge... |
It was a typo. |
The goal of the file would be to have easier configuration options. Env vars are limited and only converting those settings into a a env would be extremely pointless imo. |
We will have to use javascript spread operator to overwrite the default config. |
I think you didn't understand what @abhijoshi2k said. He said that when parsing yaml file it will convert it into a object and in a object hyphen are not allowed in Node.js |
Will do it. |
@abhijoshi2k I am going to have lunch now, today it became little late, can I do it afterwards? |
Yeah take your time |
@abhijoshi2k Should I edit the
|
I suggest create new function that will return an object. So we can call the function from |
We shall first populate an object variable with default statements and then update it with custom statements (custom statements for whichever events provided). Make sure the arguments are named the same everywhere, else it won't overwrite. |
@abhijoshi2k Can you update |
@abhijoshi2k I think we can't get |
We are getting it with |
I asked because I don't know whether that var is defined in our files, it maybe defined by dependencies like actions/core. |
It is defined by github when action starts and given as input. |
Please check these things before submitting your issue:
Is your feature request related to a problem? Please describe.
N/A.
Describe the solution you'd like
I think you should keep the configuration in a separate file (maybe a file like
.github/recent-activity-config.yml
) as there are too many inputs and only addconfig_file
as a option in github action inputs which will tell path to the configuration file. I will assign this to my self if you agree with this request and plz help me in the process of doing it.Describe alternatives you've considered
N/A.
Additional context
Probaly I will use js-yaml as a dependency to do parse the yaml config.
The text was updated successfully, but these errors were encountered: