Skip to content

Commit 0a25231

Browse files
authored
Merge branch 'main' into fix-dashboard-navigation
2 parents 54293b7 + 3872b14 commit 0a25231

File tree

6 files changed

+22
-19
lines changed

6 files changed

+22
-19
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ jobs:
7777
run: npm run build-ui
7878

7979
- name: Save build folder
80-
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
80+
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5
8181
with:
8282
name: build-ubuntu-node-${{ matrix.node-version }}-mongo-${{ matrix.mongodb-version }}
8383
if-no-files-found: error

.github/workflows/e2e.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717

1818
steps:
1919
- name: Checkout code
20-
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
20+
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
2121

2222
- name: Set up Docker Buildx
2323
uses: docker/setup-buildx-action@7c525be6cc8a882d5163ce04293cac18617c709f
@@ -26,7 +26,7 @@ jobs:
2626
uses: docker/setup-compose-action@112d3e30db3bf437d207fea57f22510569d1ab97
2727

2828
- name: Set up Node.js
29-
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
29+
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5
3030
with:
3131
node-version: '20'
3232
cache: 'npm'

.github/workflows/scorecard.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ jobs:
6464
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
6565
# format to the repository Actions tab.
6666
- name: 'Upload artifact'
67-
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
67+
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
6868
with:
6969
name: SARIF file
7070
path: results.sarif

src/db/file/pushes.ts

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -34,19 +34,21 @@ const defaultPushQuery: Partial<PushQuery> = {
3434
export const getPushes = (query: Partial<PushQuery>): Promise<Action[]> => {
3535
if (!query) query = defaultPushQuery;
3636
return new Promise((resolve, reject) => {
37-
db.find(query, (err: Error, docs: Action[]) => {
38-
// ignore for code coverage as neDB rarely returns errors even for an invalid query
39-
/* istanbul ignore if */
40-
if (err) {
41-
reject(err);
42-
} else {
43-
resolve(
44-
_.chain(docs)
45-
.map((x) => toClass(x, Action.prototype))
46-
.value(),
47-
);
48-
}
49-
});
37+
db.find(query)
38+
.sort({ timestamp: -1 })
39+
.exec((err, docs) => {
40+
// ignore for code coverage as neDB rarely returns errors even for an invalid query
41+
/* istanbul ignore if */
42+
if (err) {
43+
reject(err);
44+
} else {
45+
resolve(
46+
_.chain(docs)
47+
.map((x) => toClass(x, Action.prototype))
48+
.value(),
49+
);
50+
}
51+
});
5052
});
5153
};
5254

src/db/mongo/pushes.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,11 @@ export const getPushes = async (
3535
rejected: 1,
3636
repo: 1,
3737
repoName: 1,
38-
timepstamp: 1,
38+
timestamp: 1,
3939
type: 1,
4040
url: 1,
4141
},
42+
sort: { timestamp: -1 },
4243
});
4344
};
4445

src/ui/views/PushRequests/components/PushesTable.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ const PushesTable: React.FC<PushesTableProps> = (props) => {
113113
</TableRow>
114114
</TableHead>
115115
<TableBody>
116-
{[...currentItems].reverse().map((row) => {
116+
{currentItems.map((row) => {
117117
const repoFullName = trimTrailingDotGit(row.repo);
118118
const repoBranch = trimPrefixRefsHeads(row.branch ?? '');
119119
const repoUrl = row.url;

0 commit comments

Comments
 (0)