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

config: add Notepad like repos to text-editor collection #1811

Merged
merged 8 commits into from
Oct 26, 2024

Conversation

inkydragon
Copy link
Contributor

What problem does this PR solve?

Add following repo:

Stars and last update time at 2024-10-25

@inkydragon
Copy link
Contributor Author

inkydragon commented Oct 25, 2024

CI error unrelated: https://github.com/pingcap/ossinsight/actions/runs/11514447324/job/32053086908?pr=1811#step:5:111

Text-editor collection looks good:

[08:13:21.596] INFO: ✅  Checked collection [Text Editor](id: 10015).

Failed at Hyperledger Foundation collection:

[08:13:22.259] ERROR: ❌  Failed to verify collection configs, please check error messages as follows and modify the configs:
[08:13:22.259] ERROR: Collection [Hyperledger Foundation](id: 10037): can not find some repos by names: hyperledger/bevel
[08:13:22.259] INFO: Trying to fix the wrong repo names and generate fix suggestions...
[08:13:22.804] INFO: Fetched github repo by name hyperledger/bevel, the repo name has changed to hyperledger-bevel/bevel
[08:13:22.830] INFO: 💡 Try to fix the wrong repo names by following commands:

cd /home/runner/work/ossinsight/ossinsight/configs/collections
find . -name "*.yml" -exec sed -i '' 's/hyperledger\/bevel/hyperledger-bevel\/bevel/g' {} +
 ELIFECYCLE  Command failed with exit code 1.
Error: Process completed with exit code 1.

There is a rename: hyperledger/bevel -> hyperledger-bevel/bevel

@Mini256
Copy link
Member

Mini256 commented Oct 26, 2024

Try to fix the ci with commands:

cd ./configs/collections
find . -name "*.yml" -exec sed -i '' 's/hyperledger\/bevel/hyperledger-bevel\/bevel/g' {} +

or just modify the wrong collection config file manually.

@inkydragon
Copy link
Contributor Author

inkydragon commented Oct 26, 2024

Git action checkout wrong commit, 6095984 is the latest commit at main branch:

/usr/bin/git log -1 --format=%H
6095984c49e98232a55bd3c109727b7b358f898e

https://github.com/pingcap/ossinsight/actions/runs/11529099298/job/32097111926?pr=1811#step:2:67

on:
pull_request_target:

So, ci just check if main branch looks good, not this pr.

This event runs in the context of the base of the pull request, rather than in the context of the merge commit, as the pull_request event does. This prevents execution of unsafe code from the head of the pull request that could alter your repository or steal any secrets you use in your workflow. This event allows your workflow to do things like label or comment on pull requests from forks. Avoid using this event if you need to build or run code from the pull request.

https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows#pull_request_target

@inkydragon inkydragon marked this pull request as draft October 26, 2024 05:10
@Mini256
Copy link
Member

Mini256 commented Oct 26, 2024

You can right, let me fix it.

@Mini256
Copy link
Member

Mini256 commented Oct 26, 2024

I am trying to fix the ci. Please merge the main branch into your branch and try it again.

ref: ${{ github.event.pull_request.head.sha }}

@inkydragon
Copy link
Contributor Author

OK, now git is checking out pr commits correctly.
But the checkout script looks like it has some problems.

[07:17:42.377] ERROR: ❌  Failed to verify collection configs, please check error messages as follows and modify the configs:
[07:17:42.377] ERROR: Collection [Hyperledger Foundation](id: 10037): can not find some repos by names: hyperledger-iroha/iroha-deploy, hyperledger-iroha/iroha-ed25519, hyperledger-iroha/iroha-ios, hyperledger-iroha/iroha-java, hyperledger-iroha/iroha-javascript, hyperledger-iroha/iroha-python, hyperledger-iroha/iroha-tui-client, hyperledger-iroha/iroha, hyperledger-archives/sawtooth-seth, hyperledger-archives/transact-contrib, hyperledger-archives/transact-rfcs, hyperledger-archives/transact-sdk-javascript
[07:17:42.377] INFO: Trying to fix the wrong repo names and generate fix suggestions...
[07:17:42.570] INFO: Fetched github repo by name hyperledger-iroha/iroha-deploy, the repo name has changed to hyperledger-iroha/iroha-deploy
[07:17:42.802] INFO: Fetched github repo by name hyperledger-iroha/iroha-ed25519, the repo name has changed to hyperledger-iroha/iroha-ed25519

Maybe it would be more robust to make the check script support repo renaming.

@Mini256
Copy link
Member

Mini256 commented Oct 26, 2024

OK, I will merged this PR first and fix the CI problem later.

@Mini256 Mini256 marked this pull request as ready for review October 26, 2024 08:13
Copy link
Member

@Mini256 Mini256 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Mini256 Mini256 merged commit d671fab into pingcap:main Oct 26, 2024
1 check failed
@Mini256
Copy link
Member

Mini256 commented Oct 26, 2024

@inkydragon Thank you for your contribution!

@inkydragon inkydragon deleted the text-editor branch October 26, 2024 08:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants