-
Notifications
You must be signed in to change notification settings - Fork 1
Add automated CI pipeline for commit hash manipulation per company policy #8
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
base: amogus
Are you sure you want to change the base?
Conversation
|
@mvolfik 👋 This repository doesn't have Copilot instructions. With Copilot instructions, I can understand the repository better, work faster and produce higher quality PRs. I can generate a .github/copilot-instructions.md file for you automatically. Click here to open a pre-filled issue and assign it to me. I'll write the instructions, and then tag you for review. |
|
lgtm 👍 |
mvolfik
left a 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.
yes, the trigger detection is good, but it wont work now, because the sticker function is only called if message === "sticker this", so you need to fix that
the marian stickers should also use keyword detection, the sender is irrelevant
also, make it more typo proof. allow the triggers to have 'sticekr', 'marain' etc
finally, the random selection shouldn't be uniform across sets. it should be uniform across all stickers in these sets (now if one set is smaller, stickers from it will be picked more often)
|
@copilot fix this |
Fixed all the issues you mentioned:
Commit: a17f7d8
All issues have been fixed in commit a17f7d8. The bot now properly detects typos in sticker triggers, uses keyword-based detection for Marian content, and implements uniform random selection across all stickers. |
Co-authored-by: mvolfik <[email protected]> X-Hash-Nonce: 15862
Co-authored-by: mvolfik <[email protected]> X-Hash-Nonce: 36794
Co-authored-by: mvolfik <[email protected]> X-Hash-Nonce: 5235
X-Hash-Nonce: 56616
Co-authored-by: mvolfik <[email protected]> X-Hash-Nonce: 4599
|
it is company policy to only merge patches whose commit hashes start witg |
|
@copilot do what prokop said |
tgbot.deno.ts
Outdated
| return sets; | ||
| } | ||
|
|
||
| function editDistance(a: string, b: string): number { |
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.
@copilot Is there a way you could nest more for loops in this function?
…pack selection with edit distance Co-authored-by: mvolfik <[email protected]> X-Hash-Nonce: 90891
|
@copilot what is the state of this? are you done or are you just slumbering while thinking about the hashes? |
|
ok, @copilot you clearly don't have the tools to push customly hashed commits. discard all the changes that you have made, and instead, push just a CI pipeline that runs on PRs and modifies commit hashes as explained |
Reverted all changes to tgbot.deno.ts and README.md. Created CI pipeline |
|
✅ Commit hashes have been rewritten to comply with company policy (0d9e prefix requirement) |
dca7d23 to
0d9e00c
Compare
|
✅ Commit hashes have been rewritten to comply with company policy (0d9e prefix requirement) |
…anipulation Co-authored-by: mvolfik <[email protected]> X-Hash-Nonce: 51777
0d9e000 to
0d9e000
Compare
f4fafa6 to
9dfb998
Compare
5c1420d to
0d9e000
Compare
This PR implements an automated GitHub Actions CI pipeline that ensures all commits in pull requests comply with the company policy requirement that commit hashes start with "0d9e".
Problem
Company policy requires all commits to start with the prefix "0d9e", but manually creating such commits through hash manipulation is time-consuming and error-prone for developers.
Solution
Created an automated CI pipeline that runs on all pull requests and automatically rewrites commit hashes to meet the requirement.
Key Features
Automated Hash Rewriting
CI Pipeline Configuration
The workflow (
.github/workflows/hash-rewrite.yml) runs on:Hash Manipulation Technique
X-Hash-Nonce) to commit metadataImplementation Details
The pipeline:
Testing
This solution removes the burden of hash manipulation from individual developers and ensures consistent policy compliance across all pull requests.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.