IT |
気になる、記になる… |
NOMAD製のiPhone 13/13 Pro向けケース「NOMAD Sport Case for iPhone」が登場 |
https://taisy0.com/2022/04/22/156100.html
|
iphone |
2022-04-22 06:59:02 |
IT |
気になる、記になる… |
「Apple Watch」のセルラーモデルがahamoでも利用可能へ − 「ワンナンバーサービス」対応に向け準備中 |
https://taisy0.com/2022/04/22/156098.html
|
ahamo |
2022-04-22 06:46:03 |
IT |
気になる、記になる… |
Google、公式ストアでGWセールを開催中 − 「Pixel」シリーズや「Chromecast」などが特価に |
https://taisy0.com/2022/04/22/156096.html
|
chromecast |
2022-04-22 06:10:46 |
IT |
ITmedia 総合記事一覧 |
[ITmedia News] 月面探査に「月保険」、民間参入受け提供 東京海上日動 |
https://www.itmedia.co.jp/news/articles/2204/22/news149.html
|
itmedia |
2022-04-22 15:43:00 |
IT |
ITmedia 総合記事一覧 |
[ITmedia ビジネスオンライン] ソニー、“着る”エアコン「REON POCKET 3」を発売 冷却機能の向上で訴求 |
https://www.itmedia.co.jp/business/articles/2204/22/news144.html
|
itmedia |
2022-04-22 15:35:00 |
IT |
ITmedia 総合記事一覧 |
[ITmedia PC USER] CHUWI、38mm厚の小型筐体を採用したCeleron搭載ミニデスクトップPC |
https://www.itmedia.co.jp/pcuser/articles/2204/22/news145.html
|
celeron |
2022-04-22 15:19:00 |
TECH |
Techable(テッカブル) |
未来の収益をいま現金化。“RBF”活用の資金調達プラットフォーム「Yoii Fuel」 |
https://techable.jp/archives/177600
|
yoiifuel |
2022-04-22 06:00:53 |
python |
Pythonタグが付けられた新着投稿 - Qiita |
【Python】csv.DictReaderで数値(int型のデータ)を読み込む |
https://qiita.com/ms_/items/623571d3268b392daa5a
|
pythonpython |
2022-04-22 15:36:40 |
python |
Pythonタグが付けられた新着投稿 - Qiita |
【Python】クラスオブジェクトの中身を確認する2つの方法 |
https://qiita.com/ms_/items/1eee89e053defc44b841
|
pythonpytho |
2022-04-22 15:31:21 |
python |
Pythonタグが付けられた新着投稿 - Qiita |
【mypy】リストに複数の型のデータを入れてはいけない【Python】 |
https://qiita.com/ms_/items/199df024714b4dd52207
|
pythonmypypyt |
2022-04-22 15:21:15 |
python |
Pythonタグが付けられた新着投稿 - Qiita |
AtCoder B - Count Balls |
https://qiita.com/KKDDD/items/2c59eaf1925f6da5e97d
|
nabmapintinputsplitansa |
2022-04-22 15:03:26 |
AWS |
AWSタグが付けられた新着投稿 - Qiita |
【AWS】ECSについて学んだことをまとめてみた。 |
https://qiita.com/k_uki512/items/ffc0798e06dea9e274a9
|
開発 |
2022-04-22 15:23:31 |
AWS |
AWSタグが付けられた新着投稿 - Qiita |
Amplify Consoleでドメインに紐付いているバージョンをCLIで変更する |
https://qiita.com/yousan/items/c245615212e0b7ced50b
|
amplifyconsole |
2022-04-22 15:15:57 |
Docker |
dockerタグが付けられた新着投稿 - Qiita |
DockerのCentOS7コンテナにMySQLをインストールできなかった |
https://qiita.com/mako0104/items/26a3d01dfcece105d05a
|
centos |
2022-04-22 15:38:14 |
技術ブログ |
Developers.IO |
【クラメソエンジニア女子の働き方】入社してもうすぐ2年。北海道とアキバとわたし |
https://dev.classmethod.jp/articles/hokkaido-akiba-work/
|
近況 |
2022-04-22 06:57:28 |
技術ブログ |
Developers.IO |
[Looker入門] LookMLの開発事始めの儀(その壱):プロジェクト作成 #looker |
https://dev.classmethod.jp/articles/start-to-develop-lookml-one/
|
looker |
2022-04-22 06:23:02 |
技術ブログ |
Developers.IO |
Windowsのタスクスケジューラでポート転送設定を起動時自動実行する |
https://dev.classmethod.jp/articles/windows-task-scheduler-port-forwarding/
|
windows |
2022-04-22 06:10:43 |
海外TECH |
DEV Community |
Find pull requests that modify a file path in the terminal |
https://dev.to/bhupesh/find-pull-requests-that-modify-a-file-path-in-the-terminal-3pd7
|
Find pull requests that modify a file path in the terminalEver wondered how others are changing the same file you are working on It can give insights into what a particular piece of code will look like in the future Certainly it can also help OSS newcomers to identify how others are building a particular featureWell today s post is to solve just that Let s build a simple shell script for ourselves shall we PrerequisitesBefore we start working on anything make sure you have the following CLI tools installedgh Github s CLI toolfzf A command line fuzzy finderjq Command line JSON processorOnce you install gh make sure to authenticate yourself using gh auth login Gimme pull requestsOur first job is to ask the user to choose a local file path to look for This can be done by parsing git ls files for better interactivity we are going to use fzf as wellgit file git ls files fzf prompt Choose File height reverse header Choose a file to find pull requests on github that modify it Once that s settled we need to find all the open pull requests this is done by gh pr listfetch prs pr fetch limit printf s n n Hold tight while we look for PRs that modify git file all open prs gh pr list limit pr fetch limit json number title url files author baseRefName headRefName total prs jq length lt lt lt all open prs By default gh only loads open pull requests For now we have increased that limit to later we will fix this by giving user the control on this value If you execute this above code we will get an output similar to this author login authorUsername baseRefName somebranch files path gitmodules additions deletions headRefName dev number title my new feature url Notice we get all the files changed in a PR inside the files array We can simply loop over all the elements of this JSON array to filter our git filefind files prs for pri pri lt total prs pri do readarray t changed files lt lt echo all open prs jq pri files path if changed files git file then pr branch jq r pri headRefName lt lt lt all open prs base branch jq r pri baseRefName lt lt lt all open prs printf s jq r pri title lt lt lt all open prs pr branch ➜ base branch printf s n by jq r pri author login lt lt lt all open prs printf s n n PR Link jq r pri url lt lt lt all open prs prs count prs count fi done if prs count then printf s n Oops No pull requests found that modify this file path else printf s n Found prs count open pull requests that modify git file fi A bunch of things are going on in this piece of codeWe convert our JSON array of changed files path to a bash array changed files We loop over each path to see if it matches the user provided path or not Furthermore we output any necessary info we need to like PR link base and target branches and author username Wait something s missing right What about diffs The gh pr list command doesn t provide the diff data although we can use a different command gh pr diff to get diff for a particular PRshow diff get diff if show diff then printf s n Getting diff for PR filepath with escaped slashes clean filepath gh pr diff color always sed n diff git a clean filepath d diff q p printf n fi show diff is going to be a global flag that we are gonna control through script arguments More on that later note that we need to show diff for only file path which the user provided To do that we have used sed to get everything between the pattern diff git a lt filepath gt and diff which marks the diff for the next file change It s time to put everything together Let s add some driver code to execute our script correctly while getopts dl o do case o in d d OPTARG if d then show diff fi l l OPTARG printf s n You seem to be lost amp amp exit esacdoneif l then pr fetch limit l printf s n Using pr fetch limit as PR fetch limit else printf s n Using pr fetch limit as default PR fetch limit Pass the l flag to modify it fifetch prsfind files prs Demo amp SourceThe source is available here if you want to reference or hack anything I took the liberty to beautify the output from our script Here is how the finalized version looks like To dos amp TakeawaysThere are a bunch of things that can take this script to the next levelWe need to provide a permalink to the file change inside a PR although it s limited by GitHub s API Support for fetching closed merged PRs as well using gh pr list state all or better asking the user what they want Although we were able to parse out diff for a single file path I believe it s a very nasty amp error prone way to do it and ideally this feature should exist within gh I have created an issue to track this let s see where it goes |
2022-04-22 06:39:15 |
金融 |
JPX マーケットニュース |
[東証]新規上場の承認(グロース市場):(株)トリプルアイズ |
https://www.jpx.co.jp/listing/stocks/new/index.html
|
新規上場 |
2022-04-22 15:30:00 |
金融 |
JPX マーケットニュース |
[OSE]特別清算数値(2022年4月第4週限):日経225 |
https://www.jpx.co.jp/markets/derivatives/special-quotation/
|
特別清算 |
2022-04-22 15:15:00 |
ニュース |
ジェトロ ビジネスニュース(通商弘報) |
サウジアラビアのスタートアップFOODICS、1億7,000万ドルを調達 |
https://www.jetro.go.jp/biznews/2022/04/2bd9e6f485a0752a.html
|
foodics |
2022-04-22 06:20:00 |
海外ニュース |
Japan Times latest articles |
Less rice for the same price: Inflation bites Asia’s food stalls |
https://www.japantimes.co.jp/life/2022/04/22/food/asia-inflation-street-food/
|
favorites |
2022-04-22 15:25:31 |
ニュース |
BBC News - Home |
Madeleine McCann: Portuguese authorities declare formal suspect |
https://www.bbc.co.uk/news/uk-61183857?at_medium=RSS&at_campaign=KARANGA
|
german |
2022-04-22 06:41:44 |
ニュース |
BBC News - Home |
Retail sales fall as rising cost of living bites |
https://www.bbc.co.uk/news/business-61157856?at_medium=RSS&at_campaign=KARANGA
|
finances |
2022-04-22 06:46:46 |
ニュース |
BBC News - Home |
Boris Johnson and India's Narendra Modi to discuss defence and trade |
https://www.bbc.co.uk/news/uk-politics-61183833?at_medium=RSS&at_campaign=KARANGA
|
india |
2022-04-22 06:56:05 |
ニュース |
BBC News - Home |
Tom Grennan recovering after NYC attack |
https://www.bbc.co.uk/news/entertainment-arts-61186012?at_medium=RSS&at_campaign=KARANGA
|
attackthe |
2022-04-22 06:18:40 |
北海道 |
北海道新聞 |
金、1グラム9000円に迫る ウクライナ有事と円安で |
https://www.hokkaido-np.co.jp/article/672777/
|
田中貴金属工業 |
2022-04-22 15:01:00 |
北海道 |
北海道新聞 |
旭川のカタクリ、春到来で見頃 国内最大級の群生地 |
https://www.hokkaido-np.co.jp/article/672773/
|
自然公園 |
2022-04-22 15:01:17 |
ニュース |
Newsweek |
ウクライナ防衛で3Dプリンターが活躍 止血帯から武器までガレージで生産 |
https://www.newsweekjapan.jp/stories/world/2022/04/3d-9.php
|
止血帯の設計データは共有サイト『Github』で公開されており、ウクライナの医療機関または市民であれば誰もがダウンロードして止血帯をDプリントすることができる。 |
2022-04-22 15:23:12 |
IT |
週刊アスキー |
メタ科学アドベンチャー『ANONYMOUS;CODE』のストーリーやキャラクターの情報が判明! |
https://weekly.ascii.jp/elem/000/004/089/4089934/
|
anonymouscode |
2022-04-22 15:05:00 |
IT |
週刊アスキー |
本日より予約開始!『アリス・ギア・アイギスCS』ゲーム内映像を使用した最新PVと店舗別特典を初公開 |
https://weekly.ascii.jp/elem/000/004/089/4089937/
|
発売予定 |
2022-04-22 15:40:00 |
IT |
週刊アスキー |
あなたの自宅がバレるSNS書き込みは地震・落雷・暴走族!? |
https://weekly.ascii.jp/elem/000/004/089/4089895/
|
個人情報 |
2022-04-22 15:30:00 |
IT |
週刊アスキー |
ハマスタに登場する絵本の世界を楽しもう! 横浜DeNAベイスターズ「スターマン☆ランド 2022」5月3日~ 5日開催 |
https://weekly.ascii.jp/elem/000/004/089/4089936/
|
横浜denaベイスターズ |
2022-04-22 15:30:00 |
コメント
コメントを投稿