Skip to content

Commit

Permalink
more
Browse files Browse the repository at this point in the history
  • Loading branch information
yegor256 committed May 27, 2024
1 parent e7a64c7 commit 23a54ba
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 2 deletions.
5 changes: 3 additions & 2 deletions judges/post-award-to-github/post-award-to-github.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,9 @@
(not (exists href)))'
consider do |f, _|
name = octo.user_name_by_id(f.who)
id = octo.add_comment(f.repository, f.issue, "@#{name} #{f.message}")
f.href = "https://github.com/#{f.repository}/issues/#{f.issue}/#{id}"
repo = octo.repo_name_by_id(f.repository)
id = octo.add_comment(repo, f.issue, "@#{name} #{f.message}")
f.href = "https://github.com/#{repo}/issues/#{f.issue}/#{id}"
$loog.info("Comment ##{id} posted with an award to #{f.href}")
end
end
34 changes: 34 additions & 0 deletions judges/post-award-to-github/post-live.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# MIT License
#
# Copyright (c) 2024 Zerocracy
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
---
category: live
input:
-
issue: 17
repository: 799177290
who: 526301
award: 15
message: This is just a test, ignore it please
when: 2024-05-20T23:54:24Z
expected:
- /fb[count(f)=1]
- /fb/f/href
1 change: 1 addition & 0 deletions judges/post-award-to-github/post.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,4 @@ options:
testing: true
expected:
- /fb[count(f)=1]
- /fb/f/href

0 comments on commit 23a54ba

Please sign in to comment.