Upcoming Features for Devicon #383
Replies: 5 comments 7 replies
-
Here is the issue regarding this topic: #165, nice that you are working on it! :)
Cool idea. You can use info@devicon.dev (see also CODE_OF_CONDUCT.md#enforcement) for registering an account of imgur. If you send me your e-mail adress (private message) I can add you to the group of e-mail recipients for this mail if you like. |
Beta Was this translation helpful? Give feedback.
-
This message is to provide documentation of what happened with this planned feature. Summary: GitHub's secrets policy prevents us from using the action. Alternatives have not been found. We might not get a functionality like this for the foreseeable future. So I did managed to create an action that can upload images to imgur. However, this action requires a IMGUR secret token. The only way we can pass secrets in GitHub is through GitHub secrets, which unfortunately doesn't get pass when the event is triggered by a forked repo (see here. Thus, we can't use this action until we can figure out a way to pass the IMGUR token securely to the action. I was also looking into uploading images using the GitHub website. In fact, there's an NPM package that allows you to do this. However, to use it would require passing our credential into the script, which also runs into the problem above. We can also hard-code our credentials but obviously, this is a horrible choice. Making our own Selenium script would still run into the issue. In order to upload using the GitHub website, we would need to be logged in using our credentials. This would then run into the problems as seen above. Thus, we won't have this functionality for awhile, at least until we find an API that allows image upload with no credential. |
Beta Was this translation helpful? Give feedback.
-
I think I found a way to make the image commenting works. There's an Action event called workflow_run, which is triggered whenever a workflow is completed. I'm thinking that we can chain the Here's what I think the flow looks like: Since the Now, there are some potential hurdle to this: This seems to refer to the A log inside of the trigger event tell us what's the trigger id is: So while this is not in any documentation, it's safe to say that this refers to the trigger's artifacts. -The This is a minor hurdle but it will make testing a bit difficult. I plan to test it using my forked repo first before we actually put it in production. -We'll need to sign up for a GitHub personal access token The API only allows like 5 or so requests without auth, so we'll need this token. During the workflow, we can pass it down using secrets (which should be ok since the event is not a What do you guys think? I think this should work and save us the hassle of downloading the artifacts whenever we review a PR. |
Beta Was this translation helpful? Give feedback.
-
Good news: we don't have to create an API token. There's already an action that we can use instead: https://github.com/marketplace/actions/download-workflow-artifact As for the |
Beta Was this translation helpful? Give feedback.
-
@amacado So I'm on the trail to find a way to bypass the issue of commenting on forked repo's PRs. Here area few promising leads: For Uploading Images to Imgur For commenting on the PR
Personally, I'm going to work on option 1 since I got half the battle done. I just have to figure out how to save the pr number into a file. |
Beta Was this translation helpful? Give feedback.
-
Hi all,
I have plans for the next few weeks for some features that I want to do for Devicon. I want to:
About Imgur:
They have an API that supports anonymous image uploading that would be deleted after 6 months. I'm thinking of using this option since it requires less work to register for. However, I am willing to make a Devicon account for Imgur that would save the screenshots forever on Imgur. Let me know what you guys think.
Beta Was this translation helpful? Give feedback.
All reactions