debian-mirror-gitlab/app/assets/javascripts/repository/mixins/get_ref.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

23 lines
386 B
JavaScript
Raw Normal View History

2020-10-24 23:57:45 +05:30
import refQuery from '../queries/ref.query.graphql';
2019-09-04 21:01:54 +05:30
export default {
apollo: {
ref: {
2020-10-24 23:57:45 +05:30
query: refQuery,
2020-05-05 14:28:15 +05:30
manual: true,
result({ data, loading }) {
2021-09-04 01:27:46 +05:30
if (data && !loading) {
2020-05-05 14:28:15 +05:30
this.ref = data.ref;
this.escapedRef = data.escapedRef;
}
},
2019-09-04 21:01:54 +05:30
},
},
data() {
return {
ref: '',
2020-05-05 14:28:15 +05:30
escapedRef: '',
2019-09-04 21:01:54 +05:30
};
},
};