-
Notifications
You must be signed in to change notification settings - Fork 4
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
Functionality to manually add URL's to the feeds overview #40
base: main
Are you sure you want to change the base?
Functionality to manually add URL's to the feeds overview #40
Conversation
Checking the intent here: do you want to add a single url as a feed item into the Separate comment: this is rather magic behavior as it is right now, so I would like to add an issue template for this use case, that already fills in the label for the user and then does the rest. But that would be a security issue for people creating issues without write access 🤔. Should be less of an issue then for ourselves. Perhaps this behavior should be documented then in the issue body of the template, and then the label is something the repo admins can add after reviewing the change. That way we prevent random users of creating issues that end up in our repo 😃. |
Forward integration
…mments accordingly
b569bce
to
0ab874f
Compare
Well, it's your issue, so I could revert the question 😉. I interpreted it as: add a single url as a feed item into the
I can create an issue form for this use case. And update the readme.md with a link to this issue form. Also, for the security of this system, we can route the request based on the author. If it's one of the members of the team, we apply the change directly in the |
… and clear manual URLs in data.json
…URL additions accordingly
…naming for URL additions
…ps://github.com/FokkoVeegens/github-copilot-updates into 32-add-support-to-add-extra-posts-to-a-newsfeed
Add URL from issue #29
…branch operations
…ps://github.com/FokkoVeegens/github-copilot-updates into 32-add-support-to-add-extra-posts-to-a-newsfeed
Fixed the issues mentioned in the previous comment. Now when people with write/maintain/admin permissions add a URL, it's applied directly in the default branch (currently a hardcoded branch, needs to be changed). If somebody with read permissions adds a URL, a PR in a separate branch is created. GitHub Actions Workflow
Documentation Update
|
ERROR_MESSAGE="${{ env.ERROR_MESSAGE }}" | ||
ISSUE_NUMBER=${{ github.event.issue.number }} | ||
COMMENT="The addition of the URL is aborted due to the following error: $ERROR_MESSAGE" | ||
gh issue close $ISSUE_NUMBER --comment "$COMMENT" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why close the issue? Adding the comment can help understand why it fails, which gives the requestor the option to update the body and relabel the issue to retrigger the workflow.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can do that of course, that would need some refactoring, as the workflow is now only triggered for new issues. I'll add this when I have time again ;-)
Co-authored-by: Rob Bos <[email protected]>
This pull request introduces a new GitHub Actions workflow to automate the addition of URLs to a
data.json
file and updates the front-end to handle and display these URLs. The most important changes include the creation of the workflow file, modifications to thedata.json
structure, and updates to the front-end logic to merge and display manual URLs.GitHub Actions Workflow:
.github/workflows/add-page-to-feed.yml
: Added a new workflow that triggers on issue creation with the label 'add-url', extracts and validates the URL from the issue body, fetches the URL title, updatesdata.json
, and commits the changes. It also comments on the issue and closes it based on the success or failure of the operation.Data Structure Update:
public/data.json
: Added a newmanualUrls
array to store manually added URLs.Front-End Updates:
src/pages/Index.jsx
: Updated the component to mergemanualUrls
with existing RSS feed items, ensuring unique display and handling of these URLs. This includes new functions for merging URLs, updating state, and rendering the combined list of items. [1] [2] [3] [4] [5] [6]These changes collectively enhance the functionality by automating URL additions and integrating them seamlessly into the existing news feed system.
Fixes #32
@rajbos You can test this solution in my forked repo. I provided access for you: https://github.com/FokkoVeegens/github-copilot-updates/issues